Building a Remote MCP Server on Cloudflare (Without Auth)
@jacobprall
Overview
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
This example provides a template to deploy a remote MCP server on Cloudflare Workers that does not require authentication. It is intended for developers who want to quickly set up a remote MCP server with custom tools and connect it to clients like Cloudflare AI Playground or Claude Desktop.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy the server by clicking the "Deploy to Workers" button or running npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless from the command line. Customize tools by defining them in the init() method of src/index.ts using this.server.tool(...). Connect to Cloudflare AI Playground by entering the deployed URL, or to Claude Desktop using the mcp-remote proxy with the server's SSE endpoint.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deployed instantly on Cloudflare Workers via a button or CLI.
- No authentication required for remote access.
- Custom tools can be added inside
src/index.ts. - Connects to Cloudflare AI Playground as a remote MCP client.
- Works with local MCP clients via the
mcp-remoteproxy.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploying a remote MCP server without setting up authentication.
- Using MCP tools directly from Cloudflare AI Playground.
- Connecting Claude Desktop to a remote MCP server using the mcp-remote proxy.
- Prototyping and testing MCP tool integrations on a public endpoint.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
What does this example do?
It provides a template to deploy a remote MCP server on Cloudflare Workers that does not require authentication, making it easy to expose MCP tools over SSE.
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 to create it locally.
How can I add my own tools?
Define each tool inside the init() method of src/index.ts using this.server.tool(...) as shown in the Cloudflare MCP tools documentation.
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 you can use the tools directly.
How do I connect Claude Desktop to the server?
Install the mcp-remote proxy, then add the server to Claude Desktop's configuration using npx mcp-remote <sse-url> as the command and args.