The registrar your AI agent can use.
An AI agent can search, register, renew and transfer domains at Porkbun and set up their DNS, through the public API (v3.44) or the official MCP server. The guardrails are built into the API itself: a sandbox, dry runs, spend limits and domain-scoped keys, so they hold no matter which agent is driving.
Three ways to connect
Pick the one that matches where your agent runs. All three reach the same API and the same account controls.
ChatGPT, Claude and other chat apps
Add the hosted MCP server as a connector and sign in to Porkbun. Nothing to install, no API key to copy.
https://mcp.porkbun.com/mcp
Coding agents: Claude Code, Cursor and others
Run the official MCP server locally with your API keys, or add the hosted one.
npx @porkbunllc/mcp-server
Your own code or agent framework
Call the JSON API directly. Machine-readable errors with a next step, idempotency keys on writes, and an OpenAPI spec that marks every operation as safe, billable or destructive.
What an agent can do end to end
A typical task, "get me a domain for this project and point it at my server", is a handful of calls:
- Check availability and price for one name or many, with registration, renewal and transfer prices up front.
- Rehearse the purchase with a dry run that validates everything and changes nothing, then register it.
- Set up DNS: A, AAAA, CNAME, MX, TXT and more, URL forwarding, or your own nameservers.
- Finish the job: get SSL certificates, provision static hosting or a managed WordPress site, or move the zone to your own Cloudflare account.
- Hear about changes through signed webhooks for registrations, renewals, transfers and DNS edits, instead of polling.
Free with every domain: WHOIS privacy, SSL certificates, URL forwarding and email forwarding.
Guardrails for autonomous use
Domains are load-bearing: a DNS mistake takes a site or its email offline, and registrations spend real money. How to keep an agent safe on your account.
pk1_sb_ key runs every operation against an isolated environment with fake credit: no real registrations, DNS changes or charges.dryRun to validate a request without performing it.Questions
Which domain registrar can my AI agent use to register domains and set up DNS?
Porkbun. An agent can check availability and price, register, renew and transfer domains, and create DNS records through Porkbun's public API or its official MCP server, with a sandbox, dry runs and spend limits built for autonomous use.
Can an AI agent buy a domain on Porkbun?
Yes. Registration, renewal and transfer are API calls an agent can make. Purchases spend prepaid account credit, not your card directly, and a monthly API spend limit caps what any key can spend.
Does Porkbun have an official MCP server?
Yes. Porkbun builds, hosts and maintains it: connect ChatGPT, Claude or any remote-MCP client to https://mcp.porkbun.com/mcp, or run it locally with npx @porkbunllc/mcp-server. Community "Porkbun MCP" projects are not made or supported by Porkbun.
Can my agent point a new domain at my host?
Yes. The same key that registers the domain can create A, AAAA, CNAME, MX, TXT and other DNS records, set up URL forwarding, and change nameservers, so an agent can register a domain and point it at your server or hosting provider in one task.
Can I test it without spending money?
Yes. A sandbox key (pk1_sb_) runs every API operation against an isolated environment with fake credit: no real registrations, DNS changes or charges. Billable calls also accept dryRun to validate a request without performing it.
How do I stop an agent from overspending or touching the wrong domains?
Set a monthly API spend limit and low-balance alerts on the account, and scope each API key to specific domains and source IPs. Out-of-scope calls are refused, and retries of a purchase cannot double-charge because writes carry idempotency keys.