Building a Remote MCP Server on Cloudflare (Without Auth)
@garrettHensley
Overview
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This example deploys a remote MCP (Model Context Protocol) server on Cloudflare Workers that does not require authentication. It is intended for developers who want to expose MCP tools over the internet without adding an authentication layer.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy by clicking the “Deploy to Workers” button or by running npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. The server will be available at a URL like remote-mcp-server-authless.<your-account>.workers.dev/sse. Customize tools inside src/index.ts using this.server.tool(...). Connect from Cloudflare AI Playground or from local clients like Claude Desktop via the mcp-remote proxy.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- No authentication required for the MCP server.
- Deployed globally on Cloudflare Workers.
- Simple one-click deployment button available.
- Customizable MCP tools via code.
- Exposes an SSE endpoint for remote clients.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Providing MCP tools to remote AI clients without managing auth.
- Quickly prototyping public MCP services.
- Integrating with Cloudflare AI Playground for testing.
- Connecting local desktop apps like Claude Desktop to a remote server.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
What does “Without Auth” mean?
The server does not require any authentication or authorization to access its endpoints, making it suitable for public or internal services where security isn’t a concern.
How do I deploy the server?
Click the “Deploy to Workers” button or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless in the terminal.
How can I add my own MCP tools?
Define each tool inside the init() method of src/index.ts using this.server.tool(...). Refer to Cloudflare’s MCP tools documentation for details.
Can I use this server with Claude Desktop?
Yes. Install the mcp-remote proxy (npm i mcp-remote) and add a configuration entry in Claude Desktop that points to the remote SSE URL via npx mcp-remote <url>.
Where is my MCP server hosted?
The server runs on Cloudflare Workers and is accessible at the URL assigned to your worker after deployment.