mcpservers
Cloudflare MCP logo

Cloudflare MCP

Official Cloudflare MCP server — manage Workers, KV, D1, R2, and DNS through AI-powered conversation.

Turn it on
“I built CMCP[2] which lets you aggregate all MCP servers behind two mcp tools, search and execute”
Hacker News · aceelric

★ Hand-picked walkthrough

Getting Started with the Cloudflare MCP server and Claude

Cloudflare Developers

  1. 1

    Turn on Cloudflare in your AI

    In Claude: open Settings → Connectors and add Cloudflare. In ChatGPT: Settings → Apps & Connectors.

  2. 2

    Add it to your app once

    Copy the short config below into your app. It just tells your AI where to find Cloudflare.

  3. 3

    Just ask

    Tell it what you want in plain words — no special commands.

    For example, say

    “List all my Cloudflare Workers and show which ones were updated in the last week”

Need the exact config? Show it +
{
  "mcpServers": {
    "cloudflare": {
      "command": "npx",
      "args": ["-y", "@cloudflare/mcp-server-cloudflare", "run", "<your-account-id>"]
    }
  }
}

Paste into your client's MCP configuration file.

Download the Cloudflare skill Official

A ready-made skill that teaches your AI agent to use Cloudflare well. Cloudflare's official skills for Workers, Wrangler and its MCP servers.

npx skills add cloudflare/skills
View on GitHub

Copy one, paste it to your AI, watch it work.

Worker Deployment

“Deploy this Worker code to my-api.workers.dev and tell me when it's live”

KV & D1 Data Ops

“Query the users table in my D1 database and show rows where signup_date is today”

DNS Management

“Add a CNAME record for staging.mysite.com pointing to my-app.pages.dev”

  • · Cloudflare API tokens should be scoped to specific zones and permissions — never use a global API key
  • · Deploying a Worker can replace the live production version — preview routes first
  • · DNS changes propagate globally — reverting mistakes can take minutes
  • You're building on Cloudflare Workers and want AI help deploying and debugging
  • You need to manage KV, D1, or R2 data without using wrangler directly
  • You want to update DNS records or page rules quickly
  • You're setting up a new Cloudflare Worker project from scratch
  • × You use AWS Lambda, Vercel Edge, or another edge platform
  • × You need to edit Cloudflare Access policies with complex rules
  • × You need enterprise-only features not exposed via the public API

Cloudflare runs huge parts of the internet — websites, small backend services, databases, file storage, and the rules that point a domain name to the right server. If you've ever followed a tutorial that said 'add a DNS record' or 'deploy a Worker,' that's Cloudflare. This server lets your AI assistant do all of that for you in plain English. Tell Claude 'deploy this code as a Worker named hello-api,' or 'add a CNAME record for staging.mysite.com pointing to my-app.pages.dev,' and it carries out the action. It can also read and write data in your KV stores and D1 databases, manage files in R2 storage, and check whether something you just deployed is live. For someone shipping a small product, this means you can keep building inside one conversation instead of jumping between dashboards and command-line tools. For someone learning, the AI explains what each change does before you commit. The trade-off: a misplaced command can take a production site down, so use a scoped API token, not a global one, and review actions before approving them.

The official Cloudflare MCP server gives AI assistants comprehensive access to Cloudflare's developer platform. Deploy and manage Workers, interact with KV and D1 databases, manage R2 storage, and configure DNS — through natural language.

Maintained by Cloudflare with growing API coverage. Essential for teams building on the Cloudflare stack.

Claude Cursor Windsurf Cline
#cloudflare#workers#serverless#edge#official
What does Cloudflare MCP do? +

Cloudflare runs huge parts of the internet — websites, small backend services, databases, file storage, and the rules that point a domain name to the right server. If you've ever followed a tutorial that said 'add a DNS record' or 'deploy a Worker,' that's Cloudflare. This server lets your AI assistant do all of that for you in plain English. Tell Claude 'deploy this code as a Worker named hello-api,' or 'add a CNAME record for staging.mysite.com pointing to my-app.pages.dev,' and it carries out the action. It can also read and write data in your KV stores and D1 databases, manage files in R2 storage, and check whether something you just deployed is live. For someone shipping a small product, this means you can keep building inside one conversation instead of jumping between dashboards and command-line tools. For someone learning, the AI explains what each change does before you commit. The trade-off: a misplaced command can take a production site down, so use a scoped API token, not a global one, and review actions before approving them.

Do I need to know how to code? +

No. Turn it on in your AI's settings and ask in plain English — no terminal, no coding.

When should I use Cloudflare MCP? +

Reach for it when you need to: You're building on Cloudflare Workers and want AI help deploying and debugging; You need to manage KV, D1, or R2 data without using wrangler directly; You want to update DNS records or page rules quickly; You're setting up a new Cloudflare Worker project from scratch.

When should I avoid Cloudflare MCP? +

Skip it when: You use AWS Lambda, Vercel Edge, or another edge platform; You need to edit Cloudflare Access policies with complex rules; You need enterprise-only features not exposed via the public API.

How do I install Cloudflare MCP? +

In Claude Code, run: claude mcp add cloudflare -- npx -y @cloudflare/mcp-server-cloudflare run <your-account-id>. Copy-paste configs for Claude Desktop, Cursor, and Windsurf are at the top of this page.