Building a Remote MCP Server on Cloudflare (Without Auth)
@dinasaur404
概览
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This example lets you deploy a remote MCP (Model Context Protocol) server on Cloudflare Workers that does not require authentication. It is intended for developers who want to quickly spin up an MCP server and connect it to remote 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 by running npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless in your terminal. Customize tools by editing src/index.ts inside the init() method. Connect to the Cloudflare AI Playground by entering your deployed SSE URL (remote-mcp-server-authless.<your-account>.workers.dev/sse). To use with Claude Desktop, install the mcp-remote proxy and add the server configuration via npx mcp-remote <your-sse-url>.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploy a remote MCP server with zero authentication.
- Customizable MCP tools via
this.server.tool()in your worker code. - One‑click deployment using the “Deploy to Workers” button.
- Connect directly to the Cloudflare AI Playground (remote MCP client).
- Works with local MCP clients through the
mcp-remoteproxy.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Rapidly prototype an MCP server without setting up authentication.
- Integrate custom MCP tools into the Cloudflare AI Playground.
- Connect a remote MCP server to Claude Desktop for local AI assistants.
- Learn how to build and deploy an MCP server on Cloudflare Workers.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
How do I deploy the MCP server?
You can click the “Deploy to Workers” button or run the npm create cloudflare command with the provided template in your terminal.
How do I add custom tools to the server?
Edit the src/index.ts file and define each tool inside the init() method using this.server.tool(...). The README points to Cloudflare’s MCP tools documentation for details.
How do I connect the MCP server to the Cloudflare AI Playground?
Go to https://playground.ai.cloudflare.com/, enter your deployed SSE URL (e.g., remote-mcp-server-authless.<your-account>.workers.dev/sse), and you can use your MCP tools directly from the playground.
How do I connect this server to Claude Desktop?
Install the mcp-remote proxy, then add a server configuration in Claude Desktop’s settings using npx mcp-remote <your-sse-url>. Restart Claude to see the tools.
What runtime/dependencies are required?
The server runs on Cloudflare Workers. To deploy, you need Node.js installed. For local client connections, npx and the mcp-remote package are used. No authentication is required.