Building a Remote MCP Server on Cloudflare (Without Auth)
@basevec
Overview
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
A template to deploy a remote MCP (Model Context Protocol) server that requires no authentication on Cloudflare Workers. It is designed for developers who want to expose MCP tools over the public internet to remote clients such as 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 running npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. Customize tools inside src/index.ts using this.server.tool(...). Connect remote clients by providing the deployed SSE URL (e.g., remote-mcp-server-authless.<account>.workers.dev/sse).
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploy a remote MCP server without authentication.
- Hosted on Cloudflare Workers with an SSE endpoint.
- Customizable tools defined in TypeScript.
- One-click deployment via the Deploy to Workers button.
- Works with Cloudflare AI Playground and MCP-remote proxy.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Expose MCP tools to the Cloudflare AI Playground for quick testing.
- Connect MCP tools to Claude Desktop using the mcp-remote proxy.
- Prototype remote MCP servers without setting up authentication.
- Serve public MCP tools from a global edge network.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
Does the server require authentication?
No, this template explicitly deploys an MCP server without authentication.
How do I deploy the server?
Click the “Deploy to Workers” button in the README, or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless in your terminal.
How do I add custom tools?
Open src/index.ts and define each tool inside the init() method using this.server.tool(...).
How do I connect to Cloudflare AI Playground?
Go to https://playground.ai.cloudflare.com/, enter your deployed SSE URL, and start using the tools.
How do I connect from Claude Desktop?
Use the mcp-remote npm proxy. In Claude Desktop’s config, set the command to npx mcp-remote with the SSE URL as an argument (e.g., http://localhost:8787/sse or the remote URL).