MCP server for Porkbun domains and DNS.

MCP server for Porkbun domains and DNS.
Use it from any MCP-compatible client to inspect and manage:
Built for safe operations:
dry_run: truePorkbun operations are often repetitive and risky under time pressure. This project exposes Porkbun APIs as MCP tools so AI assistants can execute domain workflows consistently and with guardrails.
>=20PORKBUN_API_KEYPORKBUN_SECRET_KEYWhere to get the keys:
PORKBUN_API_KEY (API Key)PORKBUN_SECRET_KEY (Secret API Key)Install dependencies locally (for development):
npm install
npm run build
Read-only mode:
PORKBUN_API_KEY=your_key \
PORKBUN_SECRET_KEY=your_secret \
node dist/index.js
Enable write operations:
PORKBUN_API_KEY=your_key \
PORKBUN_SECRET_KEY=your_secret \
PORKBUN_GET_MUDDY=true \
node dist/index.js --get-muddy
node dist/index.js --help
GitHub README does not support native tabs, so this section uses collapsible "tab-like" blocks. If you later move docs to a docs site (Docusaurus/Nextra), you can reuse the same snippets as real tabs.
{
"porkbun-mcp": {
"command": "npx",
"args": ["-y", "porkbun-mcp"],
"env": {
"PORKBUN_API_KEY": "your_porkbun_api_key",
"PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
}
}
}
Add an MCP server in Cursor settings and paste the snippet above as a server config. If your setup expects an outer object, wrap it into:
{
"mcpServers": {
"porkbun-mcp": {
"command": "npx",
"args": ["-y", "porkbun-mcp"],
"env": {
"PORKBUN_API_KEY": "your_porkbun_api_key",
"PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
}
}
}
}
Update ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"porkbun-mcp": {
"command": "npx",
"args": ["-y", "porkbun-mcp"],
"env": {
"PORKBUN_API_KEY": "your_porkbun_api_key",
"PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
}
}
}
}
Most clients use the same mcpServers shape:
{
"mcpServers": {
"porkbun-mcp": {
"command": "npx",
"args": ["-y", "porkbun-mcp"],
"env": {
"PORKBUN_API_KEY": "your_porkbun_api_key",
"PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
}
}
}
}
npx{
"mcpServers": {
"porkbun-mcp": {
"command": "npx",
"args": ["-y", "porkbun-mcp", "--get-muddy"],
"env": {
"PORKBUN_API_KEY": "your_porkbun_api_key",
"PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
}
}
}
}
{
"mcpServers": {
"porkbun-mcp": {
"command": "npx",
"args": ["-y", "porkbun-mcp", "--get-muddy", "--enable-domain-create"],
"env": {
"PORKBUN_API_KEY": "your_porkbun_api_key",
"PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
}
}
}
}
Important (Porkbun API domain registration prerequisites):
cost must be provided in pennies and must match the value returned by the domain check (minimum duration * price).agree_to_terms=true in this server, which maps to agreeToTerms="yes" for Porkbun).Reference:
Once configured in your MCP client, start with:
pingpricing_getThen try one read flow:
dns_list for your domainBefore any write call, run a scenario tool in dry_run mode first.
--get-muddy or PORKBUN_GET_MUDDY=true is set.domains_create) is disabled by default. It requires:
--get-muddy)--enable-domain-create or PORKBUN_ENABLE_DOMAIN_CREATE=true)dry_run=false + confirm_apply=true + agree_to_terms=truePORKBUN_API_KEY (required)PORKBUN_SECRET_KEY (required)PORKBUN_GET_MUDDY (optional)PORKBUN_ENABLE_DOMAIN_CREATE (optional, dangerous)--get-muddy--enable-domain-create (dangerous)--transport stdio--ipv4-only-api--help--get-muddy Means--get-muddy enables write mode.
Without it, the server stays in safe read-only behavior. With it, mutating tools are allowed (create/edit/delete/update operations for DNS and domain settings).
Use this mode only when:
dry_run flowsping, pricing_getScenario tools:
dns_querydns_upsertdomain_health_checkdns_removedomain_redirect_ensuredomain_cutover_webdns_batch_applyBeginner helpers:
dns_auditdns_setupemail_dns_setupupdate_server_ipsubdomain_setupDetailed docs: docs/scenario-tools.md
dns_query by record id:
{
"domain": "example.com",
"selector": {
"record_id": "123456789"
}
}
dns_upsert plan mode:
{
"domain": "example.com",
"match": {
"type": "A",
"subdomain": "www"
},
"target": {
"content": "203.0.113.10",
"ttl": 300
},
"dry_run": true
}
domains_check_bulk:
{
"domains": ["example.com", "example.net", "example.org"],
"concurrency": 1,
"respect_limits": true,
"delay_ms": 11000,
"stop_on_rate_limit": true
}
dns_batch_apply plan:
{
"domain": "example.com",
"desired_records": [
{
"type": "A",
"subdomain": "",
"content": "198.51.100.42",
"ttl": 300
}
],
"mode": "plan",
"strategy": "merge",
"max_changes": 5
}
npm install
npm run build
Run locally:
npm run dev
Contributions are welcome.
Read CONTRIBUTING.md before opening a PR.
MIT
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y porkbun-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-korobkov-v-porkbun-mcp": {
"command": "npx",
"args": [
"-y",
"porkbun-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceporkbun-mcpnpmPorkbun MCP works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.