workers-mcp

MCP.Pizza Chef: cloudflare

A Cloudflare Worker is a small program that runs on Cloudflare's network. This package reads the functions you write in one, along with the comments describing them, and offers them to Claude Desktop, Cursor or Windsurf as things the assistant can actually run. Redeploying updates both sides, though renaming a function means restarting the assistant. Be aware that the project's own readme now points people to Cloudflare's newer remote-server guide instead, so this is the older approach.

Deprecated · readme now points to Cloudflare's remote-server guide instead
Coding

Use This MCP server To

Expose a function I wrote as a tool my assistant can call Generate images through Cloudflare's own models Reach an internal service without building a whole app Prototype a custom tool in an afternoon Try an idea out before committing to a real product

README

workers-mcp

Talk to a Cloudflare Worker from Claude Desktop!

Warning

You should start here instead — and build a remote MCP server

You can connect to remote MCP servers from Claude Desktop, Cursor, and other clients using mcp-remote.

What is workers-mcp?

This package provides both the CLI tooling and the in-Worker logic to connect Claude Desktop (or any MCP Client) to a Cloudflare Worker on your account, so you can customise it to suit your needs. It works via a build step that can translate TypeScript methods of your Worker like this:

export class ExampleWorkerMCP extends WorkerEntrypoint<Env> {
  /**
   * Generates a random number. This is extra random because it had to travel all the way to
   * your nearest Cloudflare PoP to be calculated which... something something lava lamps?
   *
   * @return {string} A message containing a super duper random number
   * */
  async getRandomNumber() {
    return `Your random number is ${Math.random()}`
  }
  
  // ...etc
}

...into MCP tools that a local Node.js server can expose to MCP clients. The Node.js server acts as a proxy, handling stdio transport locally, and calling the relevant method of your Worker running on Cloudflare. This allows you to expose any function or API in your app, or any service in Cloudflare's developer platform, back to a LLM in your coding agent, Claude Desktop or other MCP client.

image

Yes, I know that Math.random() works the same on a Worker as it does on your local machine, but don't tell Claude 🤫

workers-mcp FAQ

Do I need to write code?
Yes. It turns functions you wrote yourself into tools, so it assumes you can build a Cloudflare Worker.
Is this still the recommended way?
No. The readme now points to Cloudflare's guide for building a remote server, which is where new projects should start.
Which apps does it work in?
Claude Desktop is the main target, with written notes for Cursor and Windsurf.
Do I need a key?
No separate key is described, but you do need a Cloudflare account to publish the Worker.
How do I update a tool?
Redeploy the Worker. If you rename, add or remove functions, restart the assistant so it notices the change.
Can I use this to let Claude run my own code?
Yes — that is the whole point, and each function's comment tells the assistant what it does.