MCP.so
Sign In
Servers

Remote MCP Server on Cloudflare

@happy-shine

Overview

What is Remote MCP Server on Cloudflare?

This project lets you run a Model Context Protocol (MCP) server on Cloudflare Workers with OAuth login. It provides a complete workflow for developing, deploying, and connecting remote MCP servers to 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. Connect using the MCP Inspector or configure Claude Desktop via a local proxy (mcp-remote). Deploy to Cloudflare Workers by creating a KV namespace and running npm run deploy, then point your MCP client to the workers.dev/sse URL.

Key features of Remote MCP Server on Cloudflare

  • OAuth login for secure access to the MCP server.
  • Local development with MCP Inspector and SSE transport.
  • Deploy to Cloudflare Workers for a remote server.
  • Seamless integration with Claude Desktop via mcp-remote proxy.
  • Debugging commands and auth cache clearing.
  • Uses SSE (Server-Sent Events) as transport protocol.

Use cases of Remote MCP Server on Cloudflare

  • Run MCP tools locally for testing and development.
  • Connect Claude Desktop to a remote MCP server on Cloudflare.
  • Deploy a custom MCP server with OAuth authentication.
  • Debug MCP server connections using command-line tools.

FAQ from Remote MCP Server on Cloudflare

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

Edit Claude Desktop’s config file to include an entry with command: "npx", args: ["mcp-remote", "https://worker-name.account-name.workers.dev/sse"], and restart Claude.

How do I deploy the server to Cloudflare?

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

How can I debug connectivity issues?

Try connecting directly via the command line with npx mcp-remote http://localhost:8787/sse. In rare cases, clear the auth cache with rm -rf ~/.mcp-auth.

What transport protocol does the server use?

The server uses SSE (Server-Sent Events). In the MCP Inspector, set Transport Type to SSE and enter the server’s /sse URL.

What is the purpose of the OAuth login?

The OAuth login provides authentication for the MCP server. When connecting from a client like the MCP Inspector or Claude Desktop, you are redirected to a login screen (locally a mock screen, in production Cloudflare’s OAuth).

More from Cloud & Infrastructure