Official Cloud & Infra

Cloudflare

Manage Workers, Pages, KV, R2, and D1 databases.

Works with: Claude DesktopClaude CodeCursorWindsurf
Quick install
npx -y @cloudflare/mcp-server-cloudflare

How to install the Cloudflare MCP server

Add this to your Claude Desktop MCP configuration:

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

Add this to your Claude Code MCP configuration:

npx -y @cloudflare/mcp-server-cloudflare

Add this to your Cursor MCP configuration:

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

Add this to your Windsurf MCP configuration:

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

The Cloudflare MCP server is Cloudflare’s official integration. It exposes Workers, Pages, KV, R2, D1, and the wider Cloudflare API surface to Claude. For developers running infrastructure on Cloudflare, this collapses dashboard tab-switching into single prompts.

Why use it

Cloudflare’s dashboard is good but spread across many product surfaces. Claude with the MCP server can answer “what’s the status of my last Workers deploy?” or “how much R2 storage am I using?” without you opening four tabs.

For solo founders running on Cloudflare’s stack (which is plenty), it’s one of the higher-leverage integrations.

What it actually does

A wide tool surface: list and manage Workers, Pages projects, KV namespaces, R2 buckets, D1 databases, queues, durable objects, and AI Gateway configurations. Plus zone-level operations: DNS records, analytics, security rules.

Practical patterns:

  • “Show me my last five Pages deploys and their build status.”
  • “What’s in my KV namespace ‘sessions’ for key ‘user_42’?”
  • “Run this D1 query against my production database: SELECT count(*) FROM users.”

Gotchas

API tokens with broad scope are powerful. A token with edit on Workers can deploy code; a token with edit on DNS can take your site down. Default to read-only and grant write only where needed.

Some operations are async. Workers deployments, R2 uploads, and zone-level changes can take seconds to propagate. The server returns the queued state; Claude needs to poll or wait.

Pair with GitHub for an end-to-end deploy loop: open a PR with code, merge it, watch the Cloudflare deploy, run a smoke test. Each step is a tool call.

Cloudflare MCP server: FAQs

Does it support D1 (SQL) databases?

Yes. Claude can run D1 queries, list databases, inspect schemas. Useful for any Cloudflare-hosted app where the database lives in D1.

Can it deploy Workers?

Yes, with appropriate API token scopes. Default to read-only scopes for most workflows; grant deploy scopes only when you specifically want Claude to ship code.

How is auth handled?

Cloudflare API token. Create a scoped token at dash.cloudflare.com/profile/api-tokens. Limit it to the specific zones, accounts, or services you want Claude to access.

Does it handle Pages deployments?

Yes. Trigger deploys, list deployments, fetch build logs. Combine with the GitHub MCP server for an end-to-end deploy flow.

What about Workers AI?

Yes. Run inference against Workers AI models, list available models, manage AI Gateway. Useful if you're routing Claude through Cloudflare AI Gateway.