MCP.so
Sign In

Overview

What is Remote MCP Server on Cloudflare?

Remote MCP Server on Cloudflare is a project that demonstrates how to run a Model Context Protocol (MCP) server on Cloudflare Workers with OAuth login. It is intended for developers who want to create and test remote MCP tools accessible over HTTP via SSE transport.

How to use Remote MCP Server on Cloudflare?

Clone the repository from GitHub, install dependencies with npm, run the server locally with npx nx dev remote-mcp-server on port 8787, then connect any MCP client (e.g., MCP Inspector or Claude Desktop) using SSE at the /sse endpoint. To deploy, use npx wrangler kv namespace create OAUTH_KV, add the KV namespace ID to wrangler.jsonc, and run npm run deploy.

Key features of Remote MCP Server on Cloudflare

  • Runs on Cloudflare Workers for remote access.
  • Includes OAuth-based login flow.
  • Uses SSE transport for MCP communication.
  • Supports local development with hot reload.
  • Deployable to a workers.dev URL.

Use cases of Remote MCP Server on Cloudflare

  • Connect Claude Desktop to a remote MCP server for custom tool use.
  • Test MCP tools locally with the MCP Inspector before deployment.
  • Build and host MCP tools accessible from any remote MCP client.
  • Prototype OAuth‑protected MCP APIs on Cloudflare’s edge.

FAQ from Remote MCP Server on Cloudflare

How do I connect Claude Desktop to the MCP server?

Add a configuration entry in Claude Desktop’s JSON config file using the mcp-remote command, pointing to the server’s /sse URL (e.g., "command": "npx", "args": ["mcp-remote", "http://localhost:8787/sse"] for local, or the workers.dev URL for remote).

How do I deploy the server to Cloudflare?

Create a KV namespace with npx wrangler kv namespace create OAUTH_KV, add its ID to wrangler.jsonc, then run npm run deploy. The server will be available at a workers.dev URL.

What transport does the MCP server use?

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

How can I debug connection issues?

Restart Claude Desktop, or test the MCP server from the command line with npx mcp-remote http://localhost:8787/sse. In rare cases, delete the authentication cache with rm -rf ~/.mcp-auth.

What are the runtime dependencies?

The project requires Node.js, npm, and npx. For local development, it uses Nx and the MCP Inspector. Deployment uses Wrangler (Cloudflare Workers CLI). No additional remote services are needed.

Tags

More from Cloud & Infrastructure