Porkbun MCP

平台与服务

by korobkov-v

面向 Porkbun 域名与 DNS 管理的 MCP 服务器,可用于查询、配置和自动化相关操作。

什么是 Porkbun MCP

面向 Porkbun 域名与 DNS 管理的 MCP 服务器,可用于查询、配置和自动化相关操作。

README

porkbun-mcp

porkbun-mcp logo

MCP server for Porkbun domains and DNS.

Use it from any MCP-compatible client to inspect and manage:

  • domains and nameservers
  • DNS records
  • DNSSEC
  • SSL certificate bundle
  • URL forwarding

Built for safe operations:

  • read-only behavior by default
  • mutating tools require explicit write mode
  • scenario tools default to dry_run: true

Why This Exists

Porkbun operations are often repetitive and risky under time pressure. This project exposes Porkbun APIs as MCP tools so AI assistants can execute domain workflows consistently and with guardrails.

3-Minute Setup

1) Prerequisites

  • Node.js >=20
  • Porkbun API credentials:
    • PORKBUN_API_KEY
    • PORKBUN_SECRET_KEY
  • In Porkbun panel, the target domain must be marked as API accessible ("available via API"). Account-level keys are not enough if domain-level API access is disabled.

Where to get the keys:

  • Log in to Porkbun.
  • Open account settings and go to API Access.
  • Generate/copy:
    • PORKBUN_API_KEY (API Key)
    • PORKBUN_SECRET_KEY (Secret API Key)
  • In the domain settings, ensure API access is enabled for each domain you want to manage.

Install dependencies locally (for development):

bash
npm install
npm run build

2) Quick local run (stdio)

Read-only mode:

bash
PORKBUN_API_KEY=your_key \
PORKBUN_SECRET_KEY=your_secret \
node dist/index.js

Enable write operations:

bash
PORKBUN_API_KEY=your_key \
PORKBUN_SECRET_KEY=your_secret \
PORKBUN_GET_MUDDY=true \
node dist/index.js --get-muddy

3) Verify CLI wiring

bash
node dist/index.js --help

MCP Client Integrations

GitHub README does not support native tabs, so this section uses collapsible "tab-like" blocks. If you later move docs to a docs site (Docusaurus/Nextra), you can reuse the same snippets as real tabs.

Base server snippet (safe read-only)

json
{
  "porkbun-mcp": {
    "command": "npx",
    "args": ["-y", "porkbun-mcp"],
    "env": {
      "PORKBUN_API_KEY": "your_porkbun_api_key",
      "PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
    }
  }
}
<details> <summary><strong>Cursor</strong></summary>

Add an MCP server in Cursor settings and paste the snippet above as a server config. If your setup expects an outer object, wrap it into:

json
{
  "mcpServers": {
    "porkbun-mcp": {
      "command": "npx",
      "args": ["-y", "porkbun-mcp"],
      "env": {
        "PORKBUN_API_KEY": "your_porkbun_api_key",
        "PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
      }
    }
  }
}
</details> <details> <summary><strong>Claude Desktop (macOS)</strong></summary>

Update ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{
  "mcpServers": {
    "porkbun-mcp": {
      "command": "npx",
      "args": ["-y", "porkbun-mcp"],
      "env": {
        "PORKBUN_API_KEY": "your_porkbun_api_key",
        "PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
      }
    }
  }
}
</details> <details> <summary><strong>Other MCP clients (Windsurf, Cline, etc.)</strong></summary>

Most clients use the same mcpServers shape:

json
{
  "mcpServers": {
    "porkbun-mcp": {
      "command": "npx",
      "args": ["-y", "porkbun-mcp"],
      "env": {
        "PORKBUN_API_KEY": "your_porkbun_api_key",
        "PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
      }
    }
  }
}
</details>

Write mode with npx

json
{
  "mcpServers": {
    "porkbun-mcp": {
      "command": "npx",
      "args": ["-y", "porkbun-mcp", "--get-muddy"],
      "env": {
        "PORKBUN_API_KEY": "your_porkbun_api_key",
        "PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
      }
    }
  }
}

Domain create enabled (dangerous)

json
{
  "mcpServers": {
    "porkbun-mcp": {
      "command": "npx",
      "args": ["-y", "porkbun-mcp", "--get-muddy", "--enable-domain-create"],
      "env": {
        "PORKBUN_API_KEY": "your_porkbun_api_key",
        "PORKBUN_SECRET_KEY": "your_porkbun_secret_api_key"
      }
    }
  }
}

