MCP.so
Sign In

Cloudflare MCP Server (Official)Featured

@Cloudflare

Basic information

Transport

Streamable HTTP

Authentication

OAuth

Last updated

Category

Cloud & Infrastructure

Author

Cloudflare

About Cloudflare MCP Server (Official)

Cloudflare is an application, security, and developer platform spanning Workers, storage, networking, DNS, and account APIs. Its official MCP server gives assistants structured Cloudflare context for inspecting resources, planning infrastructure changes, and working across Cloudflare services.

Connection details

https://mcp.cloudflare.com/mcp

Setup

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

Cloudflare MCP Server tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

This server requires authentication. Tool discovery may require signing in or credentials from the provider.

Fetch the live tool list directly from this server's endpoint using the button above.

Overview

What is Cloudflare MCP Server (Official)?

Cloudflare MCP Server (Official) is Cloudflare's hosted cloudflare mcp endpoint at https://mcp.cloudflare.com/mcp, giving AI agents access to the entire Cloudflare API (about 2,500 endpoints) and developer docs through a few Code Mode tools.

Instead of registering one tool per API endpoint, the server keeps the Cloudflare OpenAPI spec on its side and lets the agent write small JavaScript snippets that search the spec and call the API. Per the cloudflare/mcp README, this keeps the tool definitions at roughly 1,100 tokens instead of hundreds of thousands. The project is open source under Apache-2.0, and Cloudflare's docs call it the only Cloudflare MCP server most users need.

How to use Cloudflare MCP Server (Official)?

Prerequisites: a Cloudflare account and an MCP client that supports remote (Streamable HTTP) servers. Nothing is installed locally.

There are two ways to authenticate:

  • OAuth (recommended): connect to the URL and you are redirected to Cloudflare to authorize and pick the permissions to grant your agent.
  • API token: for CI/CD or automation, create a Cloudflare API token with the permissions you need and send it as a bearer token in the Authorization header. User tokens and account tokens both work; for account tokens add the Account Resources : Read permission so the server can detect your account ID. Tokens with Client IP Address Filtering are not supported.

The generic config from Cloudflare's docs:

{
  "mcpServers": {
    "cloudflare-api": {
      "url": "https://mcp.cloudflare.com/mcp"
    }
  }
}

Claude Code

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

Then run /mcp in a session to complete the OAuth sign-in. Cloudflare also publishes a Claude Code plugin that bundles its MCP servers with skills: /plugin marketplace add cloudflare/skills.

Cursor

Add the JSON config above to your Cursor MCP settings (mcp.json). The Cloudflare Skills plugin is also available from the Cursor Marketplace.

VS Code

Open the Command Palette, run "MCP: Add Server", choose HTTP and enter https://mcp.cloudflare.com/mcp.

Claude Desktop

Add https://mcp.cloudflare.com/mcp as a custom connector, or use any client that accepts a remote MCP URL. The Cloudflare AI Playground also accepts server URLs.

Optional URL parameters

  • ?codemode=false registers one tool per API endpoint (for example get_workers_scripts) instead of the Code Mode tools. Use it only if your client already does code mode, since it raises the cost to about 244k tokens.
  • ?truncateToolResult=false turns off the default ~6,000-token cap on each tool result. Use it only when your client limits what reaches the model.

Key features of Cloudflare MCP Server (Official)

  • Official, hosted by Cloudflare, Apache-2.0 source in cloudflare/mcp
  • Covers the whole Cloudflare API: Workers, KV, R2, D1, Pages, DNS, Firewall, Load Balancers, Stream, Images, AI Gateway, Vectorize, Access, Gateway and more
  • Code Mode design: generated code runs in isolated Workers via the Dynamic Worker Loader API, and only results return to the agent
  • OAuth with per-connection permission selection, or bearer API tokens for automation
  • Supports Cloudflare's GraphQL Analytics API through the same execute tool
  • Serves Cloudflare skills (Wrangler, Durable Objects, Agents SDK, Workers best practices) through the MCP Skills extension
  • Streamable HTTP at /mcp; old /sse URLs are aliases of the same handler

Cloudflare MCP Server (Official) tools

The server exposes a small, fixed set of tools:

  • API access: search runs JavaScript against spec.paths to find the right endpoints, and execute runs JavaScript that calls cloudflare.request() with what was found. With a user token you pass account_id; with an account token it is detected automatically.
  • Documentation: docs searches Cloudflare's developer documentation.
  • Identity: whoami returns the user or account the connection is authenticated as, which helps clients tell multiple connected accounts apart.

