Skip to main content

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.

CI codecov PyPI version Python 3.13+ License: MIT

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.

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"],
      "env": {
        "PORKBUN_API_KEY": "pk1_...",
        "PORKBUN_SECRET_KEY": "sk1_..."
      }
    }
  }
}

Claude Code / Codex

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "porkbun": {
      "command": "uvx",
      "args": ["porkbun-mcp"],
      "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"],
      "env": {
        "PORKBUN_API_KEY": "pk1_...",
        "PORKBUN_SECRET_KEY": "sk1_..."
      }
    }
  }
}

OpenCode

Add to your opencode.json configuration:

{
  "mcp": {
    "porkbun": {
      "type": "local",
      "command": ["uvx", "porkbun-mcp"],
      "environment": {
        "PORKBUN_API_KEY": "pk1_...",
        "PORKBUN_SECRET_KEY": "sk1_..."
      }
    }
  }
}

Available Tools

DNS

  • dns_list - List all DNS records for a domain
  • dns_get - Get a specific DNS record by ID
  • dns_get_by_name_type - Get DNS records by subdomain and type
  • dns_create - Create a new DNS record
  • dns_edit - Edit a DNS record by ID
  • dns_edit_by_name_type - Edit DNS records by subdomain and type
  • dns_delete - Delete a DNS record by ID
  • dns_delete_by_name_type - Delete DNS records by subdomain and type

Domains

  • domains_list - List all domains in your account
  • domains_get_nameservers - Get nameservers for a domain
  • domains_update_nameservers - Update nameservers for a domain
  • domains_get_url_forwards - Get URL forwarding rules
  • domains_add_url_forward - Add a URL forwarding rule
  • domains_delete_url_forward - Delete a URL forwarding rule
  • domains_check_availability - Check domain availability and pricing
  • domains_get_glue_records - Get glue records for a domain

DNSSEC

  • dnssec_list - List DNSSEC records for a domain
  • dnssec_create - Create a DNSSEC record
  • dnssec_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

Resources

Browse data via MCP resources:

  • porkbun://domains - List all domains
  • porkbun://dns/{domain} - DNS records for a domain
  • porkbun://ssl/{domain} - SSL certificate bundle for a domain
  • porkbun://pricing - TLD pricing information

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 IP
  • subdomain_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

porkbun_mcp-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

porkbun_mcp-0.1.0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file porkbun_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: porkbun_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for porkbun_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4894f64de81e498128e9519f1e4edd8a0a2eef34ef50d32c0a5ea4ea74ef67a6
MD5 ef0bc188130f991248cedda3f5f91c38
BLAKE2b-256 d941726419831f0600e6cce5ed7cf776e5fad0a9add22161d6ddeb28813e351d

See more details on using hashes here.

Provenance

The following attestation bundles were made for porkbun_mcp-0.1.0.tar.gz:

Publisher: release.yml on major/porkbun-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file porkbun_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: porkbun_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for porkbun_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb9af8afb2a80c35f2a6af57760e2c338956f770f758c894daa6d18f6621630e
MD5 9cfd1289ea2fc7697dd8b9cbc8bbeec0
BLAKE2b-256 c3ce3a20d28b6edef443b35fa8372c5b2b46a7f3aaa1060f21a6c49c12a4e5a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for porkbun_mcp-0.1.0-py3-none-any.whl:

Publisher: release.yml on major/porkbun-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page