Porkbun MCP Server
Allows management of Porkbun domains, DNS records, SSL certificates, URL forwarding, nameservers, and DNSSEC through the Porkbun API.
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 Server check if mynewdomain.com is available"
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 Server
A Model Context Protocol (MCP) server that provides tools to interact with the Porkbun API (v3).
This server allows MCP-compatible clients (like AI assistants, IDE extensions, etc.) to manage Porkbun domains, DNS records, SSL certificates, and more, through a standardized interface.
Tools
ping_porkbunTests the Porkbun API connection and authentication.
Inputs: None
Returns: Success message including the client's public IP address, or an error message.
list_domainsRetrieves a list of domains in the Porkbun account.
Inputs:
start(optional number): Index to start retrieving domains from (default 0).includeLabels(optional enum: "yes"): Include domain labels.
Returns: An array of domain objects with details like status, expiration date, etc.
get_dns_recordsRetrieves all DNS records for a specified domain.
Inputs:
domain(string): The domain name.
Returns: An array of DNS record objects.
create_dns_recordAdds a new DNS record to a specified domain.
Inputs:
domain(string): The domain name.name(optional string): Subdomain (leave blank for root, * for wildcard).type(string): Record type (A, CNAME, MX, TXT, NS, AAAA, SRV, TLSA, CAA, HTTPS, SVCB).content(string): Record content/answer.ttl(optional number): Time To Live in seconds (default 600, min 600).prio(optional number): Priority (required for MX/SRV records).
Returns: Success message with the new record ID.
edit_dns_recordModifies an existing DNS record using its ID.
Inputs:
domain(string): The domain name.record_id(string): The ID of the record to edit.name(optional string): New subdomain.type(string): New record type (A, CNAME, MX, etc.).content(string): New record content/answer.ttl(optional number): New TTL in seconds (default 600, min 600).prio(optional number): New Priority (for MX/SRV records).
Returns: Success message.
delete_dns_recordRemoves a specific DNS record using its ID.
Inputs:
domain(string): The domain name.record_id(string): The ID of the record to delete.
Returns: Success message.
get_ssl_bundleRetrieves the SSL certificate bundle for a specified domain.
Inputs:
domain(string): The domain name.
Returns: An object containing
certificatechain,privatekey, andpublickey.
update_nameserversUpdates the nameservers for a specified domain.
Inputs:
domain(string): The domain name.ns(array of strings): An array of name server hostnames.
Returns: Success message.
get_nameserversGets the authoritative nameservers for a specified domain from the registry.
Inputs:
domain(string): The domain name.
Returns: An array of name server hostnames.
add_url_forwardAdds URL forwarding for a domain or subdomain.
Inputs:
domain(string): The domain name.subdomain(optional string): Subdomain to forward (leave blank for root).location(string): URL to forward to.type(enum: "temporary", "permanent"): Type of forward.includePath(optional enum: "yes", "no"): Include URI path in redirection (default "no").wildcard(optional enum: "yes", "no"): Also forward all subdomains (default "no").
Returns: Success message.
get_url_forwardingGets URL forwarding records for a domain.
Inputs:
domain(string): The domain name.
Returns: An array of URL forward record objects.
delete_url_forwardDeletes a URL forward record for a domain by its ID.
Inputs:
domain(string): The domain name.forward_id(string): The ID of the URL forward record to delete.
Returns: Success message.
check_domainChecks the availability of a domain name.
Inputs:
domain(string): The domain name to check.
Returns: An object detailing the domain's availability, pricing, and premium status.
edit_dns_record_by_name_typeEdits all DNS records matching a domain, subdomain (optional), and type.
Inputs:
domain(string): The domain name.type(string): The type of records to edit.name(optional string): The subdomain to edit (leave blank for root, * for wildcard).content(string): The new answer content for the matching records.ttl(optional number): The new TTL (default 600, min 600).prio(optional number): The new priority (for MX/SRV records).
Returns: Success message.
delete_dns_record_by_name_typeDeletes all DNS records matching a domain, subdomain (optional), and type.
Inputs:
domain(string): The domain name.type(string): The type of records to delete.name(optional string): The subdomain to delete (leave blank for root, * for wildcard).
Returns: Success message.
retrieve_dns_record_by_name_typeRetrieves all DNS records matching a domain, subdomain (optional), and type.
Inputs:
domain(string): The domain name.type(string): The type of records to retrieve.name(optional string): The subdomain to retrieve (leave blank for root, * for wildcard).
Returns: An array of matching DNS record objects.
create_dnssec_recordCreates a DNSSEC record at the registry for the domain.
Inputs:
domain(string): The domain name.keyTag(string): Key Tag.alg(string): DS Data Algorithm.digestType(string): Digest Type.digest(string): Digest.maxSigLife(optional string): Max Sig Life.keyDataFlags(optional string): Key Data Flags.keyDataProtocol(optional string): Key Data Protocol.keyDataAlgo(optional string): Key Data Algorithm.keyDataPubKey(optional string): Key Data Public Key.
Returns: Success message.
get_dnssec_recordsGets the DNSSEC records associated with the domain at the registry.
Inputs:
domain(string): The domain name.
Returns: An object containing DNSSEC records, keyed by Key Tag.
delete_dnssec_recordDeletes a DNSSEC record associated with the domain at the registry by Key Tag.
Inputs:
domain(string): The domain name.keyTag(string): The Key Tag of the DNSSEC record to delete.
Returns: Success message.
Related MCP server: porkbun-mcp-server
Prerequisites
Node.js (v18 or later recommended)
npm (usually included with Node.js)
Porkbun API Key and Secret Key (generate here)
Setup
Clone the repository:
git clone https://github.com/miraclebakelaser/porkbun-mcp-server.git cd porkbun-mcp-serverInstall dependencies:
npm installConfigure API Keys: You can provide your Porkbun API Key and Secret Key in multiple ways (highest precedence first):
System Environment Variables: Set
PORKBUN_API_KEYandPORKBUN_SECRET_API_KEYin your system environment.Custom
.envFile: Create a.envfile at a custom location and specify its path using the--dotenv-path(or-p) command-line argument when running the server (see Running the Server section).Default
.envFile: Create a file named.envin the project root directory (porkbun-mcp-server/.env) with the following content:PORKBUN_API_KEY=YOUR_API_KEY PORKBUN_SECRET_API_KEY=YOUR_SECRET_API_KEY
Replace
YOUR_API_KEYandYOUR_SECRET_API_KEYwith your actual keys. Important: Add.envfiles to your.gitignoreif you plan to commit this project to version control.
Building
Compile the TypeScript code to JavaScript:
npm run buildThis will create the executable JavaScript file in the build/ directory.
Running the Server
You can run the compiled server directly using Node.js.
Standard Start:
Uses the default .env location or system environment variables.
npm start
# or directly:
node build/index.jsStart with Custom .env Path:
Use the --dotenv-path or -p argument to specify the location of your .env file:
node build/index.js --dotenv-path /path/to/your/.env
# or shorthand:
node build/index.js -p /path/to/your/.envDevelopment Mode:
The dev script watches for changes and rebuilds/restarts automatically. To pass arguments like --dotenv-path to the underlying node command when using npm run dev, you typically need to use --:
# Development with default .env
npm run dev
# Development with custom .env path
npm run dev -- --dotenv-path /path/to/your/.env
# or
npm run dev -- -p /path/to/your/.envThe server communicates using the MCP stdio transport (standard input/output).
Usage with Claude Desktop
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json(Create the file if it doesn't exist).
Important: Replace the placeholder paths below with the correct absolute paths on your specific system.
Make sure to use the absolute path to the build/index.js file in this project. You can also pass the --dotenv-path argument here if needed:
{
"mcpServers": {
"porkbun": {
"command": "node",
"args": [
"/absolute/path/to/your/porkbun-mcp-server/build/index.js",
// Optional: Add custom .env path if needed
// "--dotenv-path",
// "/absolute/path/to/your/.env"
]
// Optional: If keys aren't in the environment where Claude runs the server
// (and not using .env or --dotenv-path), you can add them here:
// "env": {
// "PORKBUN_API_KEY": "YOUR_API_KEY",
// "PORKBUN_SECRET_API_KEY": "YOUR_SECRET_API_KEY"
// }
}
// Add other servers here if needed
}
}Remember to replace /absolute/path/to/your/porkbun-mcp-server/build/index.js (and the optional .env path if used) with the correct absolute paths on your system. Save the configuration file and restart Claude Desktop.
The Porkbun tools should now be available within Claude.
License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Available Tools
20 toolsadd_url_forwardB
Adds URL forwarding for a domain or subdomain.
Inputs: type (required), domain (required), location (required), wildcard, +2 more.
check_domainB
Checks the availability of a domain name.
Inputs: domain (required).
create_dns_recordA
Adds a new DNS record to a specified domain.
Inputs: type (required), domain (required), content (required), ttl, +2 more.
create_dnssec_recordB
Creates a DNSSEC record at the registry for the domain.
Inputs: alg (required), digest (required), domain (required), keyTag (required), +6 more.
delete_dns_recordB
Removes a specific DNS record using its ID.
Inputs: domain (required), record_id (required).
delete_dns_record_by_name_typeB
Deletes all DNS records matching a domain, subdomain (optional), and type. Corresponds to endpoint: dns/deleteByNameType/DOMAIN/TYPE/[SUBDOMAIN]
Inputs: type (required), domain (required), name.
delete_dnssec_recordA
Deletes a DNSSEC record associated with the domain at the registry by Key Tag.
Inputs: domain (required), keyTag (required).
delete_url_forwardB
Deletes a URL forward record for a domain by its ID.
Inputs: domain (required), forward_id (required).
edit_dns_recordA
Modifies an existing DNS record using its ID.
Inputs: type (required), domain (required), content (required), record_id (required), +3 more.
edit_dns_record_by_name_typeA
Edits all DNS records matching a domain, subdomain (optional), and type. Corresponds to endpoint: dns/editByNameType/DOMAIN/TYPE/[SUBDOMAIN]
Inputs: type (required), domain (required), content (required), ttl, +2 more.
get_dns_recordsA
Retrieves DNS records for a domain. If record_id is provided, retrieves a single record; otherwise, retrieves all records.
Inputs: domain (required), record_id.
get_dnssec_recordsB
Gets the DNSSEC records associated with the domain at the registry.
Inputs: domain (required).
get_domain_pricingA
Retrieves the default domain pricing information for all supported TLDs.
Inputs: no named parameters.
get_nameserversA
Gets the authoritative nameservers for a specified domain.
Inputs: domain (required).
get_ssl_bundleB
Retrieves the SSL certificate bundle for a specified domain.
Inputs: domain (required).
get_url_forwardingB
Gets URL forwarding records for a domain.
Inputs: domain (required).
list_domainsB
Retrieves a list of domains in the Porkbun account.
Inputs: start, includeLabels.
ping_porkbunA
Tests the Porkbun API connection and authentication.
Inputs: no named parameters.
retrieve_dns_record_by_name_typeB
Retrieves all DNS records matching a domain, subdomain (optional), and type. Corresponds to endpoint: dns/retrieveByNameType/DOMAIN/TYPE/[SUBDOMAIN]
Inputs: type (required), domain (required), name.
update_nameserversB
Updates the nameservers for a specified domain.
Inputs: ns (required), domain (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
The tool set has several pairs of DNS record operations (by ID vs by name/type) that could cause misselection, though descriptions clarify the distinction. Other tools (pricing, SSL, nameservers, etc.) are clearly distinct. Overall, some ambiguity exists but not severe.
Tool names mostly follow a verb_noun pattern with clear verbs like create, get, edit, delete. Minor inconsistencies include 'retrieve' vs 'get' and 'url_forward' vs 'url_forwarding', but the pattern is largely predictable.
20 tools is on the heavy side, including several near-duplicate DNS operations. For a domain management server, the count is somewhat high but not unreasonable, and each tool maps to a real API endpoint.
The set covers domain listing, pricing, availability, DNS records, DNSSEC, nameservers, SSL, and URL forwarding. Missing operations include editing URL forwards and getting single domain details, but core workflows are 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.
Managed MCP gateway with OAuth, per-agent permissions, shared accounts and activity logs.
Send transactional email and manage domains, audiences, and broadcasts from any MCP client.
Related MCP Servers
- AlicenseAqualityBmaintenanceOfficial Porkbun MCP server, maintained by Porkbun. Check availability and pricing, register, renew and transfer domains, and manage DNS, nameservers, URL forwarding, glue, DNSSEC, DNS restore points, static hosting, webhooks and Cloudflare-connected domains. Hosted at mcp.porkbun.com/mcp with Porkbun sign-in (no API key), or run locally with npx @porkbunllc/mcp-server. Docs: porkbun.com/mcp1543,021 npm36MIT
- 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
- AlicenseDqualityBmaintenanceMCP server for Porkbun domains and DNS, enabling read-only and mutating operations with safety features like dry-run and write mode toggle.40135 npm3MIT