Remote MCP Server on Cloudflare
@mehmet-arikan
Overview
What is Remote MCP Server on Cloudflare?
Remote MCP Server on Cloudflare is a project to deploy a remote MCP (Model Context Protocol) server on Cloudflare Workers, complete with OAuth login. It provides a ready‑to‑use setup for developers who want to run MCP servers in the cloud and connect them to clients such as Claude Desktop or the MCP Inspector.
How to use Remote MCP Server on Cloudflare?
Clone the repository, install dependencies, and run locally with npx nx dev remote-mcp-server. For production, create a Cloudflare KV namespace (npx wrangler kv namespace create OAUTH_KV), add its ID to wrangler.jsonc, and deploy with npm run deploy. Connect via the MCP Inspector using SSE transport, or via Claude Desktop by adding an entry to the config file that invokes npx mcp-remote pointing to your server’s /sse endpoint.
Key features of Remote MCP Server on Cloudflare
- OAuth‑protected MCP server on Cloudflare Workers
- Local development with live reload
- Deploy to Cloudflare’s edge network
- SSE transport for MCP clients
- MCP Inspector integration for testing
- Claude Desktop integration via a local proxy
Use cases of Remote MCP Server on Cloudflare
- Run a remote MCP server accessible from anywhere
- Securely expose MCP tools behind OAuth login
- Integrate with Claude Desktop for AI‑powered tool calling
- Prototype and debug MCP servers using the official Inspector
FAQ from Remote MCP Server on Cloudflare
What authentication does the server use?
The server uses OAuth with a mock login screen during local development. In the MCP Inspector you enter any email and password to authenticate.
What is the OAUTH_KV namespace for?
It is a Cloudflare KV namespace that stores OAuth session data. You must create it with wrangler kv namespace create OAUTH_KV and add the resulting ID to wrangler.jsonc before deploying.
How do I connect Claude Desktop to the remote server?
Update your Claude Desktop configuration file (found under Settings > Developer > Edit Config) to include an entry that runs npx mcp-remote with your server’s workers.dev URL appended with /sse.
What transport does the server use?
It uses Server‑Sent Events (SSE) as the transport protocol. The MCP Inspector and Claude proxy connect to the /sse endpoint.
How can I debug connection issues?
Use npx mcp-remote http://localhost:8787/sse on the command line to test directly. Restart Claude, or clear the files in ~/.mcp-auth if needed.