Connects your AI assistant directly to the Cloudflare API for managing infrastructure across Workers, KV storage, R2 buckets, DNS records, and cache purging. You get 13 tools covering the full lifecycle: list and delete Workers scripts, read and write KV key-value pairs, manage DNS records for your zones, list R2 buckets, and purge cache by URL or entirely. Requires a Cloudflare API token with appropriate permissions and your account ID. Works through stdio transport with Claude Desktop, Cursor, or VS Code Copilot. Reach for this when you want to script Cloudflare operations conversationally instead of switching to the dashboard or writing API calls manually.
Public tool metadata for what this MCP can expose to an agent.
searchSearch the Cloudflare OpenAPI spec. All $refs are pre-resolved inline. Products: ai, cloudforce-one, access, magic, workers, realtime, devices, dlp, email-security, stream, ai-search, brand-protection, gateway, email, intel, api_gateway, addressing, browser-rendering, dex, bui...1 paramsSearch the Cloudflare OpenAPI spec. All $refs are pre-resolved inline. Products: ai, cloudforce-one, access, magic, workers, realtime, devices, dlp, email-security, stream, ai-search, brand-protection, gateway, email, intel, api_gateway, addressing, browser-rendering, dex, bui...
codestringexecuteExecute JavaScript code against the Cloudflare API. First use the 'search' tool to find the right endpoints, then write code using the cloudflare.request() function. Available in your code: interface CloudflareRequestOptions { method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE...2 paramsExecute JavaScript code against the Cloudflare API. First use the 'search' tool to find the right endpoints, then write code using the cloudflare.request() function. Available in your code: interface CloudflareRequestOptions { method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE...
codestringaccount_idstringAn MCP server that lets your AI assistant manage Cloudflare Workers, KV, R2, DNS, and cache purging. Vercel, Railway, and Netlify all have MCP servers — now Cloudflare does too.
You: "List my Workers and purge cache for example.com"
AI: Found 3 Workers: api-gateway, auth-worker, image-resizer
✅ Cache purged for https://example.com
Works with Claude Desktop, Cursor, and VS Code Copilot.

| Tool | What it does |
|---|---|
cf_zones | List your Cloudflare zones (domains) |
cf_dns_list | List DNS records for a zone |
cf_dns_create | Create a DNS record |
cf_dns_delete | Delete a DNS record |
cf_workers_list | List Workers scripts |
cf_worker_delete | Delete a Workers script |
cf_kv_namespaces | List KV namespaces |
cf_kv_keys | List keys in a KV namespace |
cf_kv_get | Get a value from KV |
cf_kv_put | Write a value to KV |
cf_kv_delete | Delete a KV key |
cf_r2_buckets | List R2 storage buckets |
cf_cache_purge | Purge cache (all or specific URLs) |
Add to your claude_desktop_config.json:
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": ["-y", "mcp-server-cloudflare"],
"env": {
"CLOUDFLARE_API_TOKEN": "your_api_token",
"CLOUDFLARE_ACCOUNT_ID": "your_account_id"
}
}
}
}
Add to your .cursor/mcp.json:
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": ["-y", "mcp-server-cloudflare"],
"env": {
"CLOUDFLARE_API_TOKEN": "your_api_token",
"CLOUDFLARE_ACCOUNT_ID": "your_account_id"
}
}
}
}
CLOUDFLARE_API_TOKEN environment variableCLOUDFLARE_ACCOUNT_ID for Workers, KV, and R2 operationsAsk your AI assistant:
npm install
npm test
npm run build
README built with README Builder
silenceper/mcp-k8s
azure/containerization-assist
io.github.evozim/aws-builder
reza-gholizade/k8s-mcp-server
flux159/mcp-server-kubernetes