Model Context Protocol server for Porkbun's API v3 — domains, DNS, DNSSEC, SSL with audit-log emit on every mutation.
Project description
porkbun-mcp-server
Model Context Protocol server for Porkbun's API v3 — full coverage of domains, DNS records, DNSSEC, SSL bundle retrieval, glue records, URL forwarding, labels, domain registration/renewal/transfers, marketplace, account management, email hosting, and API key management.
Every mutation tool requires a reason argument and emits an audit row via a pluggable handler, so DNS changes are always traceable.
Install
pip install porkbun-mcp-server
Or from source:
git clone https://github.com/Avicennasis/porkbun-mcp-server.git
cd porkbun-mcp-server
pip install -e ".[dev]"
Register with Claude Code
claude mcp add porkbun -- porkbun-mcp
Or for other MCP clients, add to your configuration:
{
"mcpServers": {
"porkbun": {
"command": "porkbun-mcp",
"env": {
"PORKBUN_API_KEY": "pk1_...",
"PORKBUN_SECRET_KEY": "sk1_..."
}
}
}
}
Configure
| Variable | Required | Description |
|---|---|---|
PORKBUN_API_KEY |
Yes | Your Porkbun API key (pk1_...) |
PORKBUN_SECRET_KEY |
Yes | Your Porkbun secret key (sk1_...) |
PORKBUN_MCP_AUDIT_ENABLED |
No | Set false to disable audit logging |
PORKBUN_MCP_AUDIT_HANDLER |
No | Audit handler — see Audit Handler |
PORKBUN_PRICING_CACHE_TTL |
No | Pricing cache TTL in seconds (default: 86400, 0 = no cache) |
Get your API keys at porkbun.com/account/api. Ensure API access is enabled for the domains you want to manage.
Tools (49)
DNS Records
list_dns_records create_dns_record bulk_create_dns_records get_dns_record get_dns_records_by_name_type edit_dns_record edit_dns_records_by_name_type delete_dns_record delete_dns_records_by_name_type
DNSSEC
get_dnssec_records create_dnssec_record delete_dnssec_record
Domains
list_domains get_domain check_availability check_bulk_availability register_domain renew_domain transfer_domain get_transfer_status list_transfers update_auto_renew list_labels add_label remove_label create_glue update_glue get_glue delete_glue create_invite get_invite_status
Nameservers
get_name_servers update_name_servers
SSL
get_ssl_bundle
URL Forwarding
get_url_forwarding add_url_forward delete_url_forward
Account & Pricing
ping get_ip get_account_balance get_api_settings get_pricing get_pricing_for_tld list_supported_tlds request_api_key retrieve_api_key
Email & Marketplace
set_email_password get_marketplace
Audit Handler
Every mutation tool emits an audit row. The handler is configured via PORKBUN_MCP_AUDIT_HANDLER:
| Value | Behavior |
|---|---|
unset or jsonl |
Append JSONL to ~/.local/share/porkbun-mcp/audit.jsonl (default) |
| Absolute path | Shell out to the binary with --source, --category, --action, --service, --reason, --target, --payload flags |
none |
Disable audit (not recommended) |
Audit failures are always swallowed — mutations are never blocked by logging issues.
JSONL format
{"ts": "2026-06-12T18:00:00+00:00", "source": "porkbun-mcp", "category": "dns", "action": "POST", "service": "example.com", "target": "A `www`", "reason": "point www to new server"}
Pricing Cache
get_pricing, get_pricing_for_tld, and list_supported_tlds are served from a disk cache at $XDG_CACHE_HOME/porkbun-mcp/pricing.json (default ~/.cache/porkbun-mcp/pricing.json). TTL defaults to 24 hours; override with PORKBUN_PRICING_CACHE_TTL. Pass force_refresh=true to bypass the cache. Mutable data (DNS records, domain inventory) is never cached.
Development
git clone https://github.com/Avicennasis/porkbun-mcp-server.git
cd porkbun-mcp-server
pip install -e ".[dev]"
pytest -v
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file porkbun_mcp_server-0.5.0.tar.gz.
File metadata
- Download URL: porkbun_mcp_server-0.5.0.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30693e849bcd232d4670641846204a70b2390c93b4035c12714df745d3c50647
|
|
| MD5 |
1e0d321dc9637719f7da64f9eb5f5601
|
|
| BLAKE2b-256 |
7eaecf527e38048e5c229ff84a4ffb386c93bb11aa989b05a30f171dced7f496
|
Provenance
The following attestation bundles were made for porkbun_mcp_server-0.5.0.tar.gz:
Publisher:
release.yml on Avicennasis/porkbun-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
porkbun_mcp_server-0.5.0.tar.gz -
Subject digest:
30693e849bcd232d4670641846204a70b2390c93b4035c12714df745d3c50647 - Sigstore transparency entry: 1804967913
- Sigstore integration time:
-
Permalink:
Avicennasis/porkbun-mcp-server@8b8b99177cb5f84be218410e512e6a99530d90f4 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/Avicennasis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8b8b99177cb5f84be218410e512e6a99530d90f4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file porkbun_mcp_server-0.5.0-py3-none-any.whl.
File metadata
- Download URL: porkbun_mcp_server-0.5.0-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fc6d88c8dcf9f0d7fff52ee1a249b504357df40383cbb646ca0351c407ff62f
|
|
| MD5 |
2f70f59f066861f10e1f14074aa5c4a8
|
|
| BLAKE2b-256 |
f5c1f8db03c8921df8097c6204e7ca9e8149dbb5c351fa5c06b95779ae141c1d
|
Provenance
The following attestation bundles were made for porkbun_mcp_server-0.5.0-py3-none-any.whl:
Publisher:
release.yml on Avicennasis/porkbun-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
porkbun_mcp_server-0.5.0-py3-none-any.whl -
Subject digest:
0fc6d88c8dcf9f0d7fff52ee1a249b504357df40383cbb646ca0351c407ff62f - Sigstore transparency entry: 1804967962
- Sigstore integration time:
-
Permalink:
Avicennasis/porkbun-mcp-server@8b8b99177cb5f84be218410e512e6a99530d90f4 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/Avicennasis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8b8b99177cb5f84be218410e512e6a99530d90f4 -
Trigger Event:
release
-
Statement type: