How to Buy a Domain From Claude (Cloudflare MCP, Step by Step)
Claude can search domain availability, register a name, and configure DNS — through Cloudflare's hosted MCP and the Registrar API beta that launched on 2026-04-15. This is the six-step path: choose OAuth or a Registrar-scoped token, connect the hosted server, prompt Claude to search, confirm the purchase, add DNS records, verify after propagation. Works in Claude Desktop and Claude Code.
Goal
Register a domain end-to-end from Claude
Time
~10 min (excl. propagation)
Prereq
Cloudflare account with a payment method; Claude Desktop or Claude Code
Corrected on 2026-09-29
@cloudflare/mcp-server-cloudflare from npm with a CLOUDFLARE_API_TOKEN. That package is Cloudflare's 2025 local server for Workers, KV, R2 and D1: it has no DNS record tools and no Registrar tools, and its last release was 2025-03-14. The hosted server at mcp.cloudflare.com/mcp is the one that reaches the Registrar API.Steps
Decide how Claude will authorize: OAuth, or a token with Registrar write permission
The hosted Cloudflare MCP authorizes in one of two ways. Over OAuth, the consent screen lets you pick permissions — include Cloudflare Registrar and DNS edit on the zone you will configure, nothing account-wide. With an API token, create one at dash.cloudflare.com → My Profile → API Tokens with Registrar write permission plus Zone → DNS → Edit for that zone, and hand it to the client as a bearer token. Tokens with client IP filtering are not accepted by the hosted server. Either way, skip "Account: Edit" — the agent does not need it.
Connect the hosted Cloudflare MCP to Claude
The server lives at https://mcp.cloudflare.com/mcp. In Claude Desktop on a Pro, Max, Team or Enterprise plan, add it under Settings → Connectors → Add custom connector and finish the sign-in in the browser; otherwise bridge it through mcp-remote in claude_desktop_config.json (below), then fully quit and reopen Claude. In Claude Code, run `claude mcp add --transport http cloudflare https://mcp.cloudflare.com/mcp`, then `/mcp` to sign in. Do not install `@cloudflare/mcp-server-cloudflare` from npm for this: that older local server covers Workers, KV, R2 and D1 and has no DNS or Registrar tools.
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.cloudflare.com/mcp"]
}
}
}Ask Claude to search availability
The hosted server exposes three tools — search, execute and docs — over the whole Cloudflare API. Claude searches the spec for the Registrar API endpoints on your account (domain-search and domain-check), then calls them with execute. Be specific about the TLD: the Registrar API beta covers a curated subset of Cloudflare Registrar extensions, and search results are scoped to those. If the name is taken, ask for variations with the price domain-check returns.
Use the Cloudflare MCP. Through the Registrar API on my account, check whether myapp.dev is available to register and what it costs. If it is taken, suggest five similar available names with their prices.
Confirm before Claude calls the registrations endpoint
Registration charges the account's default payment method and is non-refundable once it completes. Never let the agent register without an explicit confirmation in your prompt: make Claude restate the exact domain and the price it was quoted, and wait for a literal "yes". Most clients also prompt before an execute call that writes — leave that on.
Register myapp.dev through the Registrar API. Before you call the registrations endpoint, restate the exact domain and the price domain-check returned, and wait for me to reply "yes" before proceeding.
Add the DNS records that point the name at your site
A domain registered at Cloudflare resolves through Cloudflare's nameservers, so pointing it somewhere means records inside the zone, not a nameserver change. Ask Claude to add the CNAME or A record with the value your host gave you — most hosts show it on their custom-domain screen — and keep it "DNS only" (not proxied) unless the host says otherwise. Claude reaches the DNS records endpoints the same way: search, then execute.
On the zone myapp.dev, list the current DNS records first. Then add a CNAME for www pointing at cname.vercel-dns.com, DNS only (not proxied). Do not change any other record.
Verify after propagation, not in the same turn
Resolvers cache answers, so a record Claude re-reads five seconds after writing it can still look old. Wait a few minutes, then check from outside: `dig` on the command line, or the IntoDNS MCP's check_dns_propagation, which asks nine resolvers and shows where they disagree. If the record is wrong, ask Claude to delete and re-add it — never let it "fix" propagation it has no way to influence.
dig www.myapp.dev CNAME +short
Registration is final; transfers are not in the beta
Sample prompt to copy
Paste this into Claude after the MCP is connected. It folds search, confirmation, registration, and DNS into a single multi-turn flow.
Use the Cloudflare MCP. I want to register a domain for a new side project called "myapp". 1. Through the Registrar API, check whether myapp.dev is available and what it costs. 2. If unavailable, suggest five available alternatives (.dev, .app, .com, .net) with their prices. 3. Before calling the registrations endpoint, restate the exact domain and price, and wait for me to reply "yes". 4. After registration, list the zone's DNS records, then add a CNAME for www pointing at cname.vercel-dns.com, DNS only. Change nothing else. 5. Tell me what to verify, and when.
When it does not work
Claude says the MCP is not connected
For a custom connector, re-authorize under Settings → Connectors. For the mcp-remote bridge, check that `npx -y mcp-remote https://mcp.cloudflare.com/mcp` starts from a terminal (Node.js 18 or later), fix the entry in claude_desktop_config.json, fully quit Claude, reopen.
The credential works in the dashboard but not in Claude
It is probably missing Registrar write, or DNS edit on the zone you are configuring — or it has client IP address filtering enabled, which the hosted server does not accept. Re-create the token with exactly those scopes, or reconnect over OAuth and tick them on the consent screen.
Claude refuses to call the registrations endpoint
Some prompts trigger a safety refusal because "register" sounds like spending, which it is. Re-prompt with explicit context: "I have authorized this purchase at the quoted price. The Cloudflare MCP is connected with my Registrar permission. Register myapp.dev." Claude proceeds once the intent is unambiguous.
Claude says the TLD is not supported
The beta scopes search to API-supported extensions, a curated subset of what Cloudflare Registrar sells in the dashboard. Pick another TLD, or another registrar's server — Name.com, Porkbun, Hostinger or Vercel — and keep the same conversation pattern.
DNS verification fails immediately
Resolver caches lag by minutes to hours. Do not ask Claude to verify in the same turn — it will see stale data and try to fix what is not broken. Run dig after waiting, or ask IntoDNS to check propagation across nine resolvers.
FAQ
Does this work in Claude Code as well as Claude Desktop?
Yes. Run `claude mcp add --transport http cloudflare https://mcp.cloudflare.com/mcp`, then `/mcp` inside Claude Code to complete the OAuth sign-in (or configure a bearer token). The conversation pattern — search → confirm → register → DNS — is identical.
Does Claude actually complete the purchase, or hand me a link?
It completes it. The Registrar API beta (announced 2026-04-15) exposes domain-search, domain-check and registrations endpoints on the account, and Cloudflare documents that they are reachable through the Cloudflare MCP by default. A successful registrations call charges the account's default payment method — which is exactly why the confirmation in step 4 is not optional.
Can I let the agent skip the confirmation step?
Technically yes; practically no. Registration spends money, is non-refundable once complete, and a registered name is yours whether you wanted it or not. The confirmation costs you one message per registration — cheap insurance against an autonomous loop that registers fifty names by mistake.
Why scope the permissions so narrowly?
An account-wide credential gives the agent every zone, every Worker, every R2 bucket and every Pages deployment in the account. Registrar write plus DNS edit on one zone caps the blast radius at one domain. Over OAuth you choose the scopes on the consent screen; with a token you set them when you create it.
What if the Registrar API does not carry my TLD?
The beta covers a curated subset of Cloudflare Registrar's extensions, and Cloudflare Registrar itself carries no .io and few country-code TLDs. For anything outside it, the same conversation works with a different server: Name.com (official, sandbox by default), Porkbun (registration behind an explicit flag), Hostinger, or Vercel's MCP with its quote-then-confirm purchase. Only the install changes.
Can Claude renew or transfer the domain through the API?
Not yet. The first Registrar API beta covers search, check and registration; renewals, transfers and contact updates are listed as not available. Those stay in the dashboard for now, which also means an agent cannot start a transfer out through this server.
How do I rotate the credential without losing the connection?
Over OAuth, revoke the connection in the Cloudflare dashboard and sign in again from the client. With a bearer token, create a new token with the same scopes, update the client's header configuration, reconnect, then delete the old token. There is no live rotation — the reconnect is mandatory.
More for domains
See which registrar servers can search, register, edit DNS and spend money — and which steps stay human — before you pick one.
Related guides
Strategy
Can an AI Agent Buy a Domain? What the MCP Servers Actually Allow (2026)
8 min read
Tutorial
How to Search for Domains With an AI Agent (Cross-Registrar Workflow)
7 min read
Tutorial
How to Connect a Custom Domain to Your Site With an AI Agent (MCP Workflow)
7 min read
Setup Guide
Best MCP Servers for Domains in 2026 (Registrars + DNS)
10 min read
Ranked Guide
Best MCPs for DNS Management in 2026 (Records, Propagation, DNSSEC)
9 min read
Tutorial
Deploy to Cloudflare With an AI Agent (Cloudflare MCP, 2026)
7 min read