MCP server for Porkbun DNS API
Project description
porkbun-mcp
MCP server for the Porkbun DNS API.
Manage DNS records, domains, DNSSEC, SSL certificates, and more via the Model Context Protocol.
Configuration
Set your Porkbun API credentials as environment variables:
export PORKBUN_API_KEY="pk1_..."
export PORKBUN_SECRET_KEY="sk1_..."
Get your API keys from the Porkbun API Access page.
Read-Only Mode (Default)
By default, porkbun-mcp runs in read-only mode for safety. Write operations (create, edit, delete) will return an error until explicitly enabled.
Enabling Write Operations
To let the pig get muddy and make changes:
Environment variable:
export PORKBUN_GET_MUDDY=true
CLI flag:
uvx porkbun-mcp --get-muddy
Usage
Run directly with uvx (no installation required):
uvx porkbun-mcp
SSE transport
uvx porkbun-mcp --transport sse
MCP Client Configuration
Claude Desktop
Add to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"porkbun": {
"command": "uvx",
"args": ["porkbun-mcp", "--get-muddy"],
"env": {
"PORKBUN_API_KEY": "pk1_...",
"PORKBUN_SECRET_KEY": "sk1_..."
}
}
}
}
Note: Remove
--get-muddyfrom args for read-only mode (recommended for safety).
Claude Code / Codex
Add to ~/.claude/settings.json:
{
"mcpServers": {
"porkbun": {
"command": "uvx",
"args": ["porkbun-mcp", "--get-muddy"],
"env": {
"PORKBUN_API_KEY": "pk1_...",
"PORKBUN_SECRET_KEY": "sk1_..."
}
}
}
}
VS Code
Add to .vscode/mcp.json in your workspace (or use MCP: Add Server command):
{
"servers": {
"porkbun": {
"command": "uvx",
"args": ["porkbun-mcp", "--get-muddy"],
"env": {
"PORKBUN_API_KEY": "pk1_...",
"PORKBUN_SECRET_KEY": "sk1_..."
}
}
}
}
OpenCode
Add to your opencode.json configuration:
{
"mcp": {
"porkbun": {
"type": "local",
"command": ["uvx", "porkbun-mcp", "--get-muddy"],
"environment": {
"PORKBUN_API_KEY": "pk1_...",
"PORKBUN_SECRET_KEY": "sk1_..."
}
}
}
}
Available Tools
DNS
dns_list- List all DNS records for a domaindns_get- Get a specific DNS record by IDdns_get_by_name_type- Get DNS records by subdomain and typedns_create- Create a new DNS recorddns_edit- Edit a DNS record by IDdns_edit_by_name_type- Edit DNS records by subdomain and typedns_delete- Delete a DNS record by IDdns_delete_by_name_type- Delete DNS records by subdomain and type
Domains
domains_list- List all domains in your accountdomains_get_nameservers- Get nameservers for a domaindomains_update_nameservers- Update nameservers for a domaindomains_get_url_forwards- Get URL forwarding rulesdomains_add_url_forward- Add a URL forwarding ruledomains_delete_url_forward- Delete a URL forwarding ruledomains_check_availability- Check domain availability and pricingdomains_get_glue_records- Get glue records for a domain
DNSSEC
dnssec_list- List DNSSEC records for a domaindnssec_create- Create a DNSSEC recorddnssec_delete- Delete a DNSSEC record
SSL
ssl_retrieve- Retrieve the SSL certificate bundle for a domain
Pricing
pricing_get- Get pricing for all available TLDs
Utility
ping- Test API connectivity and get your public IP
Prompts
Pre-defined workflows to guide common DNS operations:
dns_setup- Set up basic DNS for a new server (root A + www records)dns_audit- Audit DNS configuration for issues (duplicates, missing email records, low TTLs)email_dns_setup- Configure email DNS (MX, SPF, DKIM, DMARC)update_server_ip- Update DNS records when migrating to a new server IPsubdomain_setup- Create A/CNAME records for a new subdomain
Development
# Install dependencies
uv sync --dev
# Run all checks
make check
# Individual commands
make lint # ruff check
make format # ruff format
make typecheck # ty check
make test # pytest with coverage
License
MIT
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-1.1.1.tar.gz.
File metadata
- Download URL: porkbun_mcp-1.1.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cfa94eba1f4b357c28e0339891ce46a2e981ca084264927f95195aa87638388
|
|
| MD5 |
024185575fc76fec1ac33974ce24ce75
|
|
| BLAKE2b-256 |
c52385889ecbfafca256c57fb9a6f316eb85b8d13ee90d837c2025e30ba337c2
|
Provenance
The following attestation bundles were made for porkbun_mcp-1.1.1.tar.gz:
Publisher:
release.yml on major/porkbun-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
porkbun_mcp-1.1.1.tar.gz -
Subject digest:
1cfa94eba1f4b357c28e0339891ce46a2e981ca084264927f95195aa87638388 - Sigstore transparency entry: 847042684
- Sigstore integration time:
-
Permalink:
major/porkbun-mcp@aad474c265223ff25b75c9af6a0b68b5caa5c0a8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/major
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aad474c265223ff25b75c9af6a0b68b5caa5c0a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file porkbun_mcp-1.1.1-py3-none-any.whl.
File metadata
- Download URL: porkbun_mcp-1.1.1-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af565e80d23104224d9213863f12d92eed1d716be41011684caa99f7cfaee2d7
|
|
| MD5 |
877bd5a8578520d4b6fee868a3cb31e5
|
|
| BLAKE2b-256 |
28bb2d26100ed5266557b02bcb5cccdb539dc4bcafb25860690accb4dd12320e
|
Provenance
The following attestation bundles were made for porkbun_mcp-1.1.1-py3-none-any.whl:
Publisher:
release.yml on major/porkbun-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
porkbun_mcp-1.1.1-py3-none-any.whl -
Subject digest:
af565e80d23104224d9213863f12d92eed1d716be41011684caa99f7cfaee2d7 - Sigstore transparency entry: 847042724
- Sigstore integration time:
-
Permalink:
major/porkbun-mcp@aad474c265223ff25b75c9af6a0b68b5caa5c0a8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/major
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aad474c265223ff25b75c9af6a0b68b5caa5c0a8 -
Trigger Event:
push
-
Statement type: