概览
What is Remote MCP Server on Cloudflare?
A remote MCP server deployed on Cloudflare Workers that supports OAuth login. It enables AI clients like Claude Desktop to call tools via SSE transport. Designed for developers who want to run MCP servers remotely on Cloudflare.
How to use Remote MCP Server on Cloudflare?
Clone the repository, install dependencies with npm install, and run locally with npx nx dev remote-mcp-server. Deploy with npm run deploy after creating a KV namespace. Connect clients like the MCP Inspector or Claude Desktop by pointing to the /sse endpoint of the local or deployed worker.
Key features of Remote MCP Server on Cloudflare
- Deployable as a Cloudflare Worker with OAuth login
- Local development with live reload support
- Integrates with MCP Inspector for testing
- Connects to Claude Desktop via a local proxy
- Uses SSE (Server-Sent Events) transport
- Configurable KV namespace for OAuth state
Use cases of Remote MCP Server on Cloudflare
- Host custom MCP tools for Claude Desktop to call remotely
- Test MCP server logic locally before deploying to production
- Provide OAuth‑protected tool access to multiple users
- Rapidly prototype and iterate on MCP tool implementations
- Run a production‑grade MCP server with minimal overhead
FAQ from Remote MCP Server on Cloudflare
How do I connect MCP Inspector to my server?
Set transport type to SSE, enter http://localhost:8787/sse (or your deployed URL /sse), and click Connect. You will see a mock login screen – input any email and password to authenticate.
How do I connect Claude Desktop to the local server?
Edit Claude Desktop’s config file to add an mcpServers entry that uses mcp-remote pointing to http://localhost:8787/sse. Restart Claude; a browser window opens for login.
How do I deploy the server to Cloudflare?
Run npx wrangler kv namespace create OAUTH_KV, add the KV namespace ID to wrangler.jsonc, then execute npm run deploy. Your server will be available at <worker-name>.<account-name>.workers.dev.
How do I debug connection issues?
Restart Claude or test directly from command line with npx mcp-remote http://localhost:8787/sse. In rare cases, clear files in ~/.mcp-auth with rm -rf ~/.mcp-auth.
What transport does the server use?
The server uses SSE (Server-Sent Events) exposed at the /sse endpoint. Clients connect via HTTP/HTTPS.