Cloudflare MCP Server
Official Cloudflare MCP server: the agent drives the whole Cloudflare API by searching the spec and running code
- 1,089 ★ on the repository
- Last commit
- Apache-2.0
Broad access
Why this level
- Manages live Cloudflare cloud infrastructure
- Requires OAuth or an API token with resource permissions
- Can change DNS, Workers, firewall and other products
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/cloudflare-mcpDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Manages live Cloudflare cloud infrastructure
- Requires OAuth or an API token with resource permissions
- Can change DNS, Workers, firewall and other products
This is third-party code. Review the repository files before installing.
What it does
The server gives the agent the full Cloudflare API without dumping thousands of schemas into context. Instead of one tool per endpoint across roughly 2500 endpoints, it exposes three tools: search the docs, search the API spec, and execute code that calls cloudflare.request(). The spec stays on the server and only the execution result comes back, so token usage stays small. You can manage Workers, KV, R2, D1, Pages, DNS, firewall, load balancers and other products, and query the GraphQL Analytics API.
Who it is for. For devops engineers and developers who run their infrastructure on Cloudflare and want to manage it from an agent.
Good fit when
- You manage Cloudflare resources from an agent: Workers, DNS, KV, R2, D1
- You need the whole Cloudflare API without bloating context
- You need analytics via the GraphQL API
Not a fit when
- You have no Cloudflare account or rights to the resources
- You do not want to give an agent access to live cloud infrastructure
- Your client cannot use a remote MCP over HTTP
Example request
List all my Workers and add an A record for api.example.com pointing to 192.0.2.1MCP
- Transport
- http
- Authentication
- OAuth
Environment variables
Bearer Tokensecret- Cloudflare API token for login without OAuth, for CI and automation
Limitations
This is a remote HTTP server, so you need a client that supports that transport. A Cloudflare account is required: OAuth login with permission selection, or an API token for CI and automation. Tokens with client IP filtering are not currently supported. Disabling code mode via codemode=false sharply increases token usage.
How to disable. Remove the cloudflare-api entry from your MCP client config and revoke the API token or OAuth access in the Cloudflare dashboard.
FAQ
How does it save context?
The API spec lives on the server. The agent writes code to find and call the right endpoints, and only the execution result returns to context.
Can I skip OAuth?
Yes. For CI and automation create an API token in the Cloudflare dashboard and pass it as a bearer token.
How is Cloudflare MCP Server different from servers with a tool per endpoint?
The Cloudflare API has about 2500 endpoints. Their schemas are not dumped into context, the server exposes three tools: spec documentation search and code execution. The agent controls the whole API and saves context.
How do I connect Cloudflare MCP and what does the codemode setting do?
Add the cloudflare-api server over HTTP to the client config, as in the install block, and sign in through OAuth. Codemode is on by default, and the ?codemode=false address parameter registers a separate tool for each of about 2500 endpoints. Risk is high.
Discussion
No questions or reviews yet.
Related
MCP serversCloudflare MCP servers
Cloudflare MCP Server
A set of remote Cloudflare MCP servers: documentation, Workers, logs, Radar, browser, DNS and other account services
A self-hosted gateway that merges several MCP servers into one endpoint with auth and tool selection
Official Netlify MCP server: the agent creates projects, builds and deploys sites, manages environment variables and forms
Microsoft's official MCP server for Azure: the agent sees subscription resources and works with Azure services on your behalf
A self-hosted gateway routes internal MCP tools, authenticates users and records requests for later review.
A Node.js manager for MCP servers: it starts local servers, connects remote ones and gives a client one address, with a REST API for control
README in short
The README describes a code mode server: instead of a tool per endpoint the agent gets docs, search and execute and writes JavaScript to work with the spec and call cloudflare.request(). It includes a token cost comparison table, connection configs for OAuth and API token, and a GraphQL Analytics API example. It lists the server URL https://mcp.cloudflare.com/mcp and how to disable code mode. Apache-2.0 licensed.