Building a Remote MCP Server on Cloudflare (Without Auth)
@hekmon8
概览
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
A template and example that lets you deploy a remote Model Context Protocol (MCP) server on Cloudflare Workers without requiring authentication. It is intended for developers who want to quickly spin up an MCP server that can be called from remote MCP clients.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy using the “Deploy to Workers” button or locally with npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. After deployment, customize tools by editing src/index.ts using this.server.tool(...) inside the init() method.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploys as a Cloudflare Worker with no authentication.
- Provides an SSE endpoint for remote MCP clients.
- Supports custom tool definitions via code.
- Can be connected to Cloudflare AI Playground.
- Works with Claude Desktop via the
mcp-remoteproxy.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Quickly testing MCP tools without setting up authentication.
- Integrating custom tools into Cloudflare AI Playground.
- Connecting a remote MCP server to Claude Desktop.
- Prototyping MCP-based applications on Cloudflare’s edge.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
What is the difference between this server and other MCP servers?
This server is designed to be deployed on Cloudflare Workers and does not require authentication, making it simpler for testing and prototyping.
How do I deploy the server?
Use the “Deploy to Workers” button from 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?
Define each tool inside the init() method of src/index.ts using this.server.tool(...).
How do I connect to Cloudflare AI Playground?
Go to https://playground.ai.cloudflare.com/, enter your deployed MCP server URL (e.g., remote-mcp-server-authless.<your-account>.workers.dev/sse), and start using the tools.
How do I connect Claude Desktop to this server?
Use the mcp-remote proxy: install it via npm, then configure Claude Desktop’s mcpServers to run npx mcp-remote <your-sse-url>.