Cloudflare MCP Server
Full Cloudflare platform management via MCP. Deploy Workers, manage KV namespaces, interact with R2 storage, query D1 databases, and configure DNS records directly from your AI agent.
Quick Install
$ npx -y @cloudflare/mcp-server-cloudflareEnvironment Variables
| Variable | Description | Required |
|---|---|---|
| CLOUDFLARE_API_TOKEN | Cloudflare API token | Yes |
| CLOUDFLARE_ACCOUNT_ID | Cloudflare account ID | Yes |
In-Depth Setup Guide
Complete setup walkthrough & security best practices
Configuration by Client
{
"mcpServers": {
"cloudflare": {
"command": "npx",
"args": [
"-y",
"@cloudflare/mcp-server-cloudflare"
],
"env": {
"CLOUDFLARE_API_TOKEN": "cf_xxxxxxxxxxxx",
"CLOUDFLARE_ACCOUNT_ID": ""
}
}
}
}Need a different client? Use the Config Generator for Windsurf, Cline, Antigravity, and more.
Available Tools (6)
Cloudflare FAQ
What is the Cloudflare MCP server?
Full Cloudflare platform management via MCP. Deploy Workers, manage KV namespaces, interact with R2 storage, query D1 databases, and configure DNS records directly from your AI agent.
How do I install the Cloudflare MCP server?
Run: npx -y @cloudflare/mcp-server-cloudflare
Which AI clients support the Cloudflare MCP server?
The Cloudflare MCP server works with Claude Desktop, Cursor, Codex CLI, Antigravity, Windsurf, and any MCP-compatible client using stdio transport.
What tools does the Cloudflare MCP server provide?
The server provides 6 tools: worker_list, worker_deploy, kv_get, kv_put, r2_list, d1_query.