{"_id":"cloudflare-workers-mcp","_rev":"5-a9b3b6a30c4b831505dc096bf8ce00be","name":"cloudflare-workers-mcp","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"cloudflare-workers-mcp","version":"1.0.0","keywords":["cloudflare","workers","static-assets","mcp","model-context-protocol","claude","deployments"],"author":{"name":"Daniil Shumko"},"license":"MIT","_id":"cloudflare-workers-mcp@1.0.0","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"homepage":"https://github.com/daniil-shumko/cloudflare-workers-mcp#readme","bugs":{"url":"https://github.com/daniil-shumko/cloudflare-workers-mcp/issues"},"bin":{"cloudflare-workers-mcp":"dist/index.js"},"dist":{"shasum":"5c061c83a9ba92fdf564a3a2fd28a331455810e4","tarball":"https://registry.npmjs.org/cloudflare-workers-mcp/-/cloudflare-workers-mcp-1.0.0.tgz","fileCount":4,"integrity":"sha512-maxn4tPbglKGzrlSk4OIODOaGv5c60JbI6sVb5Wa+H36kfiJ+sxsW0TX4iVlJCMFizwUSBH6PUtKoLsvpnKpKA==","signatures":[{"sig":"MEYCIQD1QjBf7Krv51eWEVRmv2m8FOAxeRiMKygn645euXmTeQIhANKwSmYnoN3RUTXXrA8C3EikG1cYyFhwtwl2LrRXiuUL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82220},"main":"dist/index.js","type":"module","engines":{"node":">=22.0.0"},"gitHead":"cc8b0de539052cbf14706dff3a83afbf00fe6295","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"npm run test:unit && npm run test:protocol","build":"tsup src/index.ts --format esm --clean","start":"node dist/index.js","test:live":"CF_LIVE_TEST=1 node --import tsx --test \"test/integration/**/*.test.ts\"","test:unit":"node --import tsx --test \"test/unit/**/*.test.ts\"","typecheck":"tsc --noEmit","test:protocol":"npm run build && node --import tsx --test \"test/protocol/**/*.test.ts\"","prepublishOnly":"npm run build","typecheck:test":"tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"daniil-shumko","email":"daniil@rndteams.com"},"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-workers-mcp.git","type":"git"},"_npmVersion":"10.9.8","description":"MCP server for managing Cloudflare Workers: deploy static sites and Worker scripts, manage versions, deployments, custom domains, and cron triggers","directories":{},"_nodeVersion":"22.23.1","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.1","tsup":"^8.0.0","typescript":"^7.0.2","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cloudflare-workers-mcp_1.0.0_1783958025319_0.6942397001250442","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"cloudflare-workers-mcp","version":"1.1.1","keywords":["cloudflare","workers","static-assets","mcp","model-context-protocol","claude","deployments"],"author":{"name":"Daniil Shumko"},"license":"MIT","_id":"cloudflare-workers-mcp@1.1.1","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"homepage":"https://github.com/daniil-shumko/cloudflare-workers-mcp#readme","bugs":{"url":"https://github.com/daniil-shumko/cloudflare-workers-mcp/issues"},"bin":{"cloudflare-workers-mcp":"dist/index.js"},"dist":{"shasum":"0ef8f3c1635bb636dcc5b3d667cf12c93ca0d1c1","tarball":"https://registry.npmjs.org/cloudflare-workers-mcp/-/cloudflare-workers-mcp-1.1.1.tgz","fileCount":4,"integrity":"sha512-slCp2PRtEwUuK0L6Crt1syt/uvXZZdwjSsmiSMiyeCLh25hdTSUvFBh+F5ZtmQ3ZKIlkdBJPPASYyjXZfx3U+A==","signatures":[{"sig":"MEYCIQDFpQ3hYDMSuLElvOkz4Isvj24tLvN8F7kR9N18dz5nAgIhAJK3kjEg3GZNHLD8P8v3WZ03heXIKVpKOKKl8CrrlcT1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQC6A0xz1urBlZakQ5D4Z/vDxC1JA//6U4t0R0A8iuFEoAIhAOUXgllis/PhTRxBQjKpeCgSjz1HMImi/PyNkn98fnBh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cloudflare-workers-mcp@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":84047},"main":"dist/index.js","type":"module","engines":{"node":">=22.0.0"},"gitHead":"3684dfe64d903f26987d8b10f45ae26466e456ca","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"npm run test:unit && npm run test:protocol","build":"tsup src/index.ts --format esm --clean","start":"node dist/index.js","test:live":"CF_LIVE_TEST=1 node --import tsx --test \"test/integration/**/*.test.ts\"","test:unit":"node --import tsx --test \"test/unit/**/*.test.ts\"","typecheck":"tsc --noEmit","test:protocol":"npm run build && node --import tsx --test \"test/protocol/**/*.test.ts\"","prepublishOnly":"npm run build","typecheck:test":"tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"3e912cae-d98a-49fe-9a80-fb7d2eb457af"}},"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-workers-mcp.git","type":"git"},"_npmVersion":"11.19.1","description":"MCP server for managing Cloudflare Workers: deploy static sites and Worker scripts, manage versions, deployments, custom domains, and cron triggers","directories":{},"_nodeVersion":"24.22.2","dependencies":{"zod":"^4.6.7","@modelcontextprotocol/sdk":"^1.32.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.15","tsup":"^9.0.0","typescript":"^7.0.2","@types/node":"^22.20.5"},"_npmOperationalInternal":{"tmp":"tmp/cloudflare-workers-mcp_1.1.1_1793921324290_0.309708143793441","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"cloudflare-workers-mcp","version":"1.2.0","keywords":["cloudflare","workers","static-assets","mcp","model-context-protocol","claude","deployments"],"author":{"name":"Daniil Shumko"},"license":"MIT","_id":"cloudflare-workers-mcp@1.2.0","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"homepage":"https://github.com/daniil-shumko/cloudflare-workers-mcp#readme","bugs":{"url":"https://github.com/daniil-shumko/cloudflare-workers-mcp/issues"},"bin":{"cloudflare-workers-mcp":"dist/index.js"},"dist":{"shasum":"14a61fa7a8ee15cfe7a9d3e2f70d6de30f794dbd","tarball":"https://registry.npmjs.org/cloudflare-workers-mcp/-/cloudflare-workers-mcp-1.2.0.tgz","fileCount":4,"integrity":"sha512-cd42uxUBUnHsUMD766r/wb7kQhml/BJLxFe5+11+hMnw0jO8B8YWyzF3RUMWPCFUZpdvlesxopGp5mA+eQl8Zg==","signatures":[{"sig":"MEUCIFYElX1Tp6KIoPijUTB/t+FngVmOQjMzY3XzSwwvq2UmAiEAnf7/CQyJE7grvrF2YEkhBOTf1I4oFeiIqHlq7uMeCK8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIBJ+73CPZpTCiuo6NVd5l5mbZwrG3cKroA+i8M8h0sO2AiEA1AhquS3khjwRB5IabO9DPSznoNoVMoNpPOrudZfh+ko=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cloudflare-workers-mcp@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":107911},"main":"dist/index.js","type":"module","engines":{"node":">=22.0.0"},"gitHead":"dd00f3a0690edf0ff0bf6ac420da73cc5e7dbd56","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"npm run test:unit && npm run test:protocol","build":"tsup src/index.ts --format esm --clean","start":"node dist/index.js","test:live":"CF_LIVE_TEST=1 node --import tsx --test \"test/integration/**/*.test.ts\"","test:unit":"node --import tsx --test \"test/unit/**/*.test.ts\"","typecheck":"tsc --noEmit","test:protocol":"npm run build && node --import tsx --test \"test/protocol/**/*.test.ts\"","prepublishOnly":"npm run build","typecheck:test":"tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"3e912cae-d98a-49fe-9a80-fb7d2eb457af"}},"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-workers-mcp.git","type":"git"},"_npmVersion":"11.19.1","description":"MCP server for managing Cloudflare Workers: deploy static sites and Worker scripts, manage versions, deployments, custom domains, and cron triggers","directories":{},"_nodeVersion":"24.22.2","dependencies":{"zod":"^4.6.7","@modelcontextprotocol/server":"^2.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.15","tsup":"^9.0.0","typescript":"^7.0.2","@types/node":"^22.20.5","@modelcontextprotocol/client":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/cloudflare-workers-mcp_1.2.0_1793921875313_0.6547014461355982","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"cloudflare-workers-mcp","version":"1.3.0","keywords":["cloudflare","workers","static-assets","mcp","model-context-protocol","claude","deployments"],"author":{"name":"Daniil Shumko"},"license":"MIT","_id":"cloudflare-workers-mcp@1.3.0","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"homepage":"https://github.com/daniil-shumko/cloudflare-workers-mcp#readme","bugs":{"url":"https://github.com/daniil-shumko/cloudflare-workers-mcp/issues"},"bin":{"cloudflare-workers-mcp":"dist/index.js"},"dist":{"shasum":"c9a5f785dc4e659130d91983f22de8e794e6cbb8","tarball":"https://registry.npmjs.org/cloudflare-workers-mcp/-/cloudflare-workers-mcp-1.3.0.tgz","fileCount":4,"integrity":"sha512-oWDlYkCULQGrBYxpAbI9Bjtv6sR/G/thoUqrPDk3blm1kOJ3ArbZc/hZAdnhF8b8GV4ojgcqnE+oP8S0A4xfMw==","signatures":[{"sig":"MEUCIAdfcdYhQfH+M1mQzPvG9x/hUKIJedsNdUgWFB1K4EHpAiEA/XQeASGk/DOxNp7EYtMtYDPjqLdJ17KzqqsXce+enDY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIDYpy3TKG9vNH3QhRbcm2MVRAsC51Wsez0xGNrQkdgJbAiEAiujoaLAnp4Kmv+sTWfYqxdo6RGyLGOynIOr7xiOEEoE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cloudflare-workers-mcp@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":118119},"main":"dist/index.js","type":"module","engines":{"node":">=22.0.0"},"gitHead":"e918db804b4c0a9def23fd7b60428180a12a54a3","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"npm run test:unit && npm run test:protocol","build":"tsup src/index.ts --format esm --clean","start":"node dist/index.js","test:live":"CF_LIVE_TEST=1 node --import tsx --test \"test/integration/**/*.test.ts\"","test:unit":"node --import tsx --test \"test/unit/**/*.test.ts\"","typecheck":"tsc --noEmit","test:protocol":"npm run build && node --import tsx --test \"test/protocol/**/*.test.ts\"","prepublishOnly":"npm run build","typecheck:test":"tsc --noEmit -p tsconfig.test.json"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"3e912cae-d98a-49fe-9a80-fb7d2eb457af"}},"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-workers-mcp.git","type":"git"},"_npmVersion":"11.19.1","description":"MCP server for managing Cloudflare Workers: deploy static sites and Worker scripts, manage versions, deployments, custom domains, and cron triggers","directories":{},"_nodeVersion":"24.22.2","dependencies":{"zod":"^4.6.7","@modelcontextprotocol/server":"^2.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.15","tsup":"^9.0.0","typescript":"^7.0.2","@types/node":"^22.20.5","@modelcontextprotocol/client":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/cloudflare-workers-mcp_1.3.0_1793925458711_0.4858198095261519","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"_id":"cloudflare-workers-mcp@1.4.0","bin":{"cloudflare-workers-mcp":"dist/index.js"},"bugs":{"url":"https://github.com/daniil-shumko/cloudflare-workers-mcp/issues"},"dist":{"shasum":"e5171ab5f84f2d89b6a7788651a3e347bcd1d41d","tarball":"https://registry.npmjs.org/cloudflare-workers-mcp/-/cloudflare-workers-mcp-1.4.0.tgz","fileCount":4,"integrity":"sha512-38Dh7jPi1PyWf0oMzqhDc8n5x+pKxhYc7aGGUQIhqQSkuWJ7Sp2zL9splgIs1jiyNuC2hE5G5o/cLUYOR4ctBA==","signatures":[{"sig":"MEUCIHIzd90mG3NC3RoeiqESQ9FsaaJ2tnfRB8pm7JO2IEI+AiEAsSKFSeR2xhCI2n0XaOo0kYFTBmps+HcHUNV3qIJi8dg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDoVu73SqLW/KXnJ65MaN7y8rnPozR67dcTYZYwdpYkbQIhAItqeCyJ5AqqqlzN2yZwqFTTnHODHBLRxgT4Cdy3F8ue"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cloudflare-workers-mcp@1.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":122346},"main":"dist/index.js","name":"cloudflare-workers-mcp","type":"module","author":{"name":"Daniil Shumko"},"engines":{"node":">=22.0.0"},"gitHead":"2c26ed48e111747d087b1cb219a0822676ba4819","license":"MIT","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"npm run test:unit && npm run test:protocol","build":"tsup src/index.ts --format esm --clean","start":"node dist/index.js","test:live":"CF_LIVE_TEST=1 node --import tsx --test \"test/integration/**/*.test.ts\"","test:unit":"node --import tsx --test \"test/unit/**/*.test.ts\"","typecheck":"tsc --noEmit","test:protocol":"npm run build && node --import tsx --test \"test/protocol/**/*.test.ts\"","prepublishOnly":"npm run build","typecheck:test":"tsc --noEmit -p tsconfig.test.json"},"version":"1.4.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"3e912cae-d98a-49fe-9a80-fb7d2eb457af"}},"homepage":"https://github.com/daniil-shumko/cloudflare-workers-mcp#readme","keywords":["cloudflare","workers","static-assets","mcp","model-context-protocol","claude","deployments"],"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-workers-mcp.git","type":"git"},"_npmVersion":"11.19.1","description":"MCP server for managing Cloudflare Workers: deploy static sites and Worker scripts, manage versions, deployments, custom domains, and cron triggers","directories":{},"maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"_nodeVersion":"24.22.2","dependencies":{"zod":"^4.6.7","@modelcontextprotocol/server":"^2.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.15","tsup":"^9.0.0","typescript":"^7.0.2","@types/node":"^22.20.5","@modelcontextprotocol/client":"^2.4.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cloudflare-workers-mcp_1.4.0_1793926021420_0.9097893149457403"}}},"time":{"created":"2026-07-13T15:53:44.879Z","modified":"2026-11-06T00:47:01.847Z","1.0.0":"2026-07-13T15:53:45.443Z","1.1.1":"2026-11-05T23:28:44.398Z","1.2.0":"2026-11-05T23:37:55.437Z","1.3.0":"2026-11-06T00:37:38.807Z","1.4.0":"2026-11-06T00:47:01.504Z"},"bugs":{"url":"https://github.com/daniil-shumko/cloudflare-workers-mcp/issues"},"author":{"name":"Daniil Shumko"},"license":"MIT","homepage":"https://github.com/daniil-shumko/cloudflare-workers-mcp#readme","keywords":["cloudflare","workers","static-assets","mcp","model-context-protocol","claude","deployments"],"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-workers-mcp.git","type":"git"},"description":"MCP server for managing Cloudflare Workers: deploy static sites and Worker scripts, manage versions, deployments, custom domains, and cron triggers","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"readme":"# Cloudflare Workers MCP Server\n\n[![npm version](https://img.shields.io/npm/v/cloudflare-workers-mcp.svg)](https://www.npmjs.com/package/cloudflare-workers-mcp)\n[![Tests](https://github.com/daniil-shumko/cloudflare-workers-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/daniil-shumko/cloudflare-workers-mcp/actions/workflows/test.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen)](https://nodejs.org)\n[![MCP](https://img.shields.io/badge/MCP-Compatible-blue)](https://modelcontextprotocol.io)\n\n> ⚠️ **Security warning**: this server was substantially AI-written. Before\n> pointing it at an account you care about: (1) review the code — it is small\n> and readable, an audit takes ~30 minutes; (2) for maximum caution, clone and\n> build from source rather than trusting the npm artifact (or at least pin an\n> exact version); (3) give the API token the minimum permission\n> (**Workers Scripts: Edit**) and nothing else; (4) prefer a test account for\n> the first runs; (5) tools that take a local path (`directory`,\n> `modules[].path`) upload whatever they point at to your Cloudflare account,\n> where it can become publicly reachable, so keep your MCP client's approval\n> prompts on for the deploy tools and check those paths before approving.\n\nA [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for\nmanaging Cloudflare Workers from Claude Desktop or Claude Code — the successor\nto [cloudflare-pages-mcp](https://github.com/daniil-shumko/cloudflare-pages-mcp),\nfollowing Cloudflare's own shift from Pages to\n[Workers with static assets](https://developers.cloudflare.com/workers/static-assets/).\n\n## Why\n\nAs of mid-2026, no other MCP server — including Cloudflare's official ones —\ncan deploy a Worker. Cloudflare's remote MCP servers are read-only for Workers\nmanagement, and their Code Mode server has no filesystem so it can't upload\nreal asset trees. A local stdio server can: the Workers static-asset upload\nprotocol is [publicly documented](https://developers.cloudflare.com/workers/static-assets/direct-upload/),\nso this server's headline feature is:\n\n> *\"Deploy this directory as a static site on Cloudflare Workers\"* — in one\n> natural-language request, with free unlimited static-asset serving.\n\n## Tools\n\n### Static sites (the differentiator)\n- **deploy_static_site** - Deploy a local directory as a static site: manifest hashing, server-side dedupe (unchanged files never re-upload), `_headers`/`_redirects` support, SPA/404 handling, `base_path` URL prefix (where Cloudflare has enabled it for the account), live workers.dev URL in the result. Deploying over a Worker that has code replaces it with assets only, which removes its bindings and secrets (the result lists them in `secrets_dropped`)\n- **redeploy_assets** - Redeploy reusing the live version's files and asset config, e.g. to bump the compatibility date. To change `html_handling`/`not_found_handling`/`base_path`, re-run `deploy_static_site`: unchanged files dedupe, so nothing re-uploads\n\n### Previews (beta)\n- **deploy_preview** - Deploy a preview of a site directory or Worker code without touching production, at a stable `https://<preview>-<worker>.<account>.workers.dev` URL plus a per-deployment URL. Redeploying the same `preview_name` updates it\n- **list_previews / delete_preview** - List a Worker's previews with their URLs, or delete one by name\n\n### Workers\n- **list_workers** - List all Workers in your account with created/modified/last-deployed times and workers.dev/observability status\n- **get_worker** - Settings (bindings, compat date/flags, placement, observability) plus cron triggers and workers.dev status\n- **get_worker_code** - Download a Worker's deployed source (all modules)\n- **deploy_worker** - Upload and deploy ES-module Workers with bindings (`plain_text`, `secret_text`, `kv_namespace`, `r2_bucket`, `d1`, `assets`). Each module is inline `content` or a local file `path` (bundled `.js`, `.wasm`, text/data), so large sources never pass through the conversation. Existing secrets are kept across redeploys\n- **update_worker_settings** - Change bindings/compat/logpush/observability without re-uploading code (existing secrets are kept unless listed)\n- **delete_worker** - Permanently delete a Worker (optional `force`)\n\n### Secrets\n- **list_secrets** - Secret names and types on a Worker (values are never returned)\n- **set_secrets** - Set or delete several secrets in one new deployed version (`null` deletes) without touching code or other bindings\n- **delete_secret** - Remove one secret\n\n### Versions & deployments\n- **list_versions / get_version** - Immutable version history and per-version detail\n- **create_version** - Staged upload that does NOT touch live traffic\n- **list_deployments / create_deployment** - Map traffic to versions: single version at 100% or gradual splits (e.g. 90/10)\n- **rollback_worker** - Deploy an older version back to 100% traffic\n\n### Domains, routing, cron\n- **list_worker_domains / add_worker_domain / delete_worker_domain** - Custom domains (zone must be active in your account)\n- **set_workers_dev** - Enable/disable `<name>.<account>.workers.dev` serving and version preview URLs\n- **get_cron_triggers / set_cron_triggers** - Read or replace a Worker's cron trigger set\n\n### Observability\n- **tail_worker** - Live tail like `wrangler tail` for a short window (up to 50 s): requests, `console.log` output, exceptions and outcomes. Works on any Worker. Pass `trigger_url` to send a request once connected and capture it in the same call\n- **query_worker_logs** - Workers Logs with time window, error filter, full-text search, and cursor paging to older events (`next_cursor`). Requires observability enabled on the Worker\n- **health_check** - Verify API token and connection to Cloudflare\n\n## Quick Start\n\nRequires **Node.js 22+**.\n\n**Option A: install from npm**\n```bash\nnpm install -g cloudflare-workers-mcp\n```\n\n**Option B: clone and build locally (for code review)**\n```bash\ngit clone https://github.com/daniil-shumko/cloudflare-workers-mcp\ncd cloudflare-workers-mcp\nnpm install\nnpm run build\nnpm test        # unit + MCP protocol smoke, no creds needed\n```\n\n### Configure Claude Desktop/Code\n\nCreate an API token with **Workers Scripts: Edit** (the \"Edit Cloudflare\nWorkers\" template works; both user and account-owned tokens are fine), find\nyour account ID in the [dashboard](https://dash.cloudflare.com), then:\n\n```json\n{\n  \"mcpServers\": {\n    \"cloudflare-workers\": {\n      \"command\": \"npx\",\n      \"args\": [\"cloudflare-workers-mcp\"],\n      \"env\": {\n        \"CLOUDFLARE_API_TOKEN\": \"your_token_here\",\n        \"CLOUDFLARE_ACCOUNT_ID\": \"your_account_id_here\"\n      }\n    }\n  }\n}\n```\n\n(If you built from source, use `\"command\": \"node\"` with\n`\"args\": [\"/absolute/path/to/cloudflare-workers-mcp/dist/index.js\"]` instead.)\n\nOr with the Claude Code CLI:\n\n```bash\nclaude mcp add cloudflare-workers \\\n  -e CLOUDFLARE_API_TOKEN=your_token_here \\\n  -e CLOUDFLARE_ACCOUNT_ID=your_account_id_here \\\n  -- npx cloudflare-workers-mcp\n```\n\n## Usage Examples\n\n```\nDeploy the ./dist folder as a static site called my-blog\n```\n\n```\nDeploy ./build as an SPA — client-side routing should fall back to index.html\n```\n\n```\nDeploy this worker script with a KV binding for CACHE (namespace abc123)\n```\n\n```\nStage the new version without deploying, then roll it out 10% / 90%\n```\n\n```\nRoll my-api back to the previous version\n```\n\n```\nAttach app.example.com to my-api and add a cron trigger every 30 minutes\n```\n\n```\nShow me the errors my-api logged in the last 2 hours\n```\n\n```\nTail my-api while you hit /checkout and tell me why it throws\n```\n\n```\nDeploy ./dist as a preview of my-blog called redesign\n```\n\n```\nRotate STRIPE_KEY on my-api and remove the old LEGACY_TOKEN secret\n```\n\n## Important Notes\n\n### Static site deploys\n- Unchanged files are **deduped server-side**: redeploying an identical\n  directory uploads zero bytes and still creates a new version.\n- A `_headers` or `_redirects` file at the directory root is applied as\n  configuration ([syntax](https://developers.cloudflare.com/workers/static-assets/headers/)),\n  not uploaded as a public asset. A root `.assetsignore` is applied with\n  gitignore-style rules (globs, `!` negation, `dir/` and `/anchored`\n  patterns; character classes unsupported) and the result reports how many\n  files it excluded.\n- Limits: 25 MiB per file; 20,000 files per version on free plans\n  (100,000 on paid). Static-asset requests are free and unmetered.\n- Symlinks inside the directory are followed; symlinks pointing outside it\n  abort the deploy.\n\n### Versions & rollouts\n- `create_version` stages code; only `create_deployment` (or a direct\n  deploy) shifts traffic. Gradual rollouts split across at most two\n  versions and percentages must sum to 100.\n- Rollbacks reach the 100 most recent versions and never revert data in\n  bound resources (KV, R2, D1); a changed secret blocks rollback unless\n  `force` is set.\n- Tools that build on the current version (`redeploy_assets`,\n  `deploy_worker`/`create_version` with `keep_assets`, and binding or\n  compatibility changes in `update_worker_settings`) **refuse while a\n  staged version or a gradual rollout is pending**. Otherwise the staged code\n  would silently become the base. Deploy or roll back first with\n  `create_deployment`.\n- Cloudflare also blocks secret edits while the newest version isn't the\n  deployed one, for example right after a rollback (error 10215). Redeploy with\n  `deploy_worker` or deploy the newest version, then retry.\n\n### Domains & serving\n- Custom domains require the zone to be **active in the same Cloudflare\n  account** — external/partial zones are not supported (unlike Pages).\n- Deploy tools enable workers.dev serving for **newly created** Workers so\n  the result carries a working URL. Redeploys never change an existing\n  Worker's workers.dev setting unless `enable_workers_dev` is passed\n  explicitly — a deliberately disabled Worker stays private.\n- When `compatibility_date` is omitted, deploys **preserve the existing\n  Worker's pinned date** (new Workers get today's date) — a redeploy never\n  silently activates newer runtime behavior.\n\n### Cron & logs\n- `set_cron_triggers` **replaces** the full trigger set; pass `[]` to clear.\n- `query_worker_logs` needs the Worker uploaded with observability enabled\n  (`deploy_worker`'s `enable_observability`, or `update_worker_settings`).\n  Retention is 3 days (free) / 7 days (paid).\n- `tail_worker` needs no setup but only sees traffic during its window, so use\n  `trigger_url` (https only, redirects not followed) or send traffic while it\n  runs. Request headers and `cf` metadata are dropped from the results.\n\n### Secrets & previews\n- Every `set_secrets` / `delete_secret` call creates **and deploys** a new\n  version. Secret values travel through the conversation, so for highly\n  sensitive values `wrangler secret put` keeps them out of it.\n- Previews use Cloudflare's **beta** Worker Previews API and attach to an\n  existing Worker (deploy production first). `deploy_preview` turns on the\n  Worker's preview URLs (`previews_enabled`) if they are off. It never\n  changes production workers.dev serving.\n\n## Development\n\n```bash\nnpm run build          # compile to dist/ (tsup, ESM)\nnpm run typecheck      # tsc --noEmit\nnpm test               # unit + protocol smoke — safe, no creds, CI-ready\nnpm run test:unit      # pure-logic units, fully mocked fetch\nnpm run test:protocol  # drives the built server over the MCP stdio wire\nnpm run test:live      # guarded live e2e (CF_LIVE_TEST=1 + real creds)\n```\n\nSee [test/README.md](test/README.md) for the test layering. The live e2e\ndeploys a throwaway `cf-mcp-test-*` site through the real server, verifies it\nserves over HTTP, and always cleans up.\n\n## Related Links\n\n- [IMPLEMENTATION_PLAN.md](IMPLEMENTATION_PLAN.md) - Verified API reference, design decisions, milestone history\n- [cloudflare-pages-mcp](https://github.com/daniil-shumko/cloudflare-pages-mcp) - The maintenance-mode predecessor for existing Pages projects\n- [Workers static assets docs](https://developers.cloudflare.com/workers/static-assets/) - What this server wraps\n- [Direct upload protocol](https://developers.cloudflare.com/workers/static-assets/direct-upload/) - The asset-upload flow behind `deploy_static_site`\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","readmeFilename":"README.md"}