Remote MCP Server on Cloudflare
@peter-hanzo
Overview
What is Remote MCP Server on Cloudflare?
A ready‑to‑deploy MCP server that runs on Cloudflare Workers with OAuth login, enabling remote access to MCP tools over SSE. It is intended for developers who want to host MCP tools on Cloudflare’s edge network and connect them to MCP clients like the MCP Inspector or 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. Deploy to Cloudflare by creating an OAUTH_KV namespace with npx wrangler kv namespace create OAUTH_KV and running npm run deploy. Connect clients (e.g., MCP Inspector or Claude Desktop) via SSE at /sse, using mcp-remote as a local proxy for Claude.
Key features of Remote MCP Server on Cloudflare
- Remote MCP server hosted on Cloudflare Workers
- OAuth‑based login built in
- SSE transport for MCP communication
- Local development with hot reload
- One‑command deployment to Cloudflare’s edge
- Direct integration with MCP Inspector and Claude Desktop
Use cases of Remote MCP Server on Cloudflare
- Hosting MCP tools remotely for access from any MCP client
- Testing MCP tools locally with the MCP Inspector
- Connecting Claude Desktop to a remote tool server via a local proxy
- Building and iterating on MCP tools with a cloud deployment pipeline
FAQ from Remote MCP Server on Cloudflare
What transport protocol does the server use?
It uses SSE (Server‑Sent Events) – clients connect to the /sse endpoint.
How do I deploy the server?
Create an OAUTH_KV namespace with npx wrangler kv namespace create OAUTH_KV, add its ID to wrangler.jsonc, then run npm run deploy.
How do I connect Claude Desktop to a remote instance?
Add a configuration entry to Claude’s claude_desktop_config.json using the mcp-remote command and the server’s workers.dev URL (e.g., https://worker-name.account-name.workers.dev/sse).
How can I debug connectivity issues?
Try connecting directly with npx mcp-remote http://localhost:8787/sse. In rare cases, clear the files in ~/.mcp-auth with rm -rf ~/.mcp-auth.
What are the dependencies for local development?
You need Node.js, npm, and the repository cloned. The project uses Nx for task orchestration.