Cloudflare MCP Server

Official

Deploy Workers, manage KV, and configure Cloudflare from your AI

GitHub1.8k
cloudflareworkerscdnkvr2officialcloud

The official Cloudflare MCP server gives your AI assistant access to your Cloudflare account. Deploy and update Workers, manage KV namespaces and their data, configure DNS records, and interact with R2 storage buckets — all through natural language. Authenticated with a Cloudflare API token scoped to the specific resources you need. Maintained by Cloudflare's engineering team.

Install Config

Config file: ~/Library/Application Support/Claude/claude_desktop_config.json· Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "cloudflare": {
      "command": "npx",
      "args": [
        "-y",
        "@cloudflare/mcp-server-cloudflare"
      ],
      "env": {
        "CLOUDFLARE_ACCOUNT_ID": "your_account_id",
        "CLOUDFLARE_API_TOKEN": "your_api_token"
      }
    }
  }
}

Required environment variables:

  • CLOUDFLARE_ACCOUNT_IDYour Cloudflare account ID(e.g. a1b2c3d4e5f6...)
  • CLOUDFLARE_API_TOKENCloudflare API token with appropriate permissions(e.g. your_api_token_here)

Available Tools (7)

Tool nameDescription
worker_listList all Cloudflare Workers in the account
worker_getGet the code for a specific Worker
worker_putDeploy or update a Worker script
kv_namespaces_listList KV namespaces
kv_key_getRead a value from a KV namespace
kv_key_putWrite a value to a KV namespace
r2_buckets_listList R2 storage buckets

Example Prompts

  • List all my Cloudflare Workers
  • Deploy this JavaScript code as a new Worker
  • What's the current value of 'user_count' in my KV store?
  • List all R2 buckets in my account
  • Update the KV entry for 'config' with this JSON

Pros & Cons

Pros

  • Official Cloudflare server — maintained by Cloudflare
  • Covers Workers, KV, R2, and more
  • Fine-grained API token scoping

Cons

  • Cloudflare-specific — not general cloud infrastructure
  • Some operations are irreversible — be careful with production

Who Is This For?

  • ·Developers building on Cloudflare's edge platform
  • ·Teams managing Cloudflare Workers in production

When to use: Use when you want AI to help you deploy, debug, and manage Cloudflare resources without using the dashboard.

Supported Clients