Skip to content

Cloudflare API MCP Server

Reach the whole Cloudflare API, from DNS to Workers, through one hosted server.

Officialby CloudflareHosted, nothing to installChecked November 8, 2026

Cloudflare API MCP Server is Cloudflare's own hosted server and the one Cloudflare recommends first: one connection reaches its more than 2,500 API endpoints (DNS, Workers, R2, D1, KV, firewall rules and more) plus the developer docs. Instead of one tool per endpoint, Claude writes a short script that searches the API spec and a second one that makes the calls, and both run in an isolated sandbox. You sign in with OAuth and choose the permissions, or send an API token for automation.

Who is Cloudflare MCP for?

  • Website owners who manage DNS on Cloudflare
  • Developers building on Workers and Pages
  • Ops teams automating Cloudflare settings

What can you ask Cloudflare MCP to do?

Once it is connected, ask in plain words. Your AI tool decides when to use the server and asks before it changes anything important.

Prompt 1
List the DNS records for example.com and point the www record to my new server at 203.0.113.10.
Prompt 2
Create an R2 bucket called site-backups and a KV namespace called feature-flags.
Prompt 3
Which of my Workers have not been deployed in the last 90 days?

How to connect Cloudflare to Claude

MCP is an open standard. The setup steps below cover this server in Claude Code, Claude app, Codex, ChatGPT, Cursor, VS Code, Gemini CLI, Antigravity, OpenCode, Windsurf. Pick your tool:

New to MCP? Read what an MCP server is and how to add one.

Easiest: paste this into Claude Code
Connect the Cloudflare API MCP server to Claude Code for me: run this command: claude mcp add --transport http cloudflare-api https://mcp.cloudflare.com/mcp
If a value starts with YOUR_, ask me for it first. When it is connected, help me sign in if needed and show me one thing I can ask it to do.

Or do it yourself:

claude mcp add --transport http cloudflare-api https://mcp.cloudflare.com/mcp

Type /mcp inside Claude Code, pick the server and choose Authenticate to sign in.

Hosted address: https://mcp.cloudflare.com/mcp

Unlock the setup steps

Free. Leave your email once to open the setup steps for all 152 servers, and get the best new connectors each month.

No spam. One click to unsubscribe. We use your email to send you this bonus, new guides and news about our courses.

Good to know

OAuth asks which permissions to grant. For CI, send a Cloudflare API token as a Bearer header instead (tokens with Client IP Address Filtering are not supported). Add ?codemode=false to the URL only if your client already runs code mode itself: it then registers about 3,000 tools. Cloudflare has deprecated its older single-product servers, such as Workers Bindings, Workers Builds and Observability, in favor of this one.

How did we check Cloudflare MCP?

Checked on November 8, 2026: Cloudflare's MCP servers docs (updated October 27, 2026), the cloudflare/mcp repo README (Apache-2.0, 1,068 stars, last commit November 6, 2026) and the deprecated-servers table in cloudflare/mcp-server-cloudflare. A test MCP initialize request to the endpoint returned HTTP 401, the sign-in challenge it sends before OAuth.

Source: developers.cloudflare.com/agents/model-context-protocol/cloudflare/servers-for-cloudflare/

What do people ask about Cloudflare MCP?

Which Cloudflare MCP server should I connect?

Start with the Cloudflare API server at https://mcp.cloudflare.com/mcp, which covers the whole API. Cloudflare still runs separate servers for docs, containers, Browser Run, Digital Experience Monitoring and CASB, but it has deprecated the ones for Workers Bindings, Workers Builds, Observability, AI Gateway, Audit Logs, AutoRAG, DNS Analytics, GraphQL, Logpush and Radar and asks users to move to the API server.

Why does the Cloudflare server show only a few tools?

It uses what Cloudflare calls Code Mode: Claude writes JavaScript that searches the API spec, then a second script that makes the calls. Cloudflare measures this at about 1,100 tokens of context, against 244,047 tokens for one tool per endpoint even with minimal schemas. Each search or execute result is capped at about 6,000 tokens, and cut output is marked as truncated.

Can I limit what Claude may change in my Cloudflare account?

Yes. With OAuth you pick the permissions on Cloudflare's consent screen, and when a call needs a scope you did not grant, the server asks you to re-authorize with that scope added. With an API token, give the token only the permissions the task needs; user tokens and account tokens both work.

We wrote these answers from the official pages of each product named, read on November 8, 2026.

Building a site around tools like Cloudflare? Our Builders course, in early access, covers planning, design without a designer, launch and getting found on Google.