Skip to content

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.

  • 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

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

Cloudflare provides 16 managed MCP servers, but you do not need all of them. Start with the ones that match your stack:

ServerURLWhat It Does
Workers Bindingshttps://bindings.mcp.cloudflare.com/mcpManage Workers bindings (KV, R2, D1, etc.)
Workers Buildshttps://builds.mcp.cloudflare.com/mcpDeploy, build, and inspect Workers
KVhttps://kv.mcp.cloudflare.com/mcpRead/write KV namespaces
R2https://r2.mcp.cloudflare.com/mcpManage object storage buckets
D1https://d1.mcp.cloudflare.com/mcpQuery SQLite databases at the edge
Durable Objectshttps://do.mcp.cloudflare.com/mcpInspect stateful edge objects
Pageshttps://pages.mcp.cloudflare.com/mcpManage Pages deployments
DNShttps://dns.mcp.cloudflare.com/mcpManage DNS records
Logshttps://logs.mcp.cloudflare.com/mcpQuery Workers logs and analytics
Queueshttps://queues.mcp.cloudflare.com/mcpManage message queues
Vectorizehttps://vectorize.mcp.cloudflare.com/mcpManage vector search indexes
AI Gatewayhttps://ai-gateway.mcp.cloudflare.com/mcpMonitor AI request routing
Browser Renderinghttps://browser-rendering.mcp.cloudflare.com/mcpHeadless browser at the edge
Hyperdrivehttps://hyperdrive.mcp.cloudflare.com/mcpDatabase connection pooling
Imageshttps://images.mcp.cloudflare.com/mcpImage optimization and transformation
Streamhttps://stream.mcp.cloudflare.com/mcpVideo streaming management
Docshttps://docs.mcp.cloudflare.com/mcpSearch Cloudflare documentation
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"]
}
}
}

Each server triggers its own OAuth flow on first use. After the first authorization, credentials are cached locally.

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"]
}
}
}

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.