Cloudflare Workers MCP Server
Provides read-only tools for inspecting Cloudflare Workers: listing Workers, reading a Worker's settings and bindings, listing recent versions and deployments, and checking a Worker URL's live HTTP status.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
cloudflare-workers-mcp-server
A read-only MCP server for Cloudflare Workers. Add one entry to your MCP client config and ask your assistant "what Workers do I have, what changed last, and is this one up?" — it lists the Workers in your account, reads one Worker's settings, lists its recent versions and deployments, and checks a worker URL's live HTTP status.
It is read-only by construction: the code only sends HTTP GET requests (Cloudflare API v4, plus the status-check fetch). There is no upload, deploy, edit or delete code path anywhere in the project.
1. Create a read-only Cloudflare API token
The four account tools need a token. Create the narrowest one:
Cloudflare dashboard → My Profile (top-right avatar) → API Tokens.
Create Token → Create Custom Token.
Permissions: Account → Workers Scripts → Read. (That one permission covers scripts, settings, versions and deployments.)
Account Resources: Include → your account only.
Create, copy the token once, and put it in the
envblock of your MCP client config (below). Never paste it into a chat, a repo or a screenshot — the server reads it from the environment only.
Also copy your Account ID: dashboard → Workers & Pages → the
right-hand panel shows it. You can set it as CF_ACCOUNT_ID or pass
account_id per tool call.
Related MCP server: mcp-server-cloudflare
2. Install
npm install
npm run buildNode 20+ is the only requirement. The server is TypeScript compiled to
dist/; your MCP client starts it with node dist/server.js.
Tools
list_workers— Workers in the account: name, created/modified times, exported handlers, last deployed from, compatibility date.get_worker— one Worker's settings: compatibility date and flags, usage model, observability, and bindings reduced to name and type only (binding values and secrets are never returned).list_versions— recent versions, newest first: number, ID, time, source, author, version message/tag.limit1–50, default 10.list_deployments— recent deployments, latest first; the first entry is what is serving traffic now: deployment ID, time, source, traffic split across version IDs, message, author.check_worker_status— live HTTP status of any worker URL: reachability, status code, response time, final URL after redirects, content type, server header. Needs no token.
If CF_API_TOKEN is missing, the four account tools return the token
setup instructions as the error — nothing is sent to Cloudflare.
Config: Claude Desktop
claude_desktop_config.json:
{
"mcpServers": {
"cloudflare-workers": {
"command": "node",
"args": ["/absolute/path/to/cloudflare-workers-mcp-server/dist/server.js"],
"env": {
"CF_API_TOKEN": "your-read-only-token",
"CF_ACCOUNT_ID": "your-32-hex-account-id"
}
}
}
}Config: Cursor
.cursor/mcp.json in your project, or ~/.cursor/mcp.json globally —
same shape as the Claude Desktop block above.
Config: Claude Code
claude mcp add cloudflare-workers \
-e CF_API_TOKEN=your-read-only-token \
-e CF_ACCOUNT_ID=your-32-hex-account-id \
-- node /absolute/path/to/cloudflare-workers-mcp-server/dist/server.jsThen ask, in plain words: "List my Cloudflare Workers", "What bindings does api-gateway have?", "Show the last 5 deployments of image-resizer", "Is https://api-gateway.example.workers.dev up?"
Safety: why read-only is the point
GET-only: every Cloudflare call in
src/cloudflare.tsis a GET; the status check is a plain fetch whose body is discarded.The token is read from
CF_API_TOKENat call time, is only ever sent as theAuthorizationheader toapi.cloudflare.com, and is never logged or included in any tool result.Settings parsing whitelists fields: a
plain_textbinding's value and any secret material cannot reach the client (there is a unit test that feeds a value through the parser and asserts it is gone).Inputs are validated strictly: account IDs must be 32 hex chars, worker names must match Workers naming rules, status-check URLs must be http(s).
Optional environment variables
CF_API_TOKEN— required for the four account tools.CF_ACCOUNT_ID— default account ID.CF_API_BASE_URL— override the API base (testing). Defaulthttps://api.cloudflare.com/client/v4.
Tests
npm test # parser + validation unit tests vs fixtures
node test/test-client.mjs # live stdio session (see transcript.md)Fixtures in test/fixtures/ are labeled as fixtures, hand-written to
the documented API v4 response shapes — they are not captured account
data.
Files
src/server.ts— MCP wiring (tool schemas + handlers)src/cloudflare.ts— API client, parsers, validation, status checktest/— unit tests, fixtures, stdio test clienttranscript.md— a real session: initialize, tools/list, a live status check, and the token gate firing with no token configured
License: MIT (see LICENSE).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Zero-dependency Cloudflare Worker gateway turning websites and REST APIs into MCP tools.
Cloudflare Workers MCP server: ai-crawler-policy
Cloudflare Workers MCP server: agent-workflow-engine
Cloudflare Workers MCP server: api-changelog-tracker
Related MCP Servers
- FlicenseBqualityDmaintenanceA demonstration project that uses Cloudflare Workers MCP to create custom AI tools that can be integrated with Claude, Cursor, and other AI assistants supporting the Model Context Protocol.230-
- AlicenseAqualityDmaintenanceMCP server to manage Cloudflare Workers, KV, R2, Pages, DNS, and cache from your IDE.1363 npm4MIT
- AlicenseCqualityDmaintenanceA high-performance MCP server providing AI assistants with read-only access to the Cloudflare ecosystem. Query your entire Cloudflare infrastructure using natural language through Claude, Cursor, or any MCP-compatible client.3905MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to read, write, and search security findings, engagement memory, and semantic triage via MCP tools on Cloudflare Workers.-