# Porkbun MCP

> Porkbun gives your agent full control over every domain and DNS record you own. You can list all registered domains, check pricing for new TLDs, create or delete specific DNS records (A, MX, CNAME), and retrieve SSL bundles—all without ever logging into the web console. It’s a direct API connection that lets your AI client manage your entire digital infrastructure via natural conversation.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** domain-registration, dns-management, ssl-certificates, tld-pricing, devops

## Description

You're giving your agent full control over every domain and DNS record you own through Porkbun. Forget logging into a web console or messing with complex APIs—your AI client handles it all just by talking to you. It acts like a dedicated admin panel, letting you manage your whole digital life in one chat window.

**Checking Your Domain Assets**

Need to know what domains you've got registered? You can pull up a complete list of every domain currently managed under your account using the `list_domains` tool. If you hear whispers about squatters or want to expand, you can check if any specific domain name is available for immediate registration with `check_domain_availability`. Before you commit, you'll also get current registration and renewal pricing info for supported Top-Level Domains (TLDs) via `get_domain_pricing`.

**DNS Record Control: Build It or Break It**

You never have to manually type out complex record structures again. The agent lets you manage all types of DNS records—A, MX, CNAME, and TXT—for any domain you own. You can add a brand new record using `create_dns_record`. If something changes on the fly, tell it to modify an existing entry; that's what `edit_dns_record` does. And if a record is garbage or no longer needed? Just point it out, and the agent deletes it with `delete_dns_record`. 

To audit everything—like figuring out why a site isn't resolving properly—you can use `retrieve_dns_records`. This tool gathers and displays every single existing DNS record for one specific domain name. It gives you a full picture of your setup.

**Security & Certificates**

For security, the agent handles SSL certificates. You can download the necessary bundle files required for SSL certs tied to your domains using `retrieve_ssl_bundle`. This means no more manual downloads or hunting down certificate keys—it brings them straight to you.

Your AI client uses these tools to execute everything instantly when you talk to it, letting you manage domain registration, DNS records, and security assets without touching a dashboard.

## Tools

### check_domain_availability
Checks if a specific domain name is available for immediate registration.

### create_dns_record
Adds a new DNS record (A, MX, CNAME, TXT) to a specified domain.

### delete_dns_record
Removes an existing DNS record from a specific domain.

### edit_dns_record
Modifies the value or type of an already existing DNS record.

### get_domain_pricing
Retrieves current registration and renewal pricing information for domain extensions.

### list_domains
Pulls a complete list of all domains currently managed in the user's account.

### retrieve_dns_records
Gathers and displays every DNS record for one specified domain name, useful for auditing.

### retrieve_ssl_bundle
Downloads the necessary SSL certificate bundle files for a given domain.

## Prompt Examples

**Prompt:** 
```
List all domains in my Porkbun account.
```

**Response:** 
```
I've retrieved your domain list. You currently have 3 domains: 'myawesomeapp.com', 'dev-testing.net', and 'portfolio.io'. Which one would you like to manage?
```

**Prompt:** 
```
Add a TXT record to 'example.com' with the value 'v=spf1 include:_spf.google.com ~all'.
```

**Response:** 
```
I've successfully created the TXT record for 'example.com'. The record has been added with the SPF value provided. It may take some time to propagate globally.
```

**Prompt:** 
```
Check the pricing for .com and .net domains.
```

**Response:** 
```
Fetching current Porkbun pricing... For .com domains, the registration/renewal price is $10.37/year. For .net domains, it is $11.48/year. Would you like to check availability for a specific name?
```

## Capabilities

### Check Domain Availability
Verifies if a specific domain name is available for registration.

### Manage DNS Records
Creates, edits, and deletes all common types of DNS records (A, MX, CNAME, TXT) for your domains.

### List Domain Assets
Retrieves a complete list of every domain currently registered under your Porkbun account.

### Get Pricing Info
Looks up current registration and renewal pricing for supported Top-Level Domains (TLDs).

### Retrieve DNS Records
Pulls a full list of all existing records associated with one specific domain name.

### Get SSL Certificates
Retrieves the necessary bundle files for SSL certificates tied to your domains.

## Use Cases

### Setting up a new client site.
A developer needs to set up three subdomains for a new client. Instead of visiting the Porkbun console multiple times, they prompt their agent: 'I need A records for dev.client.com and staging.client.com.' The agent runs `create_dns_record` twice in sequence, confirming both entries instantly.

