Cloudflare MCP Server
Deploy and manage Cloudflare Workers, R2 storage, KV namespaces, and D1 databases from Claude Code. Streamline edge deployment workflows by managing your Cloudflare infrastructure directly within your AI coding environment.
MCP Server Configuration
{ "mcpServers": { "cloudflare": { "command": "npx", "args": ["-y", "@cloudflare/mcp-server-cloudflare"], "env": { "CLOUDFLARE_ACCOUNT_ID": "<your-account-id>", "CLOUDFLARE_API_TOKEN": "<your-api-token>" } } } }
Available Tools
| Category | Tools |
|---|---|
| Workers | Create, update, delete, list Workers scripts |
| KV | Create/list namespaces, get/put/delete KV pairs |
| R2 | Create/list buckets, upload/download objects |
| D1 | Create databases, execute SQL queries |
| DNS | List/create/update DNS records |
| Analytics | Query Workers analytics and metrics |
Setup
- Find your Account ID at https://dash.cloudflare.com (right sidebar on Overview page)
- Create an API token at https://dash.cloudflare.com/profile/api-tokens
- Use the "Edit Cloudflare Workers" template or create a custom token with:
- Workers Scripts: Edit
- Workers KV Storage: Edit
- Workers R2 Storage: Edit
- D1: Edit
- Zone > DNS: Edit (if managing DNS)
- Replace both placeholders in the configuration
Usage Examples
- "Deploy this API handler as a Cloudflare Worker"
- "Create a KV namespace for session storage and add some test data"
- "Upload these assets to an R2 bucket"
- "Create a D1 database and run this schema migration"
- "Show me analytics for my Workers over the last 24 hours"
Security Notes
- API tokens grant infrastructure control - use minimal permissions
- Create separate tokens for development and production
- Store credentials in
.claude/settings.local.json(gitignored) - Workers deployments are instant and global - review code before deploying
- D1 queries execute with full access - use read-only tokens when possible
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Database MCP Integration
MCP server configuration for connecting Claude Code to PostgreSQL, MySQL, and MongoDB databases. Enables schema inspection, query building, and migration generation.
Elevenlabs Server
Streamline your workflow with this official, elevenlabs, text, speech. Includes structured workflows, validation checks, and reusable patterns for audio.
Browser Use Portal
Powerful mcp for server, enables, agents, control. Includes structured workflows, validation checks, and reusable patterns for browser_automation.