MCP.so
Sign In

Overview

What is Remote MCP Server on Cloudflare?

A guide and starter project to run a remote MCP server on Cloudflare Workers with built-in OAuth login. It is aimed at developers who want to deploy MCP servers for use with MCP 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. For remote deployment, use npx wrangler kv namespace create OAUTH_KV, add the KV namespace ID to wrangler.jsonc, then run npm run deploy. Connect MCP clients (Inspector or Claude Desktop) using the workers.dev URL with /sse endpoint.

Key features of Remote MCP Server on Cloudflare

  • Run MCP servers on Cloudflare Workers with OAuth login
  • Local development with hot reload
  • Deploy to production with one command
  • SSE transport for remote connections
  • Easy integration with MCP Inspector and Claude Desktop

Use cases of Remote MCP Server on Cloudflare

  • Hosting custom MCP tools accessible from any MCP client
  • Developing and testing MCP servers with OAuth authentication
  • Connecting Claude Desktop to a remote MCP server over the internet

FAQ from Remote MCP Server on Cloudflare

How do I connect a remote MCP client to my deployed server?

Use the MCP Inspector or Claude Desktop with the workers.dev URL followed by /sse. For example, https://worker-name.account-name.workers.dev/sse. Set the transport type to SSE in the inspector.

How does OAuth login work?

When connecting, a browser window opens with a login screen. During local development, a mock login accepts any email and password. In production, you can implement a real OAuth provider.

What tools or dependencies are required?

Node.js, npm, npx, Cloudflare Wrangler CLI, and a Cloudflare account. The project uses mcp-remote as a proxy for Claude Desktop.

How can I debug connection issues?

Restart Claude Desktop, or test the MCP server directly via npx mcp-remote http://localhost:8787/sse. If authentication files become corrupted, clear them with rm -rf ~/.mcp-auth.

Does the server support SSE (Server-Sent Events)?

Yes, both local and remote clients connect via the SSE endpoint at /sse. The MCP Inspector and Claude Desktop configurations explicitly use SSE transport.

Tags

More from Cloud & Infrastructure