Cloudflare MCP Servers
You just deployed a Cloudflare Worker that handles authentication. It works in dev, but something is off in production — the KV reads are returning stale data and the R2 bucket permissions look wrong. You open four browser tabs: the Workers dashboard, the KV namespace viewer, the R2 bucket settings, and the Cloudflare docs. You copy values between tabs, cross-reference configuration, and lose twenty minutes before finding the issue. A single mistyped namespace binding name.
Cloudflare’s MCP servers bring your entire edge infrastructure into your AI’s context. The AI reads your Worker code, inspects KV namespaces, queries D1 databases, checks R2 buckets, and searches the Cloudflare docs — all from one conversation in your editor.
What You’ll Walk Away With
Section titled “What You’ll Walk Away With”- Setup for Cloudflare’s managed remote MCP servers
- Overview of all 16 available servers and when to use each
- Prompts for Workers deployment, KV/R2 management, D1 queries, and documentation lookup
- OAuth authentication flow and account selection
How Cloudflare MCP Works
Section titled “How Cloudflare MCP Works”Cloudflare runs remote MCP servers — unlike most MCP servers that run locally on your machine, these are hosted services that authenticate via OAuth. When you first connect, a browser window opens for Cloudflare login. After authentication, you select which Cloudflare account to use, and the MCP server operates with your account permissions.
All Cloudflare MCP servers follow the same URL pattern: https://{service}.mcp.cloudflare.com/mcp
The Full Server Catalog
Section titled “The Full Server Catalog”Cloudflare provides 16 managed MCP servers, but you do not need all of them. Start with the ones that match your stack:
| Server | URL | What It Does |
|---|---|---|
| Workers Bindings | https://bindings.mcp.cloudflare.com/mcp | Manage Workers bindings (KV, R2, D1, etc.) |
| Workers Builds | https://builds.mcp.cloudflare.com/mcp | Deploy, build, and inspect Workers |
| KV | https://kv.mcp.cloudflare.com/mcp | Read/write KV namespaces |
| R2 | https://r2.mcp.cloudflare.com/mcp | Manage object storage buckets |
| D1 | https://d1.mcp.cloudflare.com/mcp | Query SQLite databases at the edge |
| Durable Objects | https://do.mcp.cloudflare.com/mcp | Inspect stateful edge objects |
| Pages | https://pages.mcp.cloudflare.com/mcp | Manage Pages deployments |
| DNS | https://dns.mcp.cloudflare.com/mcp | Manage DNS records |
| Logs | https://logs.mcp.cloudflare.com/mcp | Query Workers logs and analytics |
| Queues | https://queues.mcp.cloudflare.com/mcp | Manage message queues |
| Vectorize | https://vectorize.mcp.cloudflare.com/mcp | Manage vector search indexes |
| AI Gateway | https://ai-gateway.mcp.cloudflare.com/mcp | Monitor AI request routing |
| Browser Rendering | https://browser-rendering.mcp.cloudflare.com/mcp | Headless browser at the edge |
| Hyperdrive | https://hyperdrive.mcp.cloudflare.com/mcp | Database connection pooling |
| Images | https://images.mcp.cloudflare.com/mcp | Image optimization and transformation |
| Stream | https://stream.mcp.cloudflare.com/mcp | Video streaming management |
| Docs | https://docs.mcp.cloudflare.com/mcp | Search Cloudflare documentation |
Setup: Workers + KV + D1 (Recommended Starting Point)
Section titled “Setup: Workers + KV + D1 (Recommended Starting Point)”{ "mcpServers": { "cloudflare-bindings": { "command": "npx", "args": ["-y", "mcp-remote", "https://bindings.mcp.cloudflare.com/mcp"] }, "cloudflare-builds": { "command": "npx", "args": ["-y", "mcp-remote", "https://builds.mcp.cloudflare.com/mcp"] }, "cloudflare-kv": { "command": "npx", "args": ["-y", "mcp-remote", "https://kv.mcp.cloudflare.com/mcp"] }, "cloudflare-d1": { "command": "npx", "args": ["-y", "mcp-remote", "https://d1.mcp.cloudflare.com/mcp"] } }}claude mcp add cf-bindings -- npx -y mcp-remote https://bindings.mcp.cloudflare.com/mcpclaude mcp add cf-builds -- npx -y mcp-remote https://builds.mcp.cloudflare.com/mcpclaude mcp add cf-kv -- npx -y mcp-remote https://kv.mcp.cloudflare.com/mcpclaude mcp add cf-d1 -- npx -y mcp-remote https://d1.mcp.cloudflare.com/mcpOr add to .claude/settings.json:
{ "mcpServers": { "cloudflare-bindings": { "command": "npx", "args": ["-y", "mcp-remote", "https://bindings.mcp.cloudflare.com/mcp"] }, "cloudflare-builds": { "command": "npx", "args": ["-y", "mcp-remote", "https://builds.mcp.cloudflare.com/mcp"] }, "cloudflare-kv": { "command": "npx", "args": ["-y", "mcp-remote", "https://kv.mcp.cloudflare.com/mcp"] }, "cloudflare-d1": { "command": "npx", "args": ["-y", "mcp-remote", "https://d1.mcp.cloudflare.com/mcp"] } }}[mcp.cloudflare-bindings]transport = "http"url = "https://bindings.mcp.cloudflare.com/mcp"
[mcp.cloudflare-builds]transport = "http"url = "https://builds.mcp.cloudflare.com/mcp"
[mcp.cloudflare-kv]transport = "http"url = "https://kv.mcp.cloudflare.com/mcp"
[mcp.cloudflare-d1]transport = "http"url = "https://d1.mcp.cloudflare.com/mcp"Each server triggers its own OAuth flow on first use. After the first authorization, credentials are cached locally.
Workers Workflows
Section titled “Workers Workflows”KV and D1 Workflows
Section titled “KV and D1 Workflows”Cloudflare Documentation Search
Section titled “Cloudflare Documentation Search”The Docs MCP server is underrated. Instead of searching docs.cloudflare.com in a browser, the AI searches Cloudflare’s documentation directly and applies what it finds to your code.
{ "mcpServers": { "cloudflare-docs": { "command": "npx", "args": ["-y", "mcp-remote", "https://docs.mcp.cloudflare.com/mcp"] } }}claude mcp add cf-docs -- npx -y mcp-remote https://docs.mcp.cloudflare.com/mcp[mcp.cloudflare-docs]transport = "http"url = "https://docs.mcp.cloudflare.com/mcp"When This Breaks
Section titled “When This Breaks”OAuth flow fails. Cloudflare’s OAuth redirects to localhost. If something blocks localhost callbacks (VPN, corporate proxy, browser extensions), the flow hangs. Try a different browser or temporarily disable the proxy.
Wrong account selected. If you have multiple Cloudflare accounts, the MCP server lets you choose which one to use. If you are seeing the wrong Workers or KV namespaces, disconnect and reconnect to select the correct account.
Rate limiting. Cloudflare MCP servers are backed by the Cloudflare API, which has rate limits. If you hit them, reduce the scope of your prompts. Instead of “list all KV keys,” try “list the first 50 KV keys matching the prefix ‘user:’.”
Stale data after deployments. If you deploy a Worker through Wrangler and then ask the MCP server about it, there may be a brief delay before the new deployment appears. Wait 10-15 seconds and try again.
Too many MCP servers slow down startup. Each Cloudflare MCP server adds tool descriptions to the AI’s context. If you have all 16 connected, that is hundreds of tool descriptions competing for attention. Connect only the servers you actively need.