Cloudflare MCP Server
by Cloudflare
Ask Claude to deploy a Worker, create a KV namespace, configure DNS records, and set up an R2 bucket -- in one prompt. That's not a demo. That's what 2,500+ Cloudflare API endpoints look like when they're accessible through two MCP tools instead of 2,594. Here's the trick that makes this server different from every other API-wrapper MCP: it doesn't dump the entire API spec into your context window. Traditional MCP servers expose one tool per API endpoint -- Cloudflare has 2,594 endpoints, which would eat 244,000 tokens just to describe. This server uses Code Mode: it gives Claude a search() tool to query the API specification and an execute() tool to call endpoints. The entire server description fits in 1,069 tokens. That's 0.5% of what the brute-force approach would cost. You're managing a Cloudflare account. You need to check which Workers are deployed, read the KV store for a specific key, find the DNS records for a domain, and check R2 storage usage. Without this server, that's four separate API calls you'd have to construct manually, checking docs for each endpoint. With it, you say: 'Show me all deployed Workers, the value of key "config" in my production KV, DNS records for example.com, and R2 usage this month.' Claude searches the spec, finds the four endpoints, and executes them. Setup is instant -- it's a remote MCP server hosted at mcp.cloudflare.com. No npm install, no Docker, no local dependencies. Add one URL to your MCP config, authenticate with OAuth or an API token, and you're managing infrastructure from Claude. The services you get access to cover everything Cloudflare offers: Workers, KV, R2, D1, Pages, DNS, Firewall, Load Balancers, Stream, Images, AI Gateway, Vectorize, Access, Gateway, and GraphQL Analytics. Every service Cloudflare has ever shipped is available through this single MCP server. Pair this with the GitHub MCP server and you've got a pipeline: Claude reads your repo, deploys to Workers, configures the CDN, and monitors performance -- all from a single conversation.
Installation
Key Features
- ✓Access 2,500+ Cloudflare API endpoints through just 2 MCP tools -- search and execute
- ✓Token-efficient Code Mode uses only 1,069 tokens instead of 244K for the full API spec
- ✓Deploy Workers, manage KV stores, configure DNS, and control R2 buckets from natural language
- ✓Remote MCP server -- no local install needed, just add the URL to your config
- ✓OAuth or API token authentication with granular permission control
- ✓Full coverage of every Cloudflare service: Workers, Pages, D1, Stream, Images, AI Gateway, Vectorize, Zero Trust
- ✓Chain multiple API calls in a single prompt for complex infrastructure workflows
Use Cases
- →Deploy a new Cloudflare Worker, create the KV namespaces it needs, and configure the custom domain -- all in one Claude conversation instead of switching between the dashboard and wrangler CLI
- →Debug a production issue by asking Claude to check Worker logs, inspect KV values, review DNS configuration, and trace the request path through your Cloudflare stack
- →Migrate infrastructure: tell Claude to replicate your staging Workers, KV stores, and R2 buckets into a new production environment with updated environment variables
- →Security audit your Cloudflare setup by having Claude review firewall rules, WAF configurations, Access policies, and DNS records for misconfigurations
- →Monitor costs and usage across your entire Cloudflare account -- R2 storage, Worker invocations, bandwidth -- from a single natural language query
- →Set up a complete Cloudflare Pages deployment with custom headers, redirects, and environment variables by describing what you want