Get the FREE Ultimate OpenClaw Setup Guide →

workers

Talk to a Cloudflare Worker from Claude Desktop!

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio geelen-workers-mcp-server node <absolute-path-to>/node_modules/tsx/dist/cli.mjs <project-dir>/scripts/local-proxy.ts <server-alias> <worker-url> <entrypoint-name>

How to use

This MCP server acts as a local/development proxy that exposes a Cloudflare Workers-based MCP endpoint for Claude Desktop to interact with. It leverages a local MCP proxy script to fetch documentation for your worker entrypoint and route tool list and tool calls to the remote worker. The setup uses a small local server that reads docs.json generated from your src/index.ts and then tunnels tool calls through to your Cloudflare Worker via the /rpc endpoint. You can install as many of these as you like, each with a distinct server-alias and worker URL, enabling parallel testing of multiple worker entrypoints or configurations. Typical usage involves generating docs, deploying the worker locally, and then registering the local proxy with Claude Desktop so you can list and call worker methods from the MCP interface.

How to install

Prerequisites:

  • Node.js installed on your machine
  • pnpm installed (or use npm/yarn if you prefer)
  • Wrangler (for Cloudflare Workers) setup if you plan to deploy the demo locally

Step-by-step:

  1. Clone the repository containing the Workers MCP server code.
  2. Install dependencies:
pnpm install
  1. Build or prepare the docs and deployment steps as described in the README (the workflow uses a local proxy to connect Claude Desktop to your worker):
pnpm deploy:worker
  1. Generate and upload secrets (only once):
npx workers-mcp secret generate
npx workers-mcp secret upload
  1. Install the MCP server definition into Claude Desktop (one per server alias):
npx workers-mcp install <server-alias> <worker-url>
  1. Restart Claude Desktop after installation to pick up changes.

Notes:

  • The setup relies on a local proxy script (scripts/local-proxy.ts) and a docs generator to produce docs.json from your worker entrypoint (src/index.ts).
  • If you modify your MCP server methods or docs, you may need to redeploy the worker and restart Claude Desktop.
  • Ensure wrangler.json is correctly configured for any Cloudflare-related features you enable in your Worker deployment.

Additional notes

Tips and common issues:

  • The README notes that this MCP server is superseded by the Workers MCP package; consider using the newer package for long-term maintenance.
  • If Claude Desktop isn’t detecting changes after you update code or docs, a restart is often necessary.
  • The local proxy communicates with the remote worker via the /rpc endpoint and uses a Bearer token stored in generated/.shared-secret; ensure this is uploaded and accessible.
  • In environments where Email Routing or Browser Rendering is not accessible, comment out the related sections in wrangler.json to avoid deployment failures.
  • The mcp_config example uses placeholders; replace <absolute-path-to>, <server-alias>, <worker-url>, and <entrypoint-name> with your real paths and identifiers.

Related MCP Servers

Sponsor this space

Reach thousands of developers