mcp-worker-bridge
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-worker-bridgeDeploy a stateless MCP server to Cloudflare Workers using createMcpHandler"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server (createMcpHandler)
The simplest way to run a stateless MCP server on Cloudflare Workers. Uses createMcpHandler from the Agents SDK to handle all MCP protocol details in one line.
What it demonstrates
createMcpHandler— the Agents SDK helper that turns anMcpServerfactory into a Worker-compatible fetch handlerMinimal setup — define tools in a factory, pass the factory to
createMcpHandler, doneStateless — no Durable Objects, no persistent state, each request is independent
Related MCP server: remote-mcp-server-authless
Running
pnpm install
pnpm startOpen the browser to see the built-in tool tester, or connect with the MCP Inspector at http://localhost:5173/mcp.
How it works
import { McpServer } from "@modelcontextprotocol/server";
import { createMcpHandler } from "agents/mcp/server";
import { z } from "zod";
function createServer() {
const server = new McpServer({ name: "Hello MCP Server", version: "1.0.0" });
server.registerTool(
"hello",
{
description: "Returns a greeting",
inputSchema: { name: z.string().optional() }
},
async ({ name }) => ({
content: [{ type: "text", text: `Hello, ${name ?? "World"}!` }]
})
);
return server;
}
export default {
fetch(request, env, ctx) {
return createMcpHandler(createServer)(request, env, ctx);
}
} satisfies ExportedHandler;Related examples
mcp— stateful MCP server withMcpAgentand Durable Objectsmcp-worker-authenticated— adding OAuth authenticationmcp-client— connecting to MCP servers as a client
This server cannot be deployed
Maintenance
Related MCP Connectors
Cloudflare Workers MCP server: ai-agent-scratchpad
Cloudflare Workers MCP server: interactive-api-playground
Cloudflare Workers MCP server: agent-memory
Cloudflare Workers MCP server: ai-eval
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceDeployable stateless remote MCP server on Cloudflare Workers without auth, with support for registering custom tools and connecting to MCP clients.12MIT
- FlicenseNot gradedqualityBmaintenanceEnables deploying a stateless remote MCP server on Cloudflare Workers without authentication, with support for custom tool registration and connections from MCP clients.-
- FlicenseNot gradedqualityCmaintenanceEnables running a stateless MCP server on Cloudflare Workers with minimal setup, using a single fetch handler to expose tools through the MCP protocol.1-
- FlicenseNot gradedqualityBmaintenanceEnables deploying a stateless remote MCP server on Cloudflare Workers without authentication, supporting custom tools and compatibility with legacy MCP clients.-