Remote MCP Server on Cloudflare
@langjihao
Overview
What is Remote MCP Server on Cloudflare?
Deploy a remote MCP (Model Context Protocol) server on Cloudflare Workers with OAuth login. Designed for developers building and connecting MCP tools to AI clients like Claude Desktop.
How to use Remote MCP Server on Cloudflare?
Clone the repository, install dependencies with npm install, run locally with npx nx dev remote-mcp-server, then deploy via wrangler kv namespace create and npm run deploy. Connect clients using the MCP Inspector or configure Claude Desktop with the mcp-remote proxy pointing to the SSE endpoint.
Key features of Remote MCP Server on Cloudflare
- Runs on Cloudflare Workers serverless edge platform
- Includes OAuth-based user authentication
- Uses SSE (Server-Sent Events) transport
- Compatible with MCP Inspector for testing
- Integrates directly with Claude Desktop
- Deploys to a public workers.dev URL
Use cases of Remote MCP Server on Cloudflare
- Run custom MCP tools remotely and access them from any MCP client
- Connect Claude Desktop to your own hosted MCP server over HTTP
- Build and test MCP tools locally before deploying for production use
- Create AI assistants with custom tool capabilities behind authentication
FAQ from Remote MCP Server on Cloudflare
How do I run the server locally?
Clone the repo, run npm install, then npx nx dev remote-mcp-server to start the dev server at http://localhost:8787/.
How do I connect Claude Desktop?
Edit your Claude Desktop configuration to add an mcpServers entry with "command": "npx" and "args": ["mcp-remote", "http://localhost:8787/sse"].
How do I deploy to Cloudflare?
Create a KV namespace with npx wrangler kv namespace create OAUTH_KV, add the ID to wrangler.jsonc, then run npm run deploy.
How can I debug connection issues?
Try connecting directly with npx mcp-remote http://localhost:8787/sse. If needed, clear stored auth files with rm -rf ~/.mcp-auth.