Remote MCP Server on Cloudflare
@irvinebroque
Overview
What is Remote MCP Server on Cloudflare?
A remote MCP server that runs on Cloudflare Workers with OAuth login, enabling you to expose MCP tools over HTTP via SSE transport and connect them to 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. Use the MCP Inspector with SSE transport at http://localhost:8787/sse or configure Claude Desktop with the mcp-remote proxy pointing to that URL. Deploy to Cloudflare using npm run deploy after creating an OAUTH_KV namespace.
Key features of Remote MCP Server on Cloudflare
- Runs on Cloudflare Workers with OAuth login
- Uses SSE (Server-Sent Events) transport for MCP
- Works with MCP Inspector for local development
- Connects to Claude Desktop via a proxy
- Supports remote deployment to workers.dev
- Includes debugging commands and cache clearing
Use cases of Remote MCP Server on Cloudflare
- Hosting MCP tools on a scalable serverless platform
- Remotely calling MCP tools from Claude Desktop
- Prototyping and testing MCP servers locally before deploy
- Adding OAuth-protected MCP endpoints to existing Cloudflare infrastructure
FAQ from Remote MCP Server on Cloudflare
How do I connect Claude Desktop to the MCP server?
Update Claude Desktop’s configuration to use the mcp-remote command with the SSE endpoint URL (e.g., http://localhost:8787/sse locally or https://worker-name.account-name.workers.dev/sse remote).
What transport does the server use?
The server uses SSE (Server-Sent Events) transport. Connect via the /sse endpoint.
How do I deploy to Cloudflare?
Run npx wrangler kv namespace create OAUTH_KV, add the resulting KV namespace ID to wrangler.jsonc, then run npm run deploy.
How can I debug connection issues?
Restart Claude, test connectivity with npx mcp-remote http://localhost:8787/sse, or clear cached auth files with rm -rf ~/.mcp-auth.
What runtime dependencies does this server require?
Node.js and npm for local development, and a Cloudflare Workers account for deployment. The mcp-remote package is used as a local proxy for Claude Desktop.