Building a Remote MCP Server on Cloudflare (Without Auth)
@zdburrage
Overview
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This example deploys a remote MCP (Model Context Protocol) server on Cloudflare Workers without authentication. It is intended for developers who want a quick, no-frills remote MCP server to serve tools via Server-Sent Events (SSE).
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy by clicking the "Deploy to Workers" button or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless in your terminal. Customize tools inside the init() method of src/index.ts using this.server.tool(...). Connect to Cloudflare AI Playground by entering your deployed URL (e.g., remote-mcp-server-authless.<account>.workers.dev/sse). Connect Claude Desktop by installing the mcp-remote proxy and adding the server configuration to Claude Desktop’s settings.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deployed as a Cloudflare Worker (no authentication required)
- Uses SSE (Server-Sent Events) transport
- Easily customizable via
this.server.tool()insrc/index.ts - One-click deploy from the Cloudflare Workers dashboard
- Compatible with remote MCP clients via
mcp-remoteproxy
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Expose custom MCP tools to the Cloudflare AI Playground
- Quickly test MCP tools without setting up local infrastructure
- Connect to Claude Desktop or other local MCP clients through a remote proxy
- Experiment with the Model Context Protocol on Cloudflare’s edge network
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
Does this MCP server require authentication?
No. This server is intentionally built without authentication for simplicity.
How do I deploy it?
Use the "Deploy to Workers" button or run the npm create cloudflare command shown in the README. Both methods create a new Cloudflare Worker with the MCP server template.
How do I connect to Cloudflare AI Playground?
Go to https://playground.ai.cloudflare.com/, enter your deployed MCP server URL (ending in /sse), and the tools will be available in the playground.
How do I connect Claude Desktop?
Install the mcp-remote npm package. Then add a calculator (or custom name) entry to your Claude Desktop configuration with the command npx mcp-remote <your-server-url>/sse. Restart Claude.
What transport does the server use?
The server uses SSE (Server-Sent Events). The endpoint is <your-worker-url>/sse.