MCP.so
Sign In

Overview

What is Remote MCP Server on Cloudflare?

A starter project to run a remote MCP (Model Context Protocol) server on Cloudflare Workers, complete with OAuth login. It is designed for developers who want to host MCP tools remotely and connect them to MCP clients like Claude Desktop.

How to use Remote MCP Server on Cloudflare?

Clone the repository, install dependencies with npm install, and run locally using npx nx dev remote-mcp-server. Deploy with npx wrangler kv namespace create OAUTH_KV and npm run deploy. Connect via the MCP Inspector (SSE transport) or by configuring Claude Desktop to use the server’s URL.

Key features of Remote MCP Server on Cloudflare

  • Runs on Cloudflare Workers with OAuth login
  • Supports SSE transport for remote connections
  • Full local development with MCP Inspector
  • Deployable with a single command
  • Integrates with Claude Desktop via mcp-remote proxy
  • Built‑in debug tools and mock login for testing

Use cases of Remote MCP Server on Cloudflare

  • Hosting an MCP server on the edge for remote access
  • Prototyping MCP tools with the MCP Inspector
  • Connecting Claude Desktop to a remote MCP server
  • Testing OAuth flows for MCP authentication
  • Deploying a production‑ready remote MCP endpoint

FAQ from Remote MCP Server on Cloudflare

What transport protocol does the server use?

The server uses SSE (Server‑Sent Events) as the transport. Clients connect to the /sse endpoint.

How do I connect Claude Desktop to my remote MCP server?

Update the Claude Desktop config file to use npx mcp-remote with your server’s URL (e.g., https://worker-name.account-name.workers.dev/sse). A browser login window will open.

How do I deploy the server to Cloudflare?

Create a KV namespace with npx wrangler kv namespace create OAUTH_KV, add the namespace ID to wrangler.jsonc, then run npm run deploy.

What should I do if I encounter issues?

Restart Claude or test the server directly with npx mcp-remote http://localhost:8787/sse. Clearing ~/.mcp-auth may also help in rare cases.

Do I need an actual OAuth provider to run locally?

No. The local development version uses a mock login screen that accepts any email and password for testing.

Tags

More from Cloud & Infrastructure