Remote MCP Server on Cloudflare
@Emmabeyond
Overview
What is Remote MCP Server on Cloudflare?
A remote MCP (Model Context Protocol) server deployed on Cloudflare Workers with OAuth login, enabling AI assistants like Claude to invoke custom tools over the internet.
How to use Remote MCP Server on Cloudflare?
Clone the repository, install dependencies, run locally with npx nx dev remote-mcp-server, then connect via MCP Inspector or configure Claude Desktop using the mcp-remote proxy. Deploy to Cloudflare with npm run deploy after creating a KV namespace.
Key features of Remote MCP Server on Cloudflare
- Deploys on Cloudflare Workers with automatic scaling
- OAuth-based authentication for secure remote access
- Local development with hot reload via
npx nx dev - Compatible with MCP Inspector and Claude Desktop
- Uses SSE (Server-Sent Events) transport
Use cases of Remote MCP Server on Cloudflare
- Run custom MCP tools accessible from any remote client
- Integrate AI assistants with cloud-hosted tool libraries
- Test MCP endpoints locally with MCP Inspector
- Deploy serverless MCP servers for production use
FAQ from Remote MCP Server on Cloudflare
What dependencies are required?
Node.js, npm, and the Wrangler CLI (npx wrangler) for deployment.
How do I connect to the server using MCP Inspector?
Start the inspector with npx @modelcontextprotocol/inspector, set transport to SSE, enter the server’s URL with /sse (e.g., http://localhost:8787/sse), and click Connect. A mock login screen appears; input any email and password.
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 server?
Edit Claude Desktop’s config file to include an entry with command npx and args ["mcp-remote", "https://your-worker.workers.dev/sse"]. Restart Claude; a browser window will open for OAuth login.
How can I debug connection issues?
Test the connection directly with npx mcp-remote http://localhost:8787/sse. If problems persist, clear cached auth files with rm -rf ~/.mcp-auth.