Provides comprehensive domain and DNS management capabilities through the Porkbun API, including domain registration checks, DNS record operations (A, AAAA, CNAME, MX, TXT, etc.), URL forwarding setup, nameserver management, glue records, DNSSEC configuration, and SSL certificate retrieval.
Porkbun MCP Server
A production-ready Model Context Protocol (MCP) server that exposes the complete Porkbun domain and DNS management API to AI assistants like Claude and LibreChat.
Features
27 MCP Tools providing comprehensive Porkbun API access:
Authentication & General (2 tools)
porkbun_ping- Test API connectivity and get your IPporkbun_get_pricing- Get domain pricing for all TLDs
Domain Management (4 tools)
porkbun_list_domains- List all domains in accountporkbun_check_domain- Check domain availabilityporkbun_update_nameservers- Update nameservers at registryporkbun_get_nameservers- Get current nameservers
URL Forwarding (3 tools)
porkbun_add_url_forward- Create URL redirects (301/302)porkbun_get_url_forwarding- List URL forwardsporkbun_delete_url_forward- Delete URL forwards
Glue Records (4 tools)
porkbun_create_glue_record- Create glue recordsporkbun_update_glue_record- Update glue recordsporkbun_delete_glue_record- Delete glue recordsporkbun_get_glue_records- List glue records
DNS Records (8 tools)
porkbun_create_dns_record- Create DNS records (A, AAAA, CNAME, MX, TXT, NS, SRV, etc.)porkbun_edit_dns_record- Edit DNS record by IDporkbun_edit_dns_records_by_name_type- Bulk edit by subdomain/typeporkbun_delete_dns_record- Delete DNS record by IDporkbun_delete_dns_records_by_name_type- Bulk delete by subdomain/typeporkbun_retrieve_dns_records- Get all or specific DNS recordsporkbun_retrieve_dns_records_by_name_type- Get records by subdomain/type
DNSSEC (3 tools)
porkbun_create_dnssec_record- Create DNSSEC recordsporkbun_get_dnssec_records- List DNSSEC recordsporkbun_delete_dnssec_record- Delete DNSSEC records
SSL Certificates (1 tool)
porkbun_retrieve_ssl_bundle- Get SSL certificate bundle
Quick Start
Prerequisites
Docker and Docker Compose
Porkbun API credentials from porkbun.com/account/api
API access must be enabled for your domains in the Porkbun dashboard
Installation
Clone the repository:
Create environment configuration:
Edit
Build and start the server:
Verify the server is running:
Configuration
Environment Variables
Variable | Required | Default | Description |
| Yes | - | Your Porkbun API key |
| Yes | - | Your Porkbun secret API key |
| No |
| Porkbun API base URL |
| No |
| Request timeout in seconds |
| No |
| MCP server port |
Getting Porkbun API Credentials
Log in to your Porkbun account
Go to API Access
Create API keys
Enable API access for the domains you want to manage
MCP Client Configuration
LibreChat Configuration
Method 1: Environment Variable
Add to your LibreChat .env file:
Method 2: Configuration File
Add to librechat.yaml:
Claude Desktop Configuration
Add to claude_desktop_config.json:
Location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Configuration:
Usage Examples
Example Conversations with AI Assistant
Check domain availability:
List domains:
Create DNS record:
Set up URL forwarding:
View DNS records:
API Documentation
Once the server is running, access:
OpenAPI Documentation: http://localhost:8000/docs
OpenAPI JSON: http://localhost:8000/porkbun/openapi.json
Health Check: http://localhost:8000/health
Server Info: http://localhost:8000/
Development
Project Structure
Makefile Commands
Running Without Docker
Logging
Logs are written to:
Console: Docker logs (view with
make logs)File:
porkbun_mcp.log(inside container)
Log format:
Sensitive data (API keys) are automatically masked in logs.
Security Best Practices
Never commit - It contains your API credentials
Restrict CORS in production - Update
allow_originsinsrc/main.pyUse HTTPS in production - Deploy behind a reverse proxy with SSL
Rotate API keys regularly - Generate new keys at porkbun.com/account/api
Monitor API usage - Check Porkbun dashboard for unusual activity
Enable 2FA - Protect your Porkbun account with two-factor authentication
Troubleshooting
Server won't start
Check logs:
Common issues:
Missing API credentials in
.envPort 8000 already in use (change
MCP_PORTin.env)Invalid API keys (verify at porkbun.com/account/api)
API calls fail
Check API access:
Verify API access is enabled for your domains in Porkbun dashboard
Test with ping endpoint:
curl http://localhost:8000/porkbun/mcpCheck that API keys have correct permissions
MCP client can't connect
LibreChat:
Verify
type: streamable-http(nottransport)Check URL matches server:
http://localhost:8000/porkbun/mcpRestart LibreChat after configuration changes
Claude Desktop:
Verify
transport: httpin configCheck URL is accessible from Claude Desktop
Restart Claude Desktop after configuration changes
Rate Limits
Porkbun API has rate limits:
Domain checks: Limited (rate limit info returned in response)
Other operations: Generally generous limits
The server will return error messages if rate limits are exceeded.
Architecture
This MCP server follows the three-layer architecture pattern:
MCP Transport Layer - FastAPI with
fastapi_mcpfor Streamable HTTPFastAPI Application Layer - RESTful endpoints with Pydantic validation
External API Client Layer - Async
httpxclient for Porkbun API
Key Technologies
FastAPI - Modern async web framework
fastapi_mcp - MCP protocol integration
httpx - Async HTTP client
Pydantic - Configuration and validation
uvicorn - ASGI server
Docker - Containerization
Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
MIT License - see LICENSE file for details.
Copyright (c) 2025 Myroslav Tryhubets
Changelog
Version 1.0.0 (2025-10-29)
Initial release with 27 MCP tools:
Complete Porkbun API coverage
Domain management
DNS record operations
URL forwarding
Glue records
DNSSEC support
SSL certificate retrieval
Docker deployment
LibreChat and Claude Desktop support
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables comprehensive domain and DNS management through the Porkbun API, including domain registration checks, DNS record operations, URL forwarding, DNSSEC configuration, and SSL certificate management. Provides 27 tools for complete domain administration through natural language interactions.