What Is Cloudflare MCP Server?

Cloudflare MCP Server is an officially maintained MCP server that lets you manage Cloudflare services — including Workers, KV, R2, D1, and DNS — directly from Claude Code. It is developed and maintained by Cloudflare.

Quick Facts

FieldValue
Package@cloudflare/mcp-server-cloudflare
Installnpx @cloudflare/mcp-server-cloudflare
Compatible withClaude Code
StatusActive
GitHubhttps://github.com/cloudflare/mcp-server-cloudflare

What You Can Do With It

  • Worker deployment: Create, update, and deploy Cloudflare Workers scripts without leaving your Claude Code session.
  • KV operations: Read, write, list, and delete key-value pairs in Cloudflare KV namespaces.
  • R2 storage: Manage R2 buckets and objects, including uploads, downloads, and bucket configuration.
  • DNS management: Query and modify DNS records for domains managed under your Cloudflare account.

How to Set It Up

Prerequisites: You need a Cloudflare account and an API token with appropriate permissions for the services you intend to use.

Step 1 — Authenticate with Cloudflare

Run the server once interactively to complete the OAuth or API token flow:

npx @cloudflare/mcp-server-cloudflare
**Step 2 — Add the server to your Claude Code config**

Add the following to your `.claude/mcp.json` (or `claude_desktop_config.json` depending on your Claude Code version):

```json
{
  "mcpServers": {
    "cloudflare": {
      "command": "npx",
      "args": ["@cloudflare/mcp-server-cloudflare"]
    }
  }
}

Step 3 — Restart Claude Code

After saving the config, restart Claude Code. The Cloudflare tools will appear in your available MCP tool list.

If you prefer to pin a specific version rather than running the latest on every invocation, install the package globally first:

npm install -g @cloudflare/mcp-server-cloudflare

Then update the command field to mcp-server-cloudflare and clear the args array.

Works Best With

This server is built and tested for Claude Code. Cloudflare has not documented compatibility with other MCP clients such as Cursor or Windsurf, so behavior on those platforms is not guaranteed. Stick with Claude Code for a supported experience.

Known Limitations

  • Authentication required: The server requires a valid Cloudflare API token or OAuth session scoped to your account. Tokens must have permissions matching the operations you intend to perform (e.g., Workers Scripts write, KV write, R2 write). A missing permission will result in API errors at runtime, not at startup.
  • Account scope: The server operates within a single Cloudflare account at a time. Switching between accounts requires re-authenticating or reconfiguring the token.
  • D1 support: D1 (Cloudflare’s serverless SQL database) is listed as a supported service in the package description, but verify current tool coverage in the GitHub repository, as database-specific tooling can lag behind other services.
  • Rate limits: All operations go through the Cloudflare REST API and are subject to Cloudflare’s standard API rate limits. Bulk operations (e.g., iterating many KV keys) may hit limits quickly.
  • No local emulation: This server talks directly to the Cloudflare production API. There is no dry-run or sandbox mode.

Community Resources

This article contains affiliate links. We may earn a commission at no extra cost to you. Learn more.

Share: X