Connects Claude to the Porkbun domain registrar API so you can inspect and manage DNS records, nameservers, DNSSEC, SSL bundles, and URL forwarding without leaving your editor. Ships in read-only mode by default. Flip the get-muddy flag to unlock mutations like creating A records or updating nameservers. Includes scenario tools for common workflows: dns_upsert for idempotent record updates, domain_cutover_web for migration planning, dns_batch_apply for declarative config. Useful when you're managing multiple domains or frequently tweaking DNS during deployments and want an AI to handle the repetitive API calls with guardrails. Domain registration is gated behind a second flag to prevent accidental purchases.

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
PORKBUN_API_KEY*secretPorkbun API Key
PORKBUN_SECRET_KEY*secretPorkbun Secret API Key