# Porkbun

This MCP server for Claude Code manages domains and DNS through a Porkbun account. It handles requests to register a domain, configure mail, or publish a static site.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5 repo stars
- Author: foreverworks
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/foreverworks/mcps/tree/HEAD/servers/porkbun
- Updated: 2026-10-29
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/porkbun

## What it does

The server can search for and register domains, edit DNS and DNSSEC records, publish static sites, and configure mailboxes or webhooks. It also supports domain and DNS transfers, invoice lookup, and saving files.

A Porkbun account, two API keys stored in separate files, and API access for the domains are required. The package runs on Node 22.19 or newer. File-producing tools need an output directory for items such as invoices, DNS exports, certificates, and mailbox passwords; without it, those tools return a configuration error. Purchases and other charge-related actions ask for confirmation, and requests over the monthly API limit are rejected before reaching Porkbun.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `PORKBUN_API_KEY_FILE`, `PORKBUN_SECRET_API_KEY_FILE`, `PORKBUN_OUTBOX_DIR`, `PORKBUN_TOOLSETS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env PORKBUN_API_KEY_FILE=<PORKBUN_API_KEY_FILE> --env PORKBUN_SECRET_API_KEY_FILE=<PORKBUN_SECRET_API_KEY_FILE> --env PORKBUN_OUTBOX_DIR=<PORKBUN_OUTBOX_DIR> --env PORKBUN_TOOLSETS=<PORKBUN_TOOLSETS> --transport stdio porkbun -- npx -y @foreverworks/mcp-porkbun
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add porkbun --env PORKBUN_API_KEY_FILE=<PORKBUN_API_KEY_FILE> --env PORKBUN_SECRET_API_KEY_FILE=<PORKBUN_SECRET_API_KEY_FILE> --env PORKBUN_OUTBOX_DIR=<PORKBUN_OUTBOX_DIR> --env PORKBUN_TOOLSETS=<PORKBUN_TOOLSETS> -- npx -y @foreverworks/mcp-porkbun
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "porkbun": {
            "command": "npx",
            "args": [
                "-y",
                "@foreverworks/mcp-porkbun"
            ],
            "env": {
                "PORKBUN_API_KEY_FILE": "<PORKBUN_API_KEY_FILE>",
                "PORKBUN_SECRET_API_KEY_FILE": "<PORKBUN_SECRET_API_KEY_FILE>",
                "PORKBUN_OUTBOX_DIR": "<PORKBUN_OUTBOX_DIR>",
                "PORKBUN_TOOLSETS": "<PORKBUN_TOOLSETS>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "porkbun": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@foreverworks/mcp-porkbun"
            ],
            "env": {
                "PORKBUN_API_KEY_FILE": "<PORKBUN_API_KEY_FILE>",
                "PORKBUN_SECRET_API_KEY_FILE": "<PORKBUN_SECRET_API_KEY_FILE>",
                "PORKBUN_OUTBOX_DIR": "<PORKBUN_OUTBOX_DIR>",
                "PORKBUN_TOOLSETS": "<PORKBUN_TOOLSETS>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e PORKBUN_API_KEY_FILE=<PORKBUN_API_KEY_FILE> -e PORKBUN_SECRET_API_KEY_FILE=<PORKBUN_SECRET_API_KEY_FILE> -e PORKBUN_OUTBOX_DIR=<PORKBUN_OUTBOX_DIR> -e PORKBUN_TOOLSETS=<PORKBUN_TOOLSETS> porkbun npx -y @foreverworks/mcp-porkbun
```
Replace <…> with your own values

## When to use it
- check whether a domain is available and register it
- edit DNS records or DNSSEC settings
- publish a static site through Porkbun
- save an invoice or DNS zone export to a file
- configure a mailbox or webhook

## Example prompts
- Check which of my domains expire soon and where auto-renewal is off.
- See whether the domain is available and register it if it costs under $15 per year.
- Save last month's Porkbun invoice as a PDF.

## Similar
- [Porkbun (official)](https://affpapa.org/en/nevibecode/mcp/porkbun-official.md) — MCP server · ★ 37 repo stars
- [Porkbun DNS 🐷](https://affpapa.org/en/nevibecode/mcp/porkbun-dns.md) — MCP server · ★ 23 repo stars
- [pp-domain-goat](https://affpapa.org/en/nevibecode/skills/pp-domain-goat.md) — skill · 135 installs
- [CustomDomain™](https://affpapa.org/en/nevibecode/mcp/customdomain.md) — MCP server · ★ 1 repo stars
- [Name.ai MCP Server](https://affpapa.org/en/nevibecode/mcp/nameai-mcp-server.md) — MCP server
- [convex-domains](https://affpapa.org/en/nevibecode/skills/convex-domains.md) — skill · 43800 installs

From the same set: [foreverworks/mcps](https://affpapa.org/en/nevibecode/by/foreverworks/mcps.md) — 15 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
