Building a Remote MCP Server on Cloudflare (Without Auth)
@blokpardi
概览
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 provides a template for building custom tools and connecting to remote MCP clients.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy using the "Deploy to Workers" button or the CLI command npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. Add tools inside the init() method of src/index.ts using this.server.tool(...). Connect clients by entering the deployed URL in Cloudflare AI Playground or via the mcp-remote proxy in Claude Desktop.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploy a remote MCP server without authentication.
- Hosted on Cloudflare Workers.
- Customizable tools via
this.server.tool(...). - Connect to Cloudflare AI Playground as a remote client.
- Connect to Claude Desktop using mcp-remote proxy.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Create a public remote MCP server for prototyping without auth.
- Integrate custom AI tools accessible from Cloudflare AI Playground.
- Enable Claude Desktop to use tools hosted on Cloudflare Workers.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
How do I deploy this MCP server?
Use the "Deploy to Workers" button or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless in your terminal.
How do I customize the tools on the server?
Define each tool inside the init() method of src/index.ts using this.server.tool(...).
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 use the tools directly.
How do I connect Claude Desktop to this remote server?
Use the mcp-remote proxy and configure Claude Desktop with the server URL in the MCP settings.
Does this server require authentication?
No, this example deploys a remote MCP server without authentication.