### Auditing a complex site migration.
An ops engineer suspects DNS settings are wrong after a migration. They ask the agent to 'Show me all records for example.com.' The agent runs `retrieve_dns_records`, providing a clean, consolidated list so the engineer can spot the incorrect entry.

### Acquiring domain names in bulk.
A domain investor needs to check 20 potential TLDs and see their cost. They ask the agent to 'Check pricing for .info, .xyz, and .store.' The agent uses `get_domain_pricing` repeatedly, giving a quick price comparison list.

### Cleaning up old records.
A developer finished a test project and needs to remove associated DNS records. They tell the agent: 'Delete all TXT records for old-test.net.' The agent uses `delete_dns_record` efficiently, preventing configuration clutter.

## Benefits

- Stop logging into separate web consoles. You can list all your assets using `list_domains` and manage them—from creating a record to retrieving the SSL bundle—all through one conversation with your AI agent.
- Immediate domain checks are critical. Use `check_domain_availability` before you commit to a project name, then use `get_domain_pricing` to confirm costs instantly.
- DNS changes happen fast. Instead of manually building record types and values, just tell the agent what you need (e.g., 'I need an MX record for my main site'), and it runs `create_dns_record` correctly.
- Troubleshooting is faster. If a domain isn't resolving, use `retrieve_dns_records` to pull up all current settings immediately, bypassing the visual clutter of the web interface.
- It covers the whole lifecycle. You can check pricing with `get_domain_pricing`, list your entire portfolio with `list_domains`, and then update records using `edit_dns_record`—a complete workflow in chat.

## How It Works

The bottom line is that you use natural language prompts; the server handles all the API calls to Porkbun in the background.

1. You subscribe to this server and provide your Porkbun API Key and Secret Key.
2. Your AI client connects these credentials, giving it permission to interact with your domain account.
3. You prompt the agent (e.g., 'Create a TXT record for example.com'). The agent executes the necessary tool call and reports success or failure.

## Frequently Asked Questions

**How do I update an existing record using edit_dns_record?**
You tell your agent exactly what needs changing. For instance: 'Edit the A record for my site to point to 192.0.2.1.' The agent runs `edit_dns_record` and handles the syntax.

**Can I check domain availability before buying?**
Yes, use `check_domain_availability`. Just give it the name you want, and the server tells you if it's free to register. This saves time on guesswork.

**What is the difference between list_domains and retrieve_dns_records?**
`list_domains` shows every domain you own (the names). `retrieve_dns_records` drills down into one specific domain to show all its technical records (A, MX, CNAME, etc.).

**Does Porkbun MCP Server handle multiple record types?**
Yes. The system supports creating and managing common types like A, MX, CNAME, TXT, and more through the `create_dns_record` tool.

**What does the `retrieve_ssl_bundle` tool actually give me?**
It pulls the actual SSL certificate files for a given domain. This function retrieves the full bundle needed for deployment, not just a link to it. It's essential when you need the raw keys and certificates for your application.

**If I want to check prices for many different extensions, how do I use `get_domain_pricing`?**
You provide the list of TLDs or specific domains in the prompt. The tool returns current registration and renewal pricing data for those extensions. This helps you compare costs across various top-level domains before purchasing.

**What are the risks when running `delete_dns_record`?**
Deleting a DNS record is permanent and immediate. You must confirm exactly which record (A, CNAME, MX, etc.) you want to remove from the specified domain. Double-check your records before executing this command.

**Before running any commands like `list_domains`, what credentials do I need?**
You must provide your Porkbun API Key and Secret Key when setting up the connection. These are required to authenticate your AI agent with your account, allowing it to read and write data from your domain portfolio.

**Can I see all DNS records for a domain at once?**
Yes! Use the `retrieve_dns_records` tool with your domain name. It will return a complete list of all active records including A, CNAME, MX, and TXT entries.

**Is it possible to check if a domain is available for purchase?**
Absolutely. Use the `check_domain_availability` tool to query any domain name. The agent will tell you if it's available for registration.

**Can I delete a DNS record if I made a mistake?**
Yes. Use the `delete_dns_record` tool by providing the domain and the specific record ID. This will permanently remove the record from Porkbun's nameservers.