MCP.so
Sign In
Servers

Remote MCP Server on Cloudflare

@agent-ready

Overview

What is Remote MCP Server on Cloudflare?

A reference implementation that runs a remote MCP (Model Context Protocol) server on Cloudflare Workers, complete with OAuth login. It is intended for developers who want to deploy MCP servers at the edge and connect them to clients like Claude Desktop.

How to use Remote MCP Server on Cloudflare?

Clone the repository, install dependencies with npm, and run locally with npx nx dev remote-mcp-server. Deploy to Cloudflare using npm run deploy after creating a KV namespace for OAuth. Connect clients via SSE at the /sse endpoint, either through the MCP Inspector or by configuring Claude Desktop with the mcp-remote proxy pointing to the server URL.

Key features of Remote MCP Server on Cloudflare

  • Runs on Cloudflare Workers at the edge
  • Includes OAuth login flow
  • Uses SSE (Server-Sent Events) transport
  • Deployable with a single command
  • Connects to MCP Inspector and Claude Desktop
  • Ships with example math tools

Use cases of Remote MCP Server on Cloudflare

  • Deploying an MCP server on Cloudflare’s global network
  • Prototyping MCP tools with the built-in OAuth login
  • Connecting Claude Desktop to a remote MCP server via SSE
  • Testing MCP endpoints locally before production deployment

FAQ from Remote MCP Server on Cloudflare

What transport does the server use?

Server-Sent Events (SSE) at the /sse endpoint.

How do I connect Claude Desktop to the server?

Install mcp-remote via npx and configure Claude’s JSON settings to point the mcp-remote command at the server’s /sse URL (local or remote).

What are the runtime requirements?

Node.js for local development and a Cloudflare account for deployment. A KV namespace (OAUTH_KV) must be created for OAuth to work.

How do I debug connection issues?

Restart Claude, try connecting directly with npx mcp-remote <url>, or clear the auth files in ~/.mcp-auth.

Where does OAuth data live?

OAuth state and session data are stored in a Cloudflare KV namespace (OAUTH_KV).

Tags

More from Cloud & Infrastructure