Cloudflare Workers MCP Server
Manages Cloudflare Workers scripts, including listing all workers, retrieving worker settings and bindings, and health checks. Planned capabilities include static site deployment, worker lifecycle management, staged uploads, gradual rollouts, custom domains, cron triggers, and querying worker logs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cloudflare Workers MCP Serverlist all workers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cloudflare Workers MCP Server
⚠️ Security warning: this server was substantially AI-written. Before pointing it at an account you care about: (1) review the code — it is small and readable, an audit takes ~30 minutes; (2) for maximum caution, clone and build from source rather than trusting the npm artifact (or at least pin an exact version); (3) give the API token the minimum permission (Workers Scripts: Edit) and nothing else; (4) prefer a test account for the first runs.
A Model Context Protocol (MCP) server for managing Cloudflare Workers from Claude Desktop or Claude Code — the successor to cloudflare-pages-mcp, following Cloudflare's own shift from Pages to Workers with static assets.
Why
As of mid-2026, no other MCP server — including Cloudflare's official ones — can deploy a Worker. Cloudflare's remote MCP servers are read-only for Workers management, and their Code Mode server has no filesystem so it can't upload real asset trees. A local stdio server can: the Workers static-asset upload protocol is publicly documented, so this server's headline feature is:
"Deploy this directory as a static site on Cloudflare Workers" — in one natural-language request, with free unlimited static-asset serving.
Related MCP server: Cloudflare MCP Server
Tools
Static sites (the differentiator)
deploy_static_site - Deploy a local directory as a static site: manifest hashing, server-side dedupe (unchanged files never re-upload),
_headers/_redirectssupport, SPA/404 handling, live workers.dev URL in the resultredeploy_assets - Redeploy reusing already-uploaded files (
keep_assets) to changehtml_handling/not_found_handlingwithout re-uploading
Workers
list_workers - List all Worker scripts in your account
get_worker - Settings (bindings, compat date/flags, placement, observability) plus cron triggers and workers.dev status
get_worker_code - Download a Worker's deployed source (all modules)
deploy_worker - Upload and deploy ES-module Workers with bindings (
plain_text,secret_text,kv_namespace,r2_bucket,d1,assets)update_worker_settings - Change bindings/compat/logpush/observability without re-uploading code
delete_worker - Permanently delete a Worker (optional
force)
Versions & deployments
list_versions / get_version - Immutable version history and per-version detail
create_version - Staged upload that does NOT touch live traffic
list_deployments / create_deployment - Map traffic to versions: single version at 100% or gradual splits (e.g. 90/10)
rollback_worker - Deploy an older version back to 100% traffic
Domains, routing, cron
list_worker_domains / add_worker_domain / delete_worker_domain - Custom domains (zone must be active in your account)
set_workers_dev - Enable/disable
<name>.<account>.workers.devserving and version preview URLsget_cron_triggers / set_cron_triggers - Read or replace a Worker's cron trigger set
Observability
query_worker_logs - Workers Logs with time window, error filter, and full-text search (requires observability enabled on the Worker)
health_check - Verify API token and connection to Cloudflare
Quick Start
Requires Node.js 22+.
Option A: install from npm
npm install -g cloudflare-workers-mcpOption B: clone and build locally (for code review)
git clone https://github.com/daniil-shumko/cloudflare-workers-mcp
cd cloudflare-workers-mcp
npm install
npm run build
npm test # unit + MCP protocol smoke, no creds neededConfigure Claude Desktop/Code
Create an API token with Workers Scripts: Edit (the "Edit Cloudflare Workers" template works; both user and account-owned tokens are fine), find your account ID in the dashboard, then:
{
"mcpServers": {
"cloudflare-workers": {
"command": "npx",
"args": ["cloudflare-workers-mcp"],
"env": {
"CLOUDFLARE_API_TOKEN": "your_token_here",
"CLOUDFLARE_ACCOUNT_ID": "your_account_id_here"
}
}
}
}(If you built from source, use "command": "node" with
"args": ["/absolute/path/to/cloudflare-workers-mcp/dist/index.js"] instead.)
Or with the Claude Code CLI:
claude mcp add cloudflare-workers \
-e CLOUDFLARE_API_TOKEN=your_token_here \
-e CLOUDFLARE_ACCOUNT_ID=your_account_id_here \
-- npx cloudflare-workers-mcpUsage Examples
Deploy the ./dist folder as a static site called my-blogDeploy ./build as an SPA — client-side routing should fall back to index.htmlDeploy this worker script with a KV binding for CACHE (namespace abc123)Stage the new version without deploying, then roll it out 10% / 90%Roll my-api back to the previous versionAttach app.example.com to my-api and add a cron trigger every 30 minutesShow me the errors my-api logged in the last 2 hoursImportant Notes
Static site deploys
Unchanged files are deduped server-side: redeploying an identical directory uploads zero bytes and still creates a new version.
A
_headersor_redirectsfile at the directory root is applied as configuration (syntax), not uploaded as a public asset. A root.assetsignoreis applied with gitignore-style rules (globs,!negation,dir/and/anchoredpatterns; character classes unsupported) and the result reports how many files it excluded.Limits: 25 MiB per file; 20,000 files per version on free plans (100,000 on paid). Static-asset requests are free and unmetered.
Symlinks inside the directory are followed; symlinks pointing outside it abort the deploy.
Versions & rollouts
create_versionstages code; onlycreate_deployment(or a direct deploy) shifts traffic. Gradual rollouts split across at most two versions and percentages must sum to 100.Rollbacks reach the 100 most recent versions and never revert data in bound resources (KV, R2, D1); a changed secret blocks rollback unless
forceis set.
Domains & serving
Custom domains require the zone to be active in the same Cloudflare account — external/partial zones are not supported (unlike Pages).
Deploy tools enable workers.dev serving for newly created Workers so the result carries a working URL. Redeploys never change an existing Worker's workers.dev setting unless
enable_workers_devis passed explicitly — a deliberately disabled Worker stays private.When
compatibility_dateis omitted, deploys preserve the existing Worker's pinned date (new Workers get today's date) — a redeploy never silently activates newer runtime behavior.
Cron & logs
set_cron_triggersreplaces the full trigger set; pass[]to clear.query_worker_logsneeds the Worker uploaded with observability enabled (deploy_worker'senable_observability, orupdate_worker_settings). Retention is 3 days (free) / 7 days (paid).
Development
npm run build # compile to dist/ (tsup, ESM)
npm run typecheck # tsc --noEmit
npm test # unit + protocol smoke — safe, no creds, CI-ready
npm run test:unit # pure-logic units, fully mocked fetch
npm run test:protocol # drives the built server over the MCP stdio wire
npm run test:live # guarded live e2e (CF_LIVE_TEST=1 + real creds)See test/README.md for the test layering. The live e2e
deploys a throwaway cf-mcp-test-* site through the real server, verifies it
serves over HTTP, and always cleans up.
Related Links
IMPLEMENTATION_PLAN.md - Verified API reference, design decisions, milestone history
cloudflare-pages-mcp - The maintenance-mode predecessor for existing Pages projects
Workers static assets docs - What this server wraps
Direct upload protocol - The asset-upload flow behind
deploy_static_site
License
MIT License - see LICENSE for details.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceExposes Cloudflare DNS, security, redirects and zone-settings functionality as structured tools that AI assistants like Claude Desktop can invoke directly.1833MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to manage Cloudflare resources through natural language, including DNS records, zone management, Workers KV storage, cache purging, and analytics. Supports comprehensive Cloudflare operations with secure API token authentication.132MIT
- Flicense-qualityDmaintenanceEnables AI assistants to manage Cloudflare infrastructure including DNS records, cache purging, SSL settings, Workers, and analytics through the Cloudflare API. Eliminates dashboard context-switching by allowing natural language control of domain management and infrastructure operations.
- Alicense-qualityDmaintenanceA Cloudflare Worker that provides API access to Postman collections and environments via the Claude AI MCP interface, enabling Claude to assist with API testing, documentation, and management tasks.183ISC
Related MCP Connectors
Live SEO workflow tools for Claude Code, Codex, and AI agents.
Read, edit, publish, and preview your pepita websites from Claude.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/daniil-shumko/cloudflare-workers-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server