Building a Remote MCP Server on Cloudflare (Without Auth)
@amahara-dev
Overview
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This is a demo/template that lets you deploy a remote MCP server on Cloudflare Workers without requiring authentication. It provides a starting point for developers who want to expose MCP tools over SSE without managing user auth.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy using the "Deploy to Workers" button (gets a public URL like remote-mcp-server-authless.<your-account>.workers.dev/sse) or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless locally. Customize tools by editing src/index.ts and adding tool definitions inside the init() method with this.server.tool(...). Connect from Cloudflare AI Playground by entering your SSE URL, or from Claude Desktop using the mcp-remote proxy tool and the provided JSON configuration.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploys a remote MCP server to Cloudflare Workers
- Requires no authentication for MCP connections
- Customizable tools defined in TypeScript code
- Connects to Cloudflare AI Playground as a remote MCP client
- Connects to 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)
- Quickly prototyping MCP-based tools without setting up authentication
- Experimenting with remote MCP servers on Cloudflare’s edge network
- Integrating custom tools with Cloudflare AI Playground for testing
- Exposing MCP tools to Claude Desktop or other MCP clients via a proxy
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
Does the server require authentication?
No, this MCP server is intentionally built without authentication.
How do I deploy the server?
Click the "Deploy to Workers" button or use the npm create cloudflare command with the provided template.
How do I add my own tools?
Define each tool inside the init() method of src/index.ts by calling this.server.tool(...).
How do I connect from Cloudflare AI Playground?
Go to the AI Playground, enter your deployed MCP server’s SSE URL, and start using the tools directly.
How do I connect from Claude Desktop?
Install the mcp-remote npm package, then add a configuration entry with command: "npx", args including the remote SSE URL, and restart Claude Desktop.