Remote MCP Server on Cloudflare
@elithrar
Overview
What is Remote MCP Server on Cloudflare?
A project that gets a remote MCP (Model Context Protocol) server running on Cloudflare Workers with OAuth login. It is intended for developers who want to deploy and connect to MCP tools remotely.
How to use Remote MCP Server on Cloudflare?
Clone the repository, install dependencies, and run locally with npx nx dev remote-mcp-server. Deploy by creating a KV namespace (npx wrangler kv namespace create OAUTH_KV), adding its ID to wrangler.jsonc, then running npm run deploy. Connect using the MCP Inspector (with SSE transport) or configure Claude Desktop to use a remote proxy pointing to the Workers URL.
Key features of Remote MCP Server on Cloudflare
- Runs MCP server on Cloudflare Workers
- Includes OAuth login integration
- Supports local development via MCP Inspector
- Deploys to Cloudflare Workers
- Connects Claude Desktop through a remote proxy
- Provides debugging via command line
Use cases of Remote MCP Server on Cloudflare
- Hosting MCP tools on a remote, scalable platform
- Protecting MCP endpoints with OAuth authentication
- Developing and testing MCP servers locally before deploying
- Connecting Claude Desktop to a remote MCP server
- Integrating MCP with Cloudflare Workers infrastructure
FAQ from Remote MCP Server on Cloudflare
What problem does this server solve?
It makes it easy to run a remote MCP server on Cloudflare Workers with built-in OAuth login.
How do I deploy the server?
Run npx wrangler kv namespace create OAUTH_KV, add the KV namespace ID to wrangler.jsonc, then execute npm run deploy.
How do I connect Claude Desktop to the server?
Add an entry to Claude Desktop's config file with "command": "npx" and "args": ["mcp-remote", "https://your-worker.your-account.workers.dev/sse"].
How can I debug connection issues?
Restart Claude, or connect directly using npx mcp-remote http://localhost:8787/sse. If needed, clear the files in ~/.mcp-auth.
What transport does the MCP server use?
It uses SSE (Server-Sent Events) as the transport protocol.