Building a Remote MCP Server on Cloudflare (Without Auth)
@tikserziku
Overview
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This example allows you to deploy a remote MCP server that does not require authentication on Cloudflare Workers. It is intended for developers who want to create and host Model Context Protocol servers remotely without adding auth.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy by clicking the Deploy to Workers button on the README or by running npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless in your terminal. To add custom tools, define each tool inside the init() method of src/index.ts using this.server.tool(...). Connect the server from Cloudflare AI Playground or from local clients like Claude Desktop via the mcp-remote proxy.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deployable to Cloudflare Workers with one click
- No authentication required for the MCP server
- Customizable tools defined in
src/index.ts - Connects to Cloudflare AI Playground as a remote client
- Works with local MCP clients via
mcp-remoteproxy
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploy a remote MCP server without implementing auth
- Add and test custom MCP tools on Cloudflare Workers
- Use remote MCP tools from the Cloudflare AI Playground
- Connect a remote MCP server to 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 on the README or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless.
How do I add custom tools?
Define each tool inside the init() method of src/index.ts using this.server.tool(...).
What URL does my deployed server use?
It is deployed to a URL like remote-mcp-server-authless.<your-account>.workers.dev/sse.
How do I connect from Cloudflare AI Playground?
Go to https://playground.ai.cloudflare.com/ and enter your deployed MCP server URL.
How do I connect Claude Desktop to the server?
Use the mcp-remote proxy (npx mcp-remote <your-server-url>) and add the configuration to Claude Desktop’s settings.