Building a Remote MCP Server on Cloudflare (Without Auth)
@UnRealisticHQ
概要
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This example allows you to deploy a remote MCP server that does not require authentication on Cloudflare Workers. It is a template for quickly setting up an MCP server with SSE transport, aimed at developers who want to expose MCP tools without auth.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy using the provided "Deploy to Workers" button or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. Customize tools by editing src/index.ts and using this.server.tool(...) inside the init() method. Connect client applications such as the Cloudflare AI Playground or Claude Desktop (via the mcp-remote proxy) by using the deployed SSE URL.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deployed on Cloudflare Workers with no authentication required.
- Uses SSE transport for remote MCP communication.
- Provides a one-click deploy button or CLI scaffold.
- Easily customizable via tool definitions in
src/index.ts. - Compatible with Cloudflare AI Playground and local MCP clients through
mcp-remote.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Quickly deploy MCP tools without implementing authentication.
- Integrate MCP tools into Cloudflare’s AI Playground for testing.
- Connect Claude Desktop to remote tools using the
mcp-remoteproxy. - Prototype and demo MCP servers in a serverless environment.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
How do I deploy the MCP server?
You can either click the "Deploy to Workers" button or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless from your terminal.
Does this server require authentication?
No, this example is explicitly built without authentication, making it suitable for demos or internal tools where auth is not needed.
How do I customize the tools?
Open src/index.ts and add each tool inside the init() method using this.server.tool(...) following Cloudflare’s MCP tools documentation.
How can I connect from Claude Desktop?
Use the mcp-remote npm package as a proxy. Configure Claude Desktop with "command": "npx", "args": ["mcp-remote", "<your-server-url>/sse"].
What transport does the server use?
The server uses SSE (Server-Sent Events) at the path /sse, as shown in the deployed URL pattern.