Porkbun — Claude Code MCP server: features and setup
This MCP server for Claude Code manages domains and DNS through a Porkbun account. It handles requests to register a domain, configure mail, or publish a static site.
MIT ★ 5 updated 2026-10-29
claude mcp add --env PORKBUN_API_KEY_FILE=<PORKBUN_API_KEY_FILE> --env PORKBUN_SECRET_API_KEY_FILE=<PORKBUN_SECRET_API_KEY_FILE> --env PORKBUN_OUTBOX_DIR=<PORKBUN_OUTBOX_DIR> --env PORKBUN_TOOLSETS=<PORKBUN_TOOLSETS> --transport stdio porkbun -- npx -y @foreverworks/mcp-porkbunWhat Porkbun does
The server can search for and register domains, edit DNS and DNSSEC records, publish static sites, and configure mailboxes or webhooks. It also supports domain and DNS transfers, invoice lookup, and saving files.
A Porkbun account, two API keys stored in separate files, and API access for the domains are required. The package runs on Node 22.19 or newer. File-producing tools need an output directory for items such as invoices, DNS exports, certificates, and mailbox passwords; without it, those tools return a configuration error. Purchases and other charge-related actions ask for confirmation, and requests over the monthly API limit are rejected before reaching Porkbun.
What it helps with
- check whether a domain is available and register it
- edit DNS records or DNSSEC settings
- publish a static site through Porkbun
- save an invoice or DNS zone export to a file
- configure a mailbox or webhook
Example prompts for the agent
- Check which of my domains expire soon and where auto-renewal is off.
- See whether the domain is available and register it if it costs under $15 per year.
- Save last month's Porkbun invoice as a PDF.
How to install Porkbun
Platform CLI
claude mcp add --env PORKBUN_API_KEY_FILE=<PORKBUN_API_KEY_FILE> --env PORKBUN_SECRET_API_KEY_FILE=<PORKBUN_SECRET_API_KEY_FILE> --env PORKBUN_OUTBOX_DIR=<PORKBUN_OUTBOX_DIR> --env PORKBUN_TOOLSETS=<PORKBUN_TOOLSETS> --transport stdio porkbun -- npx -y @foreverworks/mcp-porkbunReplace <…> with your own values
Platform CLI
codex mcp add porkbun --env PORKBUN_API_KEY_FILE=<PORKBUN_API_KEY_FILE> --env PORKBUN_SECRET_API_KEY_FILE=<PORKBUN_SECRET_API_KEY_FILE> --env PORKBUN_OUTBOX_DIR=<PORKBUN_OUTBOX_DIR> --env PORKBUN_TOOLSETS=<PORKBUN_TOOLSETS> -- npx -y @foreverworks/mcp-porkbunReplace <…> with your own values
Config file
{
"mcpServers": {
"porkbun": {
"command": "npx",
"args": [
"-y",
"@foreverworks/mcp-porkbun"
],
"env": {
"PORKBUN_API_KEY_FILE": "<PORKBUN_API_KEY_FILE>",
"PORKBUN_SECRET_API_KEY_FILE": "<PORKBUN_SECRET_API_KEY_FILE>",
"PORKBUN_OUTBOX_DIR": "<PORKBUN_OUTBOX_DIR>",
"PORKBUN_TOOLSETS": "<PORKBUN_TOOLSETS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"porkbun": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@foreverworks/mcp-porkbun"
],
"env": {
"PORKBUN_API_KEY_FILE": "<PORKBUN_API_KEY_FILE>",
"PORKBUN_SECRET_API_KEY_FILE": "<PORKBUN_SECRET_API_KEY_FILE>",
"PORKBUN_OUTBOX_DIR": "<PORKBUN_OUTBOX_DIR>",
"PORKBUN_TOOLSETS": "<PORKBUN_TOOLSETS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e PORKBUN_API_KEY_FILE=<PORKBUN_API_KEY_FILE> -e PORKBUN_SECRET_API_KEY_FILE=<PORKBUN_SECRET_API_KEY_FILE> -e PORKBUN_OUTBOX_DIR=<PORKBUN_OUTBOX_DIR> -e PORKBUN_TOOLSETS=<PORKBUN_TOOLSETS> porkbun npx -y @foreverworks/mcp-porkbunReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Porkbun
How do I install Porkbun in Claude Code?
Run `claude mcp add porkbun -e PORKBUN_API_KEY_FILE=<PORKBUN_API_KEY_FILE> -e PORKBUN_SECRET_API_KEY_FILE=<PORKBUN_SECRET_API_KEY_FILE> -- npx -y @foreverworks/mcp-porkbun`. Set both placeholders to the paths of the API key files.
What does Porkbun do?
It gives an AI agent tools for managing Porkbun domains, including registration, DNS changes, static-site publishing, mailbox setup, and invoice retrieval.
What does Porkbun need to run?
It requires a Porkbun account, separate API-key and secret-key files, and API access for the domains it manages. Node 22.19 or newer is required; file-saving tools also need an output directory.