mcp-server-cloudflare

mcp-server-cloudflare

MCP server to manage Cloudflare Workers, KV, R2, Pages, DNS, and cache from your IDE.

Category
Visit Server

README

MCP Server Cloudflare — Workers, KV, R2, DNS & Cache for AI Assistants

npm version npm downloads CI License: MIT

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.com

Works with Claude Desktop, Cursor, and VS Code Copilot.

MCP server Cloudflare demo — listing Workers and purging cache from Claude Desktop

Tools

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)

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

  1. Go to Cloudflare Dashboard > API Tokens
  2. 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
  3. Set CLOUDFLARE_API_TOKEN environment variable
  4. Set CLOUDFLARE_ACCOUNT_ID for 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 build

Author

Made by ofershap

LinkedIn GitHub


<sub>README built with README Builder</sub>

License

MIT © Ofer Shapira

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured