Design Engineer Logo
Visit Repo
Open Graph preview

Workers MCP Server

Talk to a Cloudflare Worker from Claude Desktop

Site favicon
🌩️ Cloud

Overview

Workers MCP Server

Description:
A Cloudflare Worker implementation for extending Claude Desktop with custom functions

Category: Developer Tools / Integration

Overview:
Workers MCP Server enables you to create custom functions in Cloudflare Workers that can be accessed through Claude Desktop. It leverages Cloudflare Worker's RPC syntax and supports various Cloudflare and third-party bindings.

Key features:

  • Automatic documentation generation from TypeScript/JSDoc
  • Built-in proxy system for secure communication
  • Support for Email Routing API and Browser Rendering
  • Easy deployment with Wrangler

Setup & Installation:

# Install dependencies
pnpm install

# Deploy worker
pnpm deploy:worker

# Generate and upload secret
npx workers-mcp secret generate && npx workers-mcp secret upload

# Install server
npx workers-mcp install <server-alias> <worker-url>

Configuration Example:

{
  "mcp-server-worker": {
    "command": "/path/to/node",
    "args": ["/path/to/tsx/cli.mjs", "/path/to/local-proxy.ts", "server-alias", "worker-url", "entrypoint-name"],
    "env": {
      "WORKER_SECRET": "YOUR_GENERATED_SECRET"
    }
  }
}

Example Implementation:

export class ExampleWorkerMCP extends WorkerEntrypoint<Env> {
  async getRandomNumber() {
    return `Your random number is ${Math.random()}`
  }
}

Note: This project has been superseded by the Workers MCP package, but remains a useful reference implementation for understanding MCP server architecture with Cloudflare Workers.