Remote MCP Server on Cloudflare
@seedprod
Overview
What is Remote MCP Server on Cloudflare?
Remote MCP Server on Cloudflare helps you run a Model Context Protocol (MCP) server on Cloudflare Workers, complete with OAuth login. It enables MCP clients to connect to the server remotely via Server-Sent Events (SSE).
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 to Cloudflare by creating a KV namespace (npx wrangler kv namespace create OAUTH_KV), adding the namespace ID to wrangler.jsonc, then running npm run deploy. Connect MCP clients (like the MCP Inspector or Claude Desktop) using the SSE endpoint (e.g., http://localhost:8787/sse locally or https://worker-name.account-name.workers.dev/sse after deployment).
Key features of Remote MCP Server on Cloudflare
- Runs MCP server on Cloudflare Workers.
- Includes OAuth login flow.
- Uses SSE transport for client connections.
- Works with MCP Inspector for testing.
- Integrates with Claude Desktop via the
mcp-remoteproxy. - Deployable to a
workers.devsubdomain.
Use cases of Remote MCP Server on Cloudflare
- Host a remote MCP server accessible from any MCP client.
- Connect Claude Desktop to a remote MCP server over HTTP.
- Test MCP tools locally with the MCP Inspector before deploying.
- Run MCP tooling in a serverless environment with authentication.
FAQ from Remote MCP Server on Cloudflare
What is Remote MCP Server on Cloudflare?
It is a template to get a remote MCP server up‑and‑running on Cloudflare Workers, complete with OAuth login.
How do I connect Claude Desktop to my MCP server?
Add a configuration entry to Claude Desktop’s settings file using the mcp-remote proxy. For a local server, use "command": "npx", "args": ["mcp-remote", "http://localhost:8787/sse"]. For a deployed server, replace the URL with https://worker-name.account-name.workers.dev/sse.
How do I deploy the server to Cloudflare?
First create a KV namespace with npx wrangler kv namespace create OAUTH_KV, add its ID to wrangler.jsonc, then run npm run deploy.
How do I debug issues with the server?
Restart Claude, or test the connection directly with npx mcp-remote http://localhost:8787/sse. In rare cases, clear auth files with rm -rf ~/.mcp-auth.
How do I use the MCP Inspector with this server?
Start the inspector with npx @modelcontextprotocol/inspector, set Transport Type to SSE, and enter the server’s SSE URL (e.g., http://localhost:8787/sse). You will be prompted to login (mock credentials work locally), then you can list and call defined tools.