With ?codemode=false, docs and whoami stay, and each API endpoint becomes its own tool.

Use cases of Cloudflare MCP Server (Official)

  • Inventory resources: "List all my Workers and when each was last deployed."
  • Manage storage: "Create a KV namespace called 'my-cache'."
  • Edit DNS: "Add an A record for api.example.com pointing to 192.0.2.1."
  • Pull analytics: query zone traffic through the GraphQL Analytics API, for example requests and cached bytes for the last seven days.
  • Answer platform questions from current docs while you build a Worker, without leaving the editor.
  • Run Cloudflare changes from CI pipelines with a scoped API token.

Cloudflare MCP Server (Official) vs alternatives

Cloudflare runs two kinds of MCP servers. This API server is the recommended one for broad coverage. The domain-specific Cloudflare MCP servers (repo cloudflare/mcp-server-cloudflare) offer curated, typed tools for one product area each, such as Documentation (docs.mcp.cloudflare.com/mcp), Browser Run (browser.mcp.cloudflare.com/mcp) and Containers (containers.mcp.cloudflare.com/mcp). Several older ones, including Observability, Workers Bindings and Radar, are now marked deprecated with a request to move to mcp.cloudflare.com.

If you want to build and host your own MCP server on Workers instead, see Cloudflare's guide Build a remote MCP server; community templates such as this Cloudflare Workers MCP template do the same.

Troubleshooting Cloudflare MCP Server (Official)

  • Account token can't find your account: add the Account Resources : Read permission, or pass account_id explicitly.
  • API token rejected: tokens with Client IP Address Filtering are not supported yet; create one without the filter.
  • Client forced to SSE fails: the /sse path is not the old HTTP+SSE transport. Switch the client to Streamable HTTP or automatic transport detection.
  • Results end with --- TRUNCATED ---: each result is capped at about 6,000 tokens. Narrow the query, or use ?truncateToolResult=false if your client bounds output.
  • "Claude's response was interrupted": Cloudflare's MCP repo notes this usually means the context limit was hit after many chained tool calls; keep requests specific and split large tasks.

Frequently asked questions

1

Is the Cloudflare MCP server official?

Yes. It is built and hosted by Cloudflare, with source in the `cloudflare/mcp` GitHub repository under the Apache-2.0 license.

2

What is the Cloudflare MCP server URL?

`https://mcp.cloudflare.com/mcp`. It uses the Streamable HTTP transport.

3

Do I need an API key?

No for interactive use: OAuth sends you to Cloudflare to approve access and pick permissions. For automation you can use a Cloudflare API token as a bearer token instead.

4

Is the Cloudflare MCP server free?

Cloudflare does not list a separate price for the MCP server. You only need a Cloudflare account, though some Cloudflare features you manage through it may require a paid plan.

5

Does it work with Claude Code, Cursor and VS Code?

Yes. Any client that supports remote MCP servers can connect. In Claude Code run `claude mcp add --transport http cloudflare https://mcp.cloudflare.com/mcp`.

6

Why only a few tools for 2,500 endpoints?

That is Code Mode. The agent writes code to `search` the API spec and `execute` calls, so the full spec never fills the model's context.

7

Can the agent change my Cloudflare account?

Yes, if you grant it write permissions. You choose permissions during OAuth or when you create the API token, so grant only what the task needs.

8

Which Cloudflare MCP server should I use?

Use `mcp.cloudflare.com` for broad API access. Use a domain-specific server, such as Documentation or Browser Run, when you want typed tools for a single product area.

9

What is the Cloudflare remote MCP server?

The Cloudflare remote MCP server is a hosted Model Context Protocol endpoint at https://mcp.cloudflare.com/mcp, so AI assistants can connect to it without installing or running anything locally.

10

How do I connect to the Cloudflare MCP server?

Add the endpoint https://mcp.cloudflare.com/mcp to any MCP-compatible client such as Claude Code, Cursor, or VS Code. The setup snippets on this page configure each client in one step.

11

Does the Cloudflare MCP server require authentication?

Yes. Cloudflare uses OAuth: the first time you connect, your MCP client opens a browser window to sign in and authorize access, then reuses the credentials for future sessions.

12

Which transport does the Cloudflare MCP server use?

Cloudflare exposes a Streamable HTTP endpoint, the transport used by remote MCP servers and supported by all major MCP clients.

Comments