{
  "markdown": "# MCP Server Cloudflare — Workers, KV, R2, DNS & Cache for AI Assistants\n\n[![npm version](https://img.shields.io/npm/v/mcp-server-cloudflare-dns.svg)](https://www.npmjs.com/package/mcp-server-cloudflare-dns)\n[![npm downloads](https://img.shields.io/npm/dm/mcp-server-cloudflare-dns.svg)](https://www.npmjs.com/package/mcp-server-cloudflare-dns)\n[![CI](https://github.com/ofershap/mcp-server-cloudflare/actions/workflows/ci.yml/badge.svg)](https://github.com/ofershap/mcp-server-cloudflare/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Agent Plugins](https://img.shields.io/badge/Agent_Plugins-1.0.0-0ea5e9.svg)](https://agent-plugins.org)\n\nAn 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.\n\n```\nYou: \"List my Workers and purge cache for example.com\"\nAI:  Found 3 Workers: api-gateway, auth-worker, image-resizer\n     ✅ Cache purged for https://example.com\n```\n\n> Works with Claude Desktop, Cursor, and VS Code Copilot.\n\n![MCP server Cloudflare demo — listing Workers and purging cache from Claude Desktop](assets/demo.gif)\n\n## Tools\n\n| Tool               | What it does                         |\n| ------------------ | ------------------------------------ |\n| `cf_zones`         | List your Cloudflare zones (domains) |\n| `cf_dns_list`      | List DNS records for a zone          |\n| `cf_dns_create`    | Create a DNS record                  |\n| `cf_dns_delete`    | Delete a DNS record                  |\n| `cf_workers_list`  | List Workers scripts                 |\n| `cf_worker_delete` | Delete a Workers script              |\n| `cf_kv_namespaces` | List KV namespaces                   |\n| `cf_kv_keys`       | List keys in a KV namespace          |\n| `cf_kv_get`        | Get a value from KV                  |\n| `cf_kv_put`        | Write a value to KV                  |\n| `cf_kv_delete`     | Delete a KV key                      |\n| `cf_r2_buckets`    | List R2 storage buckets              |\n| `cf_cache_purge`   | Purge cache (all or specific URLs)   |\n\n## Quick Start\n\n### With Claude Desktop\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"cloudflare\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-server-cloudflare-dns\"],\n      \"env\": {\n        \"CLOUDFLARE_API_TOKEN\": \"your_api_token\",\n        \"CLOUDFLARE_ACCOUNT_ID\": \"your_account_id\"\n      }\n    }\n  }\n}\n```\n\n### With Cursor\n\nAdd to your `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"cloudflare\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-server-cloudflare-dns\"],\n      \"env\": {\n        \"CLOUDFLARE_API_TOKEN\": \"your_api_token\",\n        \"CLOUDFLARE_ACCOUNT_ID\": \"your_account_id\"\n      }\n    }\n  }\n}\n```\n\n## Authentication\n\n1. Go to [Cloudflare Dashboard > API Tokens](https://dash.cloudflare.com/profile/api-tokens)\n2. Create a token with the permissions you need:\n   - **Zone:Read** — for listing zones and DNS\n   - **Zone:Edit** — for creating/deleting DNS records\n   - **Workers Scripts:Edit** — for managing Workers\n   - **Workers KV Storage:Edit** — for KV operations\n   - **Zone:Cache Purge** — for cache purging\n3. Set `CLOUDFLARE_API_TOKEN` environment variable\n4. Set `CLOUDFLARE_ACCOUNT_ID` for Workers, KV, and R2 operations\n\n## Examples\n\nAsk your AI assistant:\n\n- \"List my Cloudflare zones\"\n- \"Show DNS records for zone xyz\"\n- \"Create an A record pointing to 1.2.3.4\"\n- \"List my Workers\"\n- \"Show KV keys in namespace abc\"\n- \"Purge the cache for https://example.com/page\"\n- \"List my R2 buckets\"\n\n## Agent Plugins\n\nThis repo is an [Agent Plugins](https://agent-plugins.org) 1.0.0 package: `plugin.json`, portable `mcp.json`, and `skills/` ship together with the MCP server.\n\nFor Cursor, clone the repo and copy or symlink it to `~/.cursor/plugins/local/mcp-server-cloudflare`, then reload the window. Skills and MCP show up under Customize > Plugins.\n\nAgent Plugins v1 does not ship OAuth. Set `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` in your MCP client env (see Quick Start). One-click install is not offered because credentials stay in env.\n\nInstall and run via npm package **`mcp-server-cloudflare-dns`** (not the unrelated `mcp-server-cloudflare` stub on npm).\n\n## FAQ\n\n### What npm package do I install?\n\nUse `npx -y mcp-server-cloudflare-dns`. The repo is named `mcp-server-cloudflare` on GitHub; npm publishes as `mcp-server-cloudflare-dns`.\n\n### Which env vars are required?\n\n`CLOUDFLARE_API_TOKEN` for all API calls. `CLOUDFLARE_ACCOUNT_ID` for Workers, KV, and R2 tools.\n\n### Can I install it as an Agent Plugin in Cursor?\n\nYes, via `~/.cursor/plugins/local/mcp-server-cloudflare`. Configure the same env vars in Cursor MCP settings.\n\n### What can this MCP manage?\n\nZones and DNS, Workers scripts, KV namespaces, R2 bucket listing, and cache purge for a zone.\n\n### Why no one-click Cursor button?\n\nAPI token and account id cannot be embedded in a portable install link. Use the JSON under Quick Start.\n\n## Development\n\n```bash\nnpm install\nnpm test\nnpm run build\n```\n\n## Author\n\n[![Made by ofershap](https://gitshow.dev/api/card/ofershap)](https://gitshow.dev/ofershap)\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-0A66C2?style=flat&logo=linkedin&logoColor=white)](https://linkedin.com/in/ofershap)\n[![GitHub](https://img.shields.io/badge/GitHub-Follow-181717?style=flat&logo=github&logoColor=white)](https://github.com/ofershap)\n\n---\n\n<sub>README built with [README Builder](https://ofershap.github.io/readme-builder/)</sub>\n\n## License\n\n[MIT](LICENSE) &copy; [Ofer Shapira](https://github.com/ofershap)\n",
  "bytes": 5691,
  "sha": "5f6c276c1ee68835990462dda42150fd29341830f3baf8a503e17d33fb0848e2",
  "repo_slug": "ofershap/mcp-server-cloudflare",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ofershap_cloudflare_a30a95cc/readme"
}