Skip to main content

porkbun-mcp-server

CI codecov OpenSSF Scorecard PyPI Release License: MIT Python 3.11+ pre-commit PRs welcome

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 (48)

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.

Metadata

Release files for porkbun-mcp-server 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for porkbun-mcp-server 0.6.1
File Size Uploaded
porkbun_mcp_server-0.6.1.tar.gz 56.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for porkbun-mcp-server 0.6.1
File Interpreter ABI Platform
porkbun_mcp_server-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 98.4 kB

Release files / porkbun_mcp_server-0.6.1.tar.gz

Download URL porkbun_mcp_server-0.6.1.tar.gz
Size 56.4 kB
Tags Source
SHA-256 checksum
How to use checksums
758422569b6803827e4bd7a3f3475d83dedeca2a5df785b857cccf2eb922109f
BLAKE2b-256 checksum
How to use checksums
53dd685b6e76d69b4510ee3be0b04ff45f9380789d68bbb9db6f6f644adabec9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / porkbun_mcp_server-0.6.1-py3-none-any.whl

Download URL porkbun_mcp_server-0.6.1-py3-none-any.whl
Size 42.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f75990b9d1ddbb53fa576192f1a0779f7bf59e69f7eb3a67de115bbbf1729d22
BLAKE2b-256 checksum
How to use checksums
2a7aadc145af037c316fe2e31dbe96351dc358cf5b707ee6f02cb1eba6f0a7a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page