Provides tools for managing Cloudflare services, including listing zones, managing DNS records, performing KV namespace operations, listing R2 buckets, and purging caches.
Allows listing and deleting Cloudflare Workers scripts through an AI assistant.
MCP Server Cloudflare — Workers, KV, R2, DNS & Cache for AI Assistants
An 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.comWorks with Claude Desktop, Cursor, and VS Code Copilot.

Tools
Tool | What it does |
| List your Cloudflare zones (domains) |
| List DNS records for a zone |
| Create a DNS record |
| Delete a DNS record |
| List Workers scripts |
| Delete a Workers script |
| List KV namespaces |
| List keys in a KV namespace |
| Get a value from KV |
| Write a value to KV |
| Delete a KV key |
| List R2 storage buckets |
| Purge cache (all or specific URLs) |
Quick Start
With Claude Desktop
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"
}
}
}
}With Cursor
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"
}
}
}
}Authentication
Create a token with the permissions you need:
Zone:Read — for listing zones and DNS
Zone:Edit — for creating/deleting DNS records
Workers Scripts:Edit — for managing Workers
Workers KV Storage:Edit — for KV operations
Zone:Cache Purge — for cache purging
Set
CLOUDFLARE_API_TOKENenvironment variableSet
CLOUDFLARE_ACCOUNT_IDfor Workers, KV, and R2 operations
Examples
Ask your AI assistant:
"List my Cloudflare zones"
"Show DNS records for zone xyz"
"Create an A record pointing to 1.2.3.4"
"List my Workers"
"Show KV keys in namespace abc"
"Purge the cache for https://example.com/page"
"List my R2 buckets"
Development
npm install
npm test
npm run buildAuthor
README built with README Builder