Your AI agent can write code, browse the web, and orchestrate complex workflows — but ask it to register a domain name and it hits a wall. Domain registrars are built for humans: CAPTCHAs, dashboards, forms, credit card fields. Not exactly agent-friendly.
That's why we built AgentDomain — a domain registration API and MCP server designed specifically for AI agents. Your agent searches for available domains, checks prices, funds a wallet, and registers a domain. All through a single API call.
In this tutorial, you'll go from zero to having your agent register a real domain name.
What You'll Build
By the end of this article, your AI agent will be able to:
- 🔍 Search for available domain names across TLDs
- 💰 Maintain a prepaid wallet for domain purchases
- 🌐 Register domains autonomously via API
- 📡 Manage DNS records programmatically
- 🏠 Claim a free
*.agentfolio.devsubdomain
Prerequisites
- Python 3.10+ or any MCP-compatible client (Claude Desktop, Cursor, etc.)
- An AgentDomain account (free tier available)
- 5 minutes
Step 1: Let Your Agent Create Its Own Account
No manual registration needed. Your agent creates its own account through the MCP server:
"Create an AgentDomain account for me with my email and billing info"
The agent calls the register tool, gets back its API key, and stores it. No dashboard, no forms, no human in the loop.
If you'd rather create the account manually, register at agentdomain.cloud and use the API key directly.
Step 2: Install the MCP Server
The AgentDomain MCP server connects your AI agent to our domain registration API. Install it with:
# With uvx (recommended)
uvx agentdomain-mcp
# Or with pip
pip install agentdomain-mcp
Claude Desktop Configuration
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"agentdomain": {
"command": "uvx",
"args": ["agentdomain-mcp"],
"env": {
"AGENTDOMAIN_API_URL": "https://api.agentdomain.cloud",
"AGENTDOMAIN_API_KEY": "da_your_api_key_here"
}
}
}
}
Cursor / Windsurf Configuration
Add to your MCP settings:
{
"mcpServers": {
"agentdomain": {
"command": "uvx",
"args": ["agentdomain-mcp"],
"env": {
"AGENTDOMAIN_API_URL": "https://api.agentdomain.cloud",
"AGENTDOMAIN_API_KEY": "da_your_api_key_here"
}
}
}
}
Step 3: Fund Your Wallet
Domain registration costs money. Fund your wallet via the API or dashboard:
# Check balance
curl -H "Authorization: Bearer *** \
https://api.agentdomain.cloud/v1/wallet/balance
# Create a top-up session ($20)
curl -X POST https://api.agentdomain.cloud/v1/wallet/topup \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{"amount_cents": 2000}'
This creates a Stripe checkout session. Complete it and your wallet is funded.
Step 4: Let Your Agent Register a Domain
Now the fun part. Open Claude Desktop (or your MCP client) and say:
"Create an AgentDomain account, fund $20, search for available .dev and .ai domains related to my project, and register the best one"
Your agent will:
-
Register —
register(email, password, billing)→ gets API key -
Fund wallet —
wallet_topup(amount_cents=2000)→ Stripe checkout -
Search —
domain_search(query: "my-project", tlds: ["dev", "ai"]) -
Check —
domain_check(domain: "myproject.dev") -
Register —
domain_buy(domain: "myproject.dev")
From zero to a live domain. No human in the loop.
Step 5: Manage DNS
Once registered, your agent can configure DNS records:
# Via API
curl -X GET https://api.agentdomain.cloud/v1/domains/YOUR_DOMAIN_ID/dns \
-H "Authorization: Bearer *** Update a record
curl -X PUT https://api.agentdomain.cloud/v1/domains/YOUR_DOMAIN_ID/dns \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{
"record_id": "abc123",
"type": "A",
"name": "@",
"content": "192.168.1.1",
"ttl": 3600
}'
Or let your agent do it through the MCP:
"Point mydomain.dev to 203.0.113.42"
Bonus: Free Subdomain with Agentfolio
Every registered agent gets a free *.agentfolio.dev subdomain. Claim yours:
curl -X POST https://api.agentdomain.cloud/v1/subdomains/claim \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{"subdomain": "my-agent"}'
Your agent is now live at my-agent.agentfolio.dev.
The Full Tool List
The MCP server exposes 15 tools:
| Tool | Description |
|---|---|
register |
Create a new account |
login |
Get a JWT token |
account_info |
View account details |
domain_search |
Search for domains across TLDs |
domain_check |
Check if a specific domain is available |
domain_buy |
Register a domain |
domain_list |
List your registered domains |
domain_dns_get |
Get DNS records for a domain |
domain_dns_update |
Update a DNS record |
domain_transfer |
Transfer a domain in |
wallet_balance |
Check wallet balance |
wallet_topup |
Create a payment session |
wallet_transactions |
View transaction history |
claim_subdomain |
Claim a free *.agentfolio.dev subdomain |
check_subdomain |
Check subdomain availability |
How It Works Under the Hood
AgentDomain acts as a Cloudflare Registrar reseller. When your agent registers a domain:
- Auth hold — Funds are held (not charged) on your wallet
- Registration — Domain is registered via Cloudflare's registrar API
- Capture — Funds are captured on successful registration
- Release — If registration fails, funds are released back
This means your agent never pays for a domain that fails to register.
What's Next
We're building toward a future where AI agents are first-class citizens on the internet. Domain registration is just the beginning.
Try it now: agentdomain.cloud · GitHub · MCP Registry
AgentDomain is an open-source MCP server for domain registration. Your agent creates its own account, funds its wallet, and registers domains — fully autonomous.
Top comments (0)