Building a Remote MCP Server on Cloudflare (Without Auth)
@Holic101
概要
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This example allows you to deploy a remote MCP server that doesn't require authentication on Cloudflare Workers. It is for developers who want to run MCP tools on Cloudflare’s edge and connect to them from clients like Cloudflare AI Playground or Claude Desktop.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy via the “Deploy to Workers” button or using npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. After deployment, customize tools by editing src/index.ts and adding this.server.tool(...) calls. Connect clients by providing the SSE URL (e.g., remote-mcp-server-authless.<account>.workers.dev/sse).
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploy an MCP server without authentication.
- Runs on Cloudflare Workers edge network.
- Easy deployment via button or CLI template.
- Customize tools by editing
src/index.ts. - Connect to Cloudflare AI Playground directly.
- Works with Claude Desktop via mcp-remote proxy.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Expose MCP tools to remote clients without managing auth.
- Integrate MCP tools with Cloudflare AI Playground.
- Connect MCP tools to Claude Desktop over SSE.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
What does “without auth” mean?
The server does not require authentication for access, making it suitable for development or test environments.
What are the runtime requirements?
It runs on Cloudflare Workers; no dedicated server needed. For local development, you only need npm and the Cloudflare CLI.
Where is the deployed server URL?
After deployment, the server is available at remote-mcp-server-authless.<your-account>.workers.dev/sse.
How do I connect from a client like Claude Desktop?
Use the mcp-remote npm package as a proxy in your Claude Desktop configuration, specifying the SSE URL as shown in the README.
Can I add my own tools?
Yes, define each tool inside the init() method of src/index.ts using this.server.tool(...).