Important (Porkbun API domain registration prerequisites):

  • Your Porkbun account must have registered at least one domain in the past (for new accounts, the first purchase may need to be done via the web UI).
  • Your email address and phone number must be verified.
  • You must have enough account credit (API registrations are billed from account credit).
  • cost must be provided in pennies and must match the value returned by the domain check (minimum duration * price).
  • You must explicitly accept terms (agree_to_terms=true in this server, which maps to agreeToTerms="yes" for Porkbun).

Reference:

First Successful Call

Once configured in your MCP client, start with:

  • ping
  • pricing_get

Then try one read flow:

  • dns_list for your domain

Before any write call, run a scenario tool in dry_run mode first.

Safety Model

  • Write actions are blocked unless --get-muddy or PORKBUN_GET_MUDDY=true is set.
  • Scenario tools are designed to plan before apply.
  • Destructive tools include explicit limits and confirmations.
  • API credentials are account-level. Domain-level API permissions in Porkbun still apply.
  • Domain registration (domains_create) is disabled by default. It requires:
    • write mode (--get-muddy)
    • explicit enable flag (--enable-domain-create or PORKBUN_ENABLE_DOMAIN_CREATE=true)
    • dry_run=false + confirm_apply=true + agree_to_terms=true

Environment Variables

  • PORKBUN_API_KEY (required)
  • PORKBUN_SECRET_KEY (required)
  • PORKBUN_GET_MUDDY (optional)
  • PORKBUN_ENABLE_DOMAIN_CREATE (optional, dangerous)

CLI Options

  • --get-muddy
  • --enable-domain-create (dangerous)
  • --transport stdio
  • --ipv4-only-api
  • --help

What --get-muddy Means

--get-muddy enables write mode.

Without it, the server stays in safe read-only behavior. With it, mutating tools are allowed (create/edit/delete/update operations for DNS and domain settings).

Use this mode only when:

  • you are ready to apply real infrastructure changes
  • your domain is API-enabled in Porkbun
  • you have already validated the plan with read calls or dry_run flows

Tool Coverage

  • Connectivity: ping, pricing_get
  • Domains: list, nameservers, URL forwarding, glue records (get/create/update/delete), availability
  • DNS: list/get/create/edit/delete (including by name/type)
  • DNSSEC: list/create/delete
  • SSL: certificate bundle retrieval

Scenario tools:

  • dns_query
  • dns_upsert
  • domain_health_check
  • dns_remove
  • domain_redirect_ensure
  • domain_cutover_web
  • dns_batch_apply

Beginner helpers:

  • dns_audit
  • dns_setup
  • email_dns_setup
  • update_server_ip
  • subdomain_setup

Detailed docs: docs/scenario-tools.md

Practical Examples

dns_query by record id:

json
{
  "domain": "example.com",
  "selector": {
    "record_id": "123456789"
  }
}

dns_upsert plan mode:

json
{
  "domain": "example.com",
  "match": {
    "type": "A",
    "subdomain": "www"
  },
  "target": {
    "content": "203.0.113.10",
    "ttl": 300
  },
  "dry_run": true
}

domains_check_bulk:

json
{
  "domains": ["example.com", "example.net", "example.org"],
  "concurrency": 1,
  "respect_limits": true,
  "delay_ms": 11000,
  "stop_on_rate_limit": true
}

dns_batch_apply plan:

json
{
  "domain": "example.com",
  "desired_records": [
    {
      "type": "A",
      "subdomain": "",
      "content": "198.51.100.42",
      "ttl": 300
    }
  ],
  "mode": "plan",
  "strategy": "merge",
  "max_changes": 5
}

Security Notes

  • Never commit real API keys to git.
  • Prefer local environment variables or a secret manager.
  • Treat write mode as production access.

Development

bash
npm install
npm run build

Run locally:

bash
npm run dev

Contributing

Contributions are welcome. Read CONTRIBUTING.md before opening a PR.

License

MIT

常见问题

Porkbun MCP 是什么?

面向 Porkbun 域名与 DNS 管理的 MCP 服务器,可用于查询、配置和自动化相关操作。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描114.1k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描114.1k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描10.2k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.4k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.4k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
35.4k

评论