Cloudflare MCP Server
by Cloudflare
Expose the full Cloudflare platform as MCP tools — Workers, KV, R2, D1, DNS, and Workers AI for any MCP-compatible agent.
MCP
Cloudflare MCP Server
Added 28 Jan 2025
Overview
Cloudflare MCP Server exposes the Cloudflare platform APIs as a suite of Model Context Protocol tools, letting agents deploy and manage Workers, query and mutate KV and R2 storage, create and update DNS records, run D1 SQL databases, and invoke Workers AI models — all without leaving an agent session. Hosted as a remote MCP service by Cloudflare, it requires no local server process; agents connect with a scoped API token over HTTP/SSE transport. It works best with Claude Desktop, Claude Code, and any MCP-compatible host that supports remote servers, including Cursor and Windsurf. The server is the reference example of a major cloud vendor shipping a first-party, production-grade MCP surface, making it an essential integration for teams building or operating anything on the Cloudflare edge.
Best for
Best for
Teams building or operating applications on the Cloudflare edge who want agents to drive deployments, storage, DNS, and AI workloads end to end
Use cases
- Deploy a Cloudflare Worker, bind a KV namespace, and set a DNS route in a single agent session
- Inspect and rotate R2 bucket contents or KV keys through a conversational agent
- Manage DNS records across multiple zones without leaving the agent loop
- Run D1 SQL queries and Workers AI inference from an agent workflow
- Automate Cloudflare configuration drift detection and remediation
Notes
What it does
Cloudflare MCP Server translates the Cloudflare platform REST APIs into MCP-native tools that any compatible agent can call directly. The primary tool groups cover Workers (deploy, update, tail logs), KV (read, write, list, delete keys), R2 (list buckets, get/put objects), D1 (run SQL queries against serverless SQLite databases), DNS (create, update, delete records across zones), and Workers AI (invoke hosted AI models). Because it runs as a hosted remote MCP endpoint operated by Cloudflare, there is no local binary to install or keep updated.
How to deploy
Point your MCP host at Cloudflare’s remote MCP endpoint and supply a Cloudflare API token with the scopes your agent needs. In Claude Desktop, add the server under mcpServers in claude_desktop_config.json with the remote URL and your token. For Claude Code or Cursor, use the equivalent remote server configuration. Cloudflare recommends creating a dedicated token per project with the minimum required permissions rather than using a global token.
Best practices
Scope API tokens tightly — create one token per agent project and restrict it to the zones and products that project actually touches. Pair with the GitHub MCP server for a full code-to-deploy loop: the agent can pull a PR, build the Worker bundle, and deploy it to Cloudflare without leaving the session. Monitor Workers tail logs through the MCP surface to close the feedback loop after deployment.
Pros
- Hosted remote MCP — no local server process to manage or update
- Covers the full Cloudflare platform: Workers, KV, R2, D1, DNS, Workers AI
- Official first-party server, kept current with Cloudflare API changes
- Token-scoped access enables per-project or per-zone permission boundaries
- HTTP/SSE transport works with any MCP host that supports remote servers
Cons
- Default API token scopes are wide; deliberate scoping is required for safety
- Remote-only transport assumes reliable outbound connectivity from the agent host
- Some advanced enterprise features (e.g., Access, Zero Trust) not yet covered
- Cloudflare account required; not useful for teams on other cloud providers
Pairs with
Other entries in the index that connect to this one. Click through to see the chain.
Claude Code
Anthropic
Anthropic's terminal-native coding agent. Reads your repo, edits files, runs tests, ships PRs.
Cursor
Anysphere
The AI-first code editor. Tab to autocomplete, Composer to multi-file refactor, Agents for the long-running stuff.
Windsurf
Codeium
Codeium's IDE-with-an-agent. Cascade flow combines deep context with autonomous multi-file work.