Building a Remote MCP Server on Cloudflare (Without Auth)
@marvinjude
Overview
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 intended for developers who want to quickly set up a remote model context protocol server using Cloudflare’s edge network and SSE transport.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy the server by clicking the “Deploy to Workers” button or by running npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. After deployment, customize tools in src/index.ts inside the init() method. Connect clients via the server’s SSE endpoint (e.g., remote-mcp-server-authless.<your-account>.workers.dev/sse).
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploy a remote MCP server on Cloudflare Workers without authentication.
- Uses SSE (Server-Sent Events) transport.
- Easily customizable with your own tools.
- One-click deployment via the Cloudflare Deploy to Workers button.
- Supports connection from Cloudflare AI Playground or local MCP clients.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Expose MCP tools to remote clients without managing authentication.
- Prototype and test MCP tools using Cloudflare AI Playground.
- Connect Claude Desktop to a remote MCP server via the mcp-remote proxy.
- Integrate custom tools into any SSE-compatible MCP client.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
How do I deploy this MCP server?
Use the “Deploy to Workers” button on the README or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless in your terminal.
What transport protocol does the server use?
The server uses Server-Sent Events (SSE) and exposes an endpoint at the /sse path.
Does this MCP server require authentication?
No, this server is specifically built without authentication to simplify initial deployment and testing.
How can I connect to this server from Claude Desktop?
Use the mcp-remote proxy (npx mcp-remote) and configure Claude Desktop’s mcpServers section with your server’s SSE URL.
Where can I add custom tools?
Add tools inside the init() method of src/index.ts using this.server.tool(...).