Remote MCP Server on Cloudflare
@satvikchauhan22
Overview
What is Remote MCP Server on Cloudflare?
Remote MCP Server on Cloudflare is a Model Context Protocol (MCP) server deployed on Cloudflare Workers, complete with OAuth login. It is intended for developers who want to run a remote MCP server and connect it to clients like 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. Connect the MCP Inspector using SSE at http://localhost:8787/sse. Deploy to Cloudflare with npx wrangler kv namespace create OAUTH_KV, add the KV namespace ID to wrangler.jsonc, then npm run deploy. Configure Claude Desktop by adding a mcpServers entry with the mcp-remote command pointing to the remote SSE URL.
Key features of Remote MCP Server on Cloudflare
- Remote MCP server on Cloudflare Workers with OAuth login.
- SSE transport for MCP communication.
- Local development and testing with MCP Inspector.
- Connection to Claude Desktop via a local proxy.
- Simple deployment using Wrangler and a KV namespace.
Use cases of Remote MCP Server on Cloudflare
- Deploy a remote MCP server accessible over the internet.
- Authenticate MCP tool calls with OAuth via Cloudflare Workers.
- Integrate MCP tools with Claude Desktop from a remote server.
- Develop and test MCP servers locally before deployment.
FAQ from Remote MCP Server on Cloudflare
How do I deploy to Cloudflare?
Run npx wrangler kv namespace create OAUTH_KV, add the returned KV namespace ID to wrangler.jsonc, then execute npm run deploy.
How do I connect Claude Desktop to the remote server?
Add a mcpServers entry in Claude's config file with "command": "npx", "args": ["mcp-remote", "https://your-worker-url/sse"]. Restart Claude.
What should I do if I encounter issues?
Restart Claude, test the server directly with npx mcp-remote http://localhost:8787/sse, or clear cached auth files with rm -rf ~/.mcp-auth.
What transport and authentication does the server use?
The server uses SSE (Server-Sent Events) transport and includes OAuth login for authentication.
What are the runtime dependencies?
Node.js and npm are required. The project uses the mcp-remote proxy and Cloudflare Wrangler CLI for deployment.