workers-mcp

The `workers-mcp` repository provides tools to connect Claude Desktop or other MCP clients to a Cloudflare Worker, enabling custom functionalities and access to Cloudflare's services from within the LLM coding agent.

507
37

workers-mcp

Talk to a Cloudflare Worker from Claude Desktop!

[!NOTE]
Consider using the newer remote MCP server approach if starting a new MCP server. workers-mcp is a previous, local-only approach.

What is workers-mcp?

workers-mcp provides CLI tooling and Worker logic to connect Claude Desktop (or any MCP Client) to a Cloudflare Worker. It translates TypeScript methods in your Worker into MCP tools accessible via a local Node.js server. This server acts as a proxy, handling stdio transport and calling the relevant Worker methods on Cloudflare. This allows you to expose functions, APIs, or Cloudflare services to LLMs in coding agents like Claude Desktop.

image

Usage

The setup involves generating a new Worker using create-cloudflare, installing the workers-mcp package, and running the setup command. After modifying Worker code, use npm run deploy to update both Claude's metadata and the live Worker instance. Method name or parameter changes require a Claude restart to reflect updates.

Using with Other MCP Clients

Instructions are provided for configuring Cursor and other MCP clients like Windsurf to work with your Cloudflare MCP server, including specific formatting requirements for command and argument configurations.

Examples

The examples directory offers use cases:

  • examples/01-hello-world: Basic setup.
  • examples/02-image-generation: Uses Workers AI for image generation with Claude suggesting and refining prompts.
  • TODO Browser Rendering
  • TODO Durable Objects

Repository

CL
cloudflare

cloudflare/workers-mcp

Created

December 17, 2024

Updated

March 28, 2025

Language

TypeScript

Category

Developer Tools