Building a Remote MCP Server on Cloudflare (Without Auth)
@assylbek-codes
Overview
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This is a deployment example that allows you to run a remote MCP server without authentication on Cloudflare Workers. It is intended for developers who want to quickly set up a Model Context Protocol server that can be accessed remotely by MCP clients like the Cloudflare AI Playground or Claude Desktop.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy by clicking the "Deploy to Workers" button or using the command npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. After deployment, connect from the Cloudflare AI Playground by entering your SSE endpoint URL, or from Claude Desktop by configuring it with the mcp-remote proxy.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploy to Cloudflare Workers without authentication
- Use the button to deploy instantly
- Customize tools inside the
init()method withthis.server.tool(...) - Connect from Cloudflare AI Playground with a remote MCP client
- Connect from local MCP clients via the
mcp-remoteproxy
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploy a remote MCP server for public or internal tools
- Connect the server to Cloudflare's AI Playground for testing
- Use the server from Claude Desktop by proxying through
mcp-remote
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
What does "Without Auth" mean for this server?
The remote MCP server deployed does not require any authentication or authorization; it is open to anyone who knows the URL.
How do I deploy the server?
You can deploy by clicking the "Deploy to Workers" button on the README, or by running npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless in the command line.
How do I add my own tools to the MCP server?
Define each tool inside the init() method of src/index.ts using the this.server.tool(...) function.
How can I connect from Claude Desktop?
Use the mcp-remote npm package as a proxy. Configure Claude Desktop by adding an entry in mcpServers with "command": "npx", "args": ["mcp-remote", "<your-server-url>/sse"].
Where is the server deployed?
The server is deployed to a Cloudflare Workers URL like remote-mcp-server-authless.<your-account>.workers.dev/sse.