MCP ConfigsApr 7, 2026·2 min read

Cloudflare Workers MCP — Edge Functions for AI Agents

MCP server that gives AI agents access to Cloudflare Workers for deploying edge functions, managing KV storage, R2 buckets, and D1 databases. Build and deploy serverless code from chat. 1,500+ stars.

MC
MCP Hub · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

Add to your .mcp.json:

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

Get your token at dash.cloudflare.com/profile/api-tokens. Restart Claude Code.


Intro

Cloudflare Workers MCP is a Model Context Protocol server that connects AI agents to the Cloudflare developer platform with 1,500+ GitHub stars. Deploy edge functions, manage KV key-value storage, R2 object storage, and D1 SQLite databases — all through natural language commands. Your AI agent can write, deploy, and manage serverless infrastructure without leaving the conversation. Best for developers using Cloudflare who want AI-assisted edge deployment. Works with: Claude Code, Cursor, any MCP client. Setup time: under 2 minutes.


Available Tools

Workers

"Deploy a new worker that returns the current time in JSON"
"List all my deployed workers"
"Show the code of my auth-worker"
"Delete the old-api worker"

KV Storage

"Store user preferences in KV namespace 'settings'"
"Read the value for key 'config:feature-flags'"
"List all keys in the 'cache' namespace"

R2 Object Storage

"Upload this file to the 'assets' R2 bucket"
"List all objects in the 'backups' bucket"
"Generate a presigned URL for report.pdf"

D1 Database

"Create a D1 database called 'app-data'"
"Run this SQL: CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)"
"Query: SELECT * FROM users WHERE created_at > date('now', '-7 days')"

Use Cases

Instant API Deployment

"Write a worker that proxies requests to our internal API with rate limiting, then deploy it"
-> Agent writes the code, deploys to Cloudflare edge, returns the URL

Edge Data Management

"Store our feature flags in KV and create a worker endpoint to serve them"
-> Agent creates KV entries and a worker that reads them

Key Stats

  • 1,500+ GitHub stars
  • Workers, KV, R2, D1 access
  • Deploy from conversation
  • 300+ edge locations globally
  • Official Cloudflare product

FAQ

Q: What is Cloudflare Workers MCP? A: An MCP server that gives AI agents access to Cloudflare Workers, KV, R2, and D1 for deploying and managing edge infrastructure via natural language.

Q: Is it free? A: The MCP server is open-source. Cloudflare Workers free tier includes 100K requests/day.

Q: Can the agent deploy to production? A: Yes, use separate API tokens with limited permissions for safety.


🙏

Source & Thanks

Created by Cloudflare. Licensed under MIT.

mcp-server-cloudflare — stars 1,500+

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets