Remote MCP Server on Cloudflare
@xiquyila
Overview
What is Remote MCP Server on Cloudflare?
A remote MCP server running on Cloudflare Workers with OAuth login, enabling you to deploy and interact with MCP tools over HTTP. It is for developers who want to host MCP servers on Cloudflare’s edge and connect them to MCP clients like Claude Desktop.
How to use Remote MCP Server on Cloudflare?
Clone the repository, install dependencies, and run locally with npx nx dev remote-mcp-server. Connect using MCP Inspector via SSE at http://localhost:8787/sse, or configure Claude Desktop with npx mcp-remote pointing to that URL. Deploy to Cloudflare by creating an OAUTH_KV namespace, updating wrangler.jsonc, and running npm run deploy.
Key features of Remote MCP Server on Cloudflare
- Deploys MCP server on Cloudflare Workers
- Includes OAuth login flow
- Uses SSE transport over HTTP
- Works with MCP Inspector client
- Connects to Claude Desktop via local proxy
- Supports local development and remote deployment
Use cases of Remote MCP Server on Cloudflare
- Running MCP tools on Cloudflare’s edge network
- Integrating a custom MCP server with Claude Desktop remotely
- Prototyping and testing MCP servers locally before deploying
- Authenticating users with OAuth before tool access
FAQ from Remote MCP Server on Cloudflare
How do I connect my local MCP server to Claude Desktop?
Add a configuration entry using npx mcp-remote pointing to http://localhost:8787/sse in Claude Desktop’s settings file.
How do I deploy the MCP server to Cloudflare?
Create a KV namespace named OAUTH_KV, add its ID to wrangler.jsonc, then run npm run deploy.
How do I debug connection issues?
Run npx mcp-remote http://localhost:8787/sse directly, or clear the files in ~/.mcp-auth if needed.
What transport does the MCP server use?
It uses SSE (Server-Sent Events) via the /sse endpoint.
Does the server include authentication?
Yes, it includes OAuth login; locally it shows a mock user/password login screen.