Building a Remote MCP Server on Cloudflare (Without Auth)
@rokith
Overview
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This example allows you to deploy a remote MCP (Model Context Protocol) server on Cloudflare Workers that does not require authentication. It is intended for developers who want a quick, no-auth MCP server integrated with Cloudflare's infrastructure.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy by clicking the "Deploy to Workers" button in the README or by running npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. After deployment, the server is available at a URL like remote-mcp-server-authless.<your-account>.workers.dev/sse. Connect to it from Cloudflare AI Playground by entering that URL, or from local MCP clients (e.g., Claude Desktop) using the mcp-remote proxy as shown in the README’s JSON configuration example.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploy a remote MCP server without authentication.
- Customize MCP tools via the
server.tool()method insrc/index.ts. - Connect directly to Cloudflare AI Playground.
- Connect local clients (e.g., Claude Desktop) via
mcp-remoteproxy. - Fully serverless deployment on Cloudflare Workers.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Quickly deploy a public MCP server for prototyping or internal tools.
- Enable custom MCP tools in the Cloudflare AI Playground.
- Connect the remote MCP server to local AI applications like Claude Desktop.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
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?
Define each tool inside the init() method of src/index.ts using this.server.tool(...).
How do I connect to Claude Desktop?
Use the mcp-remote proxy (from npm). Update your Claude Desktop's mcpServers configuration with the command npx mcp-remote and your server’s SSE URL.
What URL will my server have?
After deployment, the server is available at remote-mcp-server-authless.<your-account>.workers.dev/sse (replace <your-account> with your Cloudflare account identifier).
Does this server require authentication?
No, this example is specifically designed to run without authentication.