Building a Remote MCP Server on Cloudflare (Without Auth)
@hachecito
概览
What is Building a Remote MCP Server on Cloudflare (Without Auth)?
A template and deployment method for creating a remote MCP (Model Context Protocol) server on Cloudflare Workers that does not require authentication. It is intended for developers who want to quickly stand up a serverless MCP endpoint with custom tools and access it from remote MCP clients.
How to use Building a Remote MCP Server on Cloudflare (Without Auth)?
Deploy using the "Deploy to Workers" button or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless. Customize tools inside the init() method of src/index.ts using this.server.tool(...). Connect from Cloudflare AI Playground by entering the deployed SSE URL, or from 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 or a CLI command
- No authentication required for the MCP server endpoint
- Exposes tools over Server-Sent Events (SSE)
- Customizable by adding MCP tools in source code
- Can be connected from both Cloudflare AI Playground and local MCP clients
Use cases of Building a Remote MCP Server on Cloudflare (Without Auth)
- Host custom MCP tools on a globally distributed serverless platform
- Connect tools from Cloudflare AI Playground without local infrastructure
- Use as a remote tool provider for Claude Desktop via the mcp-remote proxy
- Quickly prototype and test new MCP tool sets without authentication overhead
FAQ from Building a Remote MCP Server on Cloudflare (Without Auth)
How do I deploy this MCP server?
Click the "Deploy to Workers" button or run npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless from the command line.
How can I add my own tools?
Define each tool inside the init() method of src/index.ts using this.server.tool(...).
How do I connect from Cloudflare AI Playground?
Go to the playground URL, enter your deployed MCP server’s SSE URL (e.g., remote-mcp-server-authless.<your-account>.workers.dev/sse), and use your tools directly.
How do I connect Claude Desktop?
Use the mcp-remote npm proxy. In Claude Desktop settings, add a server entry with command: "npx", args including mcp-remote and your SSE URL.
What runtime / dependencies are required?
The server runs on Cloudflare Workers. Local development requires Node.js and the npm create cloudflare CLI. The mcp-remote proxy (for local clients) is an additional npm package.