Building a Remote MCP Server on Cloudflare (Without Auth)
@yashhsm
Overview
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This example lets you deploy a remote Model Context Protocol (MCP) server on Cloudflare Workers without authentication. It is aimed at developers who want to host MCP tools on Cloudflare’s edge network and connect them to compatible clients.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy with the “Deploy to Workers” button or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. Customize tools by defining them inside the init() method of src/index.ts using this.server.tool(...). Connect from Cloudflare AI Playground by entering the deployed SSE URL, or from Claude Desktop via the mcp-remote proxy.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploys a remote MCP server on Cloudflare Workers
- No authentication required for clients
- Customizable tools defined in
src/index.ts - Connects to Cloudflare AI Playground as a remote MCP client
- Works with Claude Desktop via the mcp-remote proxy
- Uses SSE (Server-Sent Events) transport
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Exposing MCP tools publicly without client authentication
- Rapid prototyping of MCP servers on Cloudflare’s global edge network
- Integrating custom MCP tools with Cloudflare AI Playground
- Connecting remote MCP servers to local desktop clients like Claude Desktop
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
What does this server do?
It deploys an MCP server on Cloudflare Workers that requires no authentication, allowing any client to connect via SSE.
How do I deploy it?
Use the “Deploy to Workers” button or run npm create cloudflare@latest with the provided template. The server will be available at a URL like remote-mcp-server-authless.<your-account>.workers.dev/sse.
How can I add my own tools?
Edit src/index.ts and define each tool inside the init() method using this.server.tool(...). Refer to Cloudflare’s MCP tools documentation for details.
How do I connect to Cloudflare AI Playground?
Go to https://playground.ai.cloudflare.com/, enter your deployed SSE URL (e.g., remote-mcp-server-authless.<your-account>.workers.dev/sse), and use the tools directly.
How do I connect Claude Desktop to this server?
Install the mcp-remote npm package globally, then configure Claude Desktop’s mcpServers with "command": "npx", "args": ["mcp-remote", "<your-sse-url>"]. Restart Claude to see the tools.