
Cloudflare
Connects Claude and IDEs to Cloudflare's API for managing your web infrastructure through natural language commands. Deploy workers, manage DNS, query databases, and handle CDN settings conversationally.
Integrates with Cloudflare's API to enable management of DNS, CDN, and security configurations for web infrastructure automation.
What it does
- Deploy Cloudflare Workers with natural language
- Query D1 databases and get schema information
- Manage DNS records and CDN configurations
- Transfer data between KV namespaces and R2 buckets
- Configure security settings and firewall rules
- Manage Cloudflare Pages deployments
Best for
About Cloudflare
Cloudflare is a community-built MCP server published by gutmutcode that provides AI assistants with tools and capabilities via the Model Context Protocol. Manage DNS, CDN, and security configs with Cloudflare API. Automate web infrastructure using cloudflare dns and cloudfla It is categorized under cloud infrastructure, developer tools.
How to install
You can install Cloudflare in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
License
Cloudflare is released under the Apache-2.0 license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Cloudflare MCP Server for IDE
Model Context Protocol (MCP) is a new, standardized protocol for managing context between large language models (LLMs) and external systems. In this repository, we provide an installer as well as an MCP Server for Cloudflare's API.
This lets you use Claude Desktop, and IDE like VSCode (Cline) and Windsurf or any MCP Client, to use natural language to accomplish things on your Cloudflare account, e.g.:
Please deploy me a new Worker with an example durable object.Can you tell me about the data in my D1 database named '...'?Can you copy all the entries from my KV namespace '...' into my R2 bucket '...'?
Demo
Setup
- Run
npx @gutmutcode/mcp-server-cloudflare init
- Restart Claude Desktop, you should see a small 🔨 icon that shows the following tools available for use:
- Check out the Cline configuration file, you should see a
cloudflaresection with your Cloudflare account ID.
- Check out your Windsurf MCP configuration file, you should see a
cloudflaresection either. Windsurf has limitation on the use of MCP tools, so you can't use too many tools at the same time. (Unlike Cline and Claude)
Features
KV Store Management
get_kvs: List all KV namespaces in your accountkv_get: Get a value from a KV namespacekv_put: Store a value in a KV namespacekv_list: List keys in a KV namespacekv_delete: Delete a key from a KV namespace
R2 Storage Management
r2_list_buckets: List all R2 buckets in your accountr2_create_bucket: Create a new R2 bucketr2_delete_bucket: Delete an R2 bucketr2_list_objects: List objects in an R2 bucketr2_get_object: Get an object from an R2 bucketr2_put_object: Put an object into an R2 bucketr2_delete_object: Delete an object from an R2 bucket
D1 Database Management
d1_list_databases: List all D1 databases in your accountd1_create_database: Create a new D1 databased1_delete_database: Delete a D1 databased1_query: Execute a SQL query against a D1 database
Workers Management
worker_list: List all Workers in your accountworker_get: Get a Worker's script contentworker_put: Create or update a Worker scriptworker_delete: Delete a Worker script
Analytics
analytics_get: Retrieve analytics data for your domain- Includes metrics like requests, bandwidth, threats, and page views
- Supports date range filtering
Developing
In the current project folder, run:
pnpm install
pnpm build:watch
Then, in a second terminal:
node dist/index.js init
This will link Claude Desktop against your locally-installed version for you to test.
Usage outside of Claude
To run the server locally, run node dist/index run <account-id>.
If you're using an alternative MCP Client, or testing things locally, emit the tools/list command to get an up-to-date list of all available tools. Then you can call these directly using the tools/call command.
Workers
// List workers
worker_list()
// Get worker code
worker_get({ name: "my-worker" })
// Update worker
worker_put({
name: "my-worker",
script: "export default { async fetch(request, env, ctx) { ... }}",
bindings: [
{
type: "kv_namespace",
name: "MY_KV",
namespace_id: "abcd1234"
},
{
type: "r2_bucket",
name: "MY_BUCKET",
bucket_name: "my-files"
}
],
compatibility_date: "2024-01-01",
compatibility_flags: ["nodejs_compat"]
})
// Delete worker
worker_delete({ name: "my-worker" })
KV Store
// List KV namespaces
get_kvs()
// Get value
kv_get({
namespaceId: "your_namespace_id",
key: "myKey"
})
// Store value
kv_put({
namespaceId: "your_namespace_id",
key: "myKey",
value: "myValue",
expirationTtl: 3600 // optional, in seconds
})
// List keys
kv_list({
namespaceId: "your_namespace_id",
prefix: "app_", // optional
limit: 10 // optional
})
// Delete key
kv_delete({
namespaceId: "your_namespace_id",
key: "myKey"
})
R2 Storage
// List buckets
r2_list_buckets()
// Create bucket
r2_create_bucket({ name: "my-bucket" })
// Delete bucket
r2_delete_bucket({ name: "my-bucket" })
// List objects in bucket
r2_list_objects({
bucket: "my-bucket",
prefix: "folder/", // optional
delimiter: "/", // optional
limit: 1000 // optional
})
// Get object
r2_get_object({
bucket: "my-bucket",
key: "folder/file.txt"
})
// Put object
r2_put_object({
bucket: "my-bucket",
key: "folder/file.txt",
content: "Hello, World!",
contentType: "text/plain" // optional
})
// Delete object
r2_delete_object({
bucket: "my-bucket",
key: "folder/file.txt"
})
D1 Database
// List databases
d1_list_databases()
// Create database
d1_create_database({ name: "my-database" })
// Delete database
d1_delete_database({ databaseId: "your_database_id" })
// Execute a single query
d1_query({
databaseId: "your_database_id",
query: "SELECT * FROM users WHERE age > ?",
params: ["25"] // optional
})
// Create a table
d1_query({
databaseId: "your_database_id",
query: `
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT UNIQUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)
`
})
Analytics
// Get today's analytics
analytics_get({
zoneId: "your_zone_id",
since: "2024-11-26T00:00:00Z",
until: "2024-11-26T23:59:59Z"
})
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Alternatives
Related Skills
Browse all skillsBuilds remote MCP (Model Context Protocol) servers on Cloudflare Workers with tools, OAuth authentication, and production deployment. Generates server code, configures auth providers, and deploys to Workers. Use when: user wants to "build MCP server", "create MCP tools", "remote MCP", "deploy MCP", add "OAuth to MCP", or mentions Model Context Protocol on Cloudflare. Also triggers on "MCP authentication" or "MCP deployment".
Build comprehensive ML pipelines, experiment tracking, and model registries with MLflow, Kubeflow, and modern MLOps tools. Implements automated training, deployment, and monitoring across cloud platforms. Use PROACTIVELY for ML infrastructure, experiment management, or pipeline automation.
Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), networking (Tunnel, Spectrum), security (WAF, DDoS), and infrastructure-as-code (Terraform, Pulumi). Use for any Cloudflare development task.
Expert Kubernetes architect specializing in cloud-native infrastructure, advanced GitOps workflows (ArgoCD/Flux), and enterprise container orchestration. Masters EKS/AKS/GKE, service mesh (Istio/Linkerd), progressive delivery, multi-tenancy, and platform engineering. Handles security, observability, cost optimization, and developer experience. Use PROACTIVELY for K8s architecture, GitOps implementation, or cloud-native platform design.
Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.
Comprehensive Cloudflare account management for deploying Workers, KV Storage, R2, Pages, DNS, and Routes. Use when deploying cloudflare services, managing worker containers, configuring KV/R2 storage, or setting up DNS/routing. Requires CLOUDFLARE_API_KEY in .env and Bun runtime with dependencies installed.