porkbun-mcp
Summary: MCP server for Porkbun domains/DNS with read-only-by-default, guarded write and planning tools.
Connectivity/pricing:
ping,pricing_get.Domains: list domains; get/update nameservers; get/add/delete URL forwarding; check single/bulk availability; update auto-renew; create domains when explicitly enabled; manage glue records.
DNS: list/get/create/edit/delete records, including by record ID or name/type.
DNSSEC: list/create/delete records.
SSL: retrieve certificate bundles.
Scenario/planning: query DNS, health checks, upsert/remove records, ensure redirects, web cutover, batch apply plans.
Beginner helpers: DNS audit/setup, email DNS setup, server IP update, subdomain setup.
Safety: write actions require write mode (
--get-muddy); domain creation also needs--enable-domain-createplus confirmations/terms; scenario tools default todry_run: true.
Allows managing Porkbun domains and DNS, including domain settings, nameservers, DNS records, DNSSEC, SSL certificate bundles, and URL forwarding, with safety guardrails for write operations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@porkbun-mcp list DNS records for mydomain.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
porkbun-mcp

MCP server for Porkbun domains and DNS.
Use it from any MCP-compatible client to inspect and manage:
domains and nameservers
DNS records
DNSSEC
SSL certificate bundle
URL forwarding
Built for safe operations:
read-only behavior by default
mutating tools require explicit write mode
scenario tools default to
dry_run: true
Why This Exists
Porkbun 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.
Related MCP server: porkbun-mcp-server
3-Minute Setup
1) Prerequisites
Node.js
>=20Porkbun API credentials:
PORKBUN_API_KEYPORKBUN_SECRET_KEY
In Porkbun panel, the target domain must be marked as API accessible ("available via API"). Account-level keys are not enough if domain-level API access is disabled.
Where to get the keys:
Log in to Porkbun.
Open account settings and go to API Access.
Generate/copy:
PORKBUN_API_KEY(API Key)PORKBUN_SECRET_KEY(Secret API Key)
In the domain settings, ensure API access is enabled for each domain you want to manage.
Install dependencies locally (for development):
npm install
npm run build2) Quick local run (stdio)
Read-only mode:
PORKBUN_API_KEY=your_key \
PORKBUN_SECRET_KEY=your_secret \
node dist/index.jsEnable write operations:
PORKBUN_API_KEY=your_key \
PORKBUN_SECRET_KEY=your_secret \
PORKBUN_GET_MUDDY=true \
node dist/index.js --get-muddy3) Verify CLI wiring
node dist/index.js --helpMCP Client Integrations
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.
Base server snippet (safe read-only)
{
"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"
}
}
}
}Write mode with 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"
}
}
}
}Domain create enabled (dangerous)
{
"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):
Your Porkbun account must have registered at least one domain in the past (for new accounts, the first purchase may need to be done via the web UI).
Your email address and phone number must be verified.
You must have enough account credit (API registrations are billed from account credit).
costmust be provided in pennies and must match the value returned by the domain check (minimum duration * price).You must explicitly accept terms (
agree_to_terms=truein this server, which maps toagreeToTerms="yes"for Porkbun).
Reference:
Porkbun API v3 docs (see "Domain Create" and "Domain Check"): https://porkbun.com/api/json/v3/documentation
First Successful Call
Once configured in your MCP client, start with:
pingpricing_get
Then try one read flow:
dns_listfor your domain
Before any write call, run a scenario tool in dry_run mode first.
Safety Model
Write actions are blocked unless
--get-muddyorPORKBUN_GET_MUDDY=trueis set.Scenario tools are designed to plan before apply.
Destructive tools include explicit limits and confirmations.
API credentials are account-level. Domain-level API permissions in Porkbun still apply.
Domain registration (
domains_create) is disabled by default. It requires:write mode (
--get-muddy)explicit enable flag (
--enable-domain-createorPORKBUN_ENABLE_DOMAIN_CREATE=true)dry_run=false+confirm_apply=true+agree_to_terms=true
Environment Variables
PORKBUN_API_KEY(required)PORKBUN_SECRET_KEY(required)PORKBUN_GET_MUDDY(optional)PORKBUN_ENABLE_DOMAIN_CREATE(optional, dangerous)
CLI Options
--get-muddy--enable-domain-create(dangerous)--transport stdio--ipv4-only-api--help
What --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:
you are ready to apply real infrastructure changes
your domain is API-enabled in Porkbun
you have already validated the plan with read calls or
dry_runflows
Tool Coverage
Connectivity:
ping,pricing_getDomains: list, nameservers, URL forwarding, glue records (get/create/update/delete), availability
DNS: list/get/create/edit/delete (including by name/type)
DNSSEC: list/create/delete
SSL: certificate bundle retrieval
Scenario tools:
dns_querydns_upsertdomain_health_checkdns_removedomain_redirect_ensuredomain_cutover_webdns_batch_apply
Beginner helpers:
dns_auditdns_setupemail_dns_setupupdate_server_ipsubdomain_setup
Detailed docs: docs/scenario-tools.md
Practical Examples
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
}Security Notes
Never commit real API keys to git.
Prefer local environment variables or a secret manager.
Treat write mode as production access.
Development
npm install
npm run buildRun locally:
npm run devContributing
Contributions are welcome.
Read CONTRIBUTING.md before opening a PR.
License
MIT
Strict tool arguments and registration cost
All tools reject undeclared arguments. Calls that previously ignored extra fields now fail validation before contacting Porkbun.
For dns_get_by_name_type, dns_edit_by_name_type, and dns_delete_by_name_type, use subdomain, not name. Omit it or pass an empty string to target the zone apex. dns_create and dns_edit use name.
domains_create.cost is an integer in US cents matching the current quote.
The default dry_run: true only returns a local plan and does not check availability or price with Porkbun. Execution requires dry_run: false, confirm_apply: true, agree_to_terms: true, write mode and domain-create enablement.
Run npm test for MCP regression checks with mocked HTTP and no real purchases.
Card payment (0.4.0)
Use pay_with: "card" on domains_create. Before a live call, generate and save
idempotency_key (16–128 ASCII letters, digits, underscores or hyphens; UUIDs work).
The caller must retain the exact request and key across restarts. No durable server
ledger or automatic key generation is provided. Dry-run stays local and defaults
to true. Existing write, registration, terms and confirmation gates still apply.
A 402 returns a flat PAYMENT_REQUIRED result with payUrl, cardPaymentId and
expiresAt. The account holder approves the exact purchase in an external MPP
wallet. This server never pays links or switches to credit. Treat the URL and
payment id as sensitive and avoid sharing histories containing them.
After authorization, repeat the purchase with card_payment_id, explicit card
mode and a NEW saved key because the body changed. Identical retries, including
after lost responses, use the original key. Porkbun documents a 24-hour replay
window; reconcile older or uncertain requests before attempting another purchase.
Timeouts and malformed responses report unknown outcome, never an invented no-charge result. Card responses use an allowlist; raw messages, arbitrary fields and card details are omitted. Only explicit payment booleans are retained on API errors. Responses are capped at 64 KiB, redirects refused, and payment URLs restricted to HTTPS on porkbun.com under /pay/, without credentials, query or fragment. Unsupported shapes fail closed. Existing credit calls retain their response wrapper.
Official contract: https://porkbun.com/llms/guides/pay-with-card-mpp Validation uses mocked HTTP only; no live payments were made.
Available Tools
40 toolsdns_auditD
Inputs: domain (required).
dns_batch_applyD
Inputs: domain (required), desired_records (required), mode, strategy, +2 more.
dns_createD
Inputs: type (required), domain (required), content (required), ttl, +3 more.
dns_deleteD
Inputs: domain (required), record_id (required).
dns_delete_by_name_typeD
Inputs: type (required), domain (required), subdomain.
dns_editD
Inputs: type (required), domain (required), content (required), record_id (required), +4 more.
dns_edit_by_name_typeD
Inputs: type (required), domain (required), content (required), ttl, +3 more.
dns_getD
Inputs: domain (required), record_id (required).
dns_get_by_name_typeD
Inputs: type (required), domain (required), subdomain.
dns_listD
Inputs: domain (required).
dns_queryD
Inputs: domain (required), selector (required).
dns_removeD
Inputs: domain (required), selector (required), dry_run, max_delete.
dnssec_createD
Inputs: alg (required), digest (required), domain (required), key_tag (required), +6 more.
dnssec_deleteD
Inputs: domain (required), key_tag (required).
dnssec_listD
Inputs: domain (required).
dns_setupD
Inputs: domain (required), ttl, dry_run, apex_ipv4, +3 more.
dns_upsertD
Inputs: match (required), domain (required), target (required), dry_run, +1 more.
domain_cutover_webD
Inputs: domain (required), target_records (required), verify, dry_run, +2 more.
domain_health_checkD
Inputs: domain (required), checks.
domain_redirect_ensureD
Inputs: domain (required), desired (required), dry_run, strategy, +1 more.
domains_add_url_forwardD
Inputs: domain (required), location (required), type, wildcard, +2 more.
domains_check_availabilityD
Inputs: domain (required).
domains_check_bulkD
Inputs: domains (required), delay_ms, concurrency, stop_on_error, +2 more.
domains_createA
Register a domain. cost is integer US cents matching the current quote. dry_run defaults to true and makes no API call; execution requires dry_run=false, confirm_apply=true, agree_to_terms=true, write mode and domain-create enablement. Card execution requires a saved caller-generated idempotency_key. Reuse it only for identical retries; use a new key when adding card_payment_id. This tool never pays the link.
Inputs: cost (required), domain (required), dry_run, pay_with, +4 more.
domains_create_glue_recordD
Inputs: ips (required), domain (required), glue_host_subdomain (required).
domains_delete_glue_recordD
Inputs: domain (required), glue_host_subdomain (required).
domains_delete_url_forwardD
Inputs: domain (required), record_id (required).
domains_get_glue_recordsD
Inputs: domain (required).
domains_get_nameserversD
Inputs: domain (required).
domains_get_url_forwardsD
Inputs: domain (required).
domains_listD
Inputs: start, fetch_all, include_labels.
domains_update_auto_renewD
Inputs: status (required), domain, domains, dry_run, +1 more.
domains_update_glue_recordD
Inputs: ips (required), domain (required), glue_host_subdomain (required).
domains_update_nameserversD
Inputs: domain (required), nameservers (required).
email_dns_setupD
Inputs: domain (required), provider (required), ttl, dry_run, +2 more.
pingD
Inputs: no named parameters.
pricing_getD
Inputs: no named parameters.
ssl_retrieveD
Inputs: domain (required).
subdomain_setupD
Inputs: type (required), domain (required), content (required), subdomain (required), +4 more.
update_server_ipD
Inputs: ipv4 (required), domain (required), ttl, ipv6, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 40 tools
Many tools have overlapping or indistinguishable purposes, especially dns_delete vs dns_remove vs dns_delete_by_name_type, dns_edit vs dns_edit_by_name_type, and dns_get vs dns_get_by_name_type. Setup/orchestration tools like dns_setup, subdomain_setup, email_dns_setup, domain_cutover_web, and update_server_ip are hard to distinguish without descriptions, and most tools lack descriptions entirely.
Most names use snake_case, which is readable, but conventions vary: some groups use plural resource prefixes (domains_list) while others use singular or bare verbs (dns_list, ssl_retrieve, ping). Verb choices are inconsistent across equivalent operations, such as delete vs remove and edit vs update, and several tools have no resource prefix at all.
At 40 tools, the surface is heavy for a Porkbun management server, and much of the count comes from near-duplicate variants like dns_delete and dns_delete_by_name_type. The broad domain/DNS feature set could justify many tools, but the current set appears bloated by redundant operations.
The tool surface covers a wide range of domain management workflows: domains, DNS records, DNSSEC, SSL retrieval, nameservers, URL forwarding, glue records, availability checks, pricing, and health/setup helpers. Minor gaps may exist around account-level or transfer operations, but the core lifecycle appears well covered.
Maintenance
Related MCP Connectors
Official Porkbun MCP server: domains, DNS, SSL, hosting and Cloudflare via the Porkbun API.
MCP server for DNSimple — domains, DNS zone records, availability, pricing and contacts.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Related MCP Servers
- AlicenseBqualityBmaintenanceMCP server for Dynadot domain registrar API3 — manage domains, DNS, contacts, transfers & more67106 npm1MIT
- AlicenseBqualityBmaintenanceMCP server for managing Porkbun domains, DNS, and related services via Porkbun's API. Every mutation requires a reason and is audited for traceability.48MIT
- AlicenseAqualityDmaintenanceMCP server for the Porkbun DNS API. Manage DNS records, domains, DNSSEC, SSL certificates, and more.2555 PyPI23MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for AI agents to safely manage Cloudflare DNS, DMARC, SPF, BIMI, and Email Routing with dry-run-first and approval-based writes.10MIT