Building a Remote MCP Server on Cloudflare (Without Auth)
@princetgt
概览
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
It is an example that allows you to deploy a remote MCP (Model Context Protocol) server without authentication on Cloudflare Workers. It is intended for developers who want to host MCP servers on Cloudflare’s edge network.
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. After deployment, customize tools by editing the init() method in src/index.ts. Connect to the server from Cloudflare AI Playground by entering the deployed SSE URL, or from Claude Desktop using the mcp-remote proxy with the appropriate URL.
Key features of Building a Remote MCP Server on Cloudflare (Without Auth)
- Deploys a remote MCP server without authentication.
- Runs on Cloudflare Workers.
- Customizable tools defined inside
src/index.ts. - Connects to Cloudflare AI Playground as a remote MCP client.
- Works with local MCP clients via
mcp-remoteproxy.
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Hosting MCP tools on Cloudflare’s edge infrastructure.
- Providing remote MCP capabilities to the Cloudflare AI Playground.
- Connecting Claude Desktop or other local MCP clients to a cloud-hosted server.
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
What is this project?
This is an example that deploys a remote MCP server without authentication on Cloudflare Workers.
How do I deploy the server?
You can deploy by clicking the “Deploy to Workers” button or by running the npm create cloudflare command with the specified template.
How do I customize the MCP tools?
Add 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 SSE URL, and use the tools directly in the playground.
How do I connect Claude Desktop to the server?
Use the mcp-remote proxy and configure Claude Desktop’s MCP servers with the command npx mcp-remote <your-sse-url>.