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.
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.
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.
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.
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.
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.cloudflare/workers-mcp
December 17, 2024
March 28, 2025
TypeScript