MCP.so
Sign In

Overview

What is Remote MCP Server on Cloudflare?

A project to get a remote MCP (Model Context Protocol) server up-and-running on Cloudflare Workers, complete with OAuth login. It is intended for developers who want to host an MCP server that can be accessed remotely.

How to use Remote MCP Server on Cloudflare?

Clone the repository, install dependencies with npm install, then run locally with npx nx dev remote-mcp-server. Deploy to Cloudflare using npx wrangler kv namespace create OAUTH_KV and npm run deploy. Connect clients like the MCP Inspector or Claude Desktop by providing the server’s SSE URL (e.g., http://localhost:8787/sse locally, or your workers.dev URL after deployment).

Key features of Remote MCP Server on Cloudflare

  • Runs on Cloudflare Workers with OAuth login
  • Supports SSE (Server-Sent Events) transport
  • Includes a local proxy for connecting to MCP clients
  • Works with MCP Inspector for testing
  • Connects to Claude Desktop via a remote configuration

Use cases of Remote MCP Server on Cloudflare

  • Hosting a remote MCP server for AI assistants
  • Testing and debugging MCP tools with the MCP Inspector
  • Enabling Claude Desktop to call custom tools over HTTP

FAQ from Remote MCP Server on Cloudflare

How do I run the server locally?

Clone the repository, run npm install, then use npx nx dev remote-mcp-server. Open http://localhost:8787/ in your browser.

How do I connect the MCP Inspector to my server?

Start the inspector with npx @modelcontextprotocol/inspector, switch transport to SSE, enter http://localhost:8787/sse (or your deployed URL), and click “Connect”. You can then list and call tools.

How do I connect Claude Desktop to the server?

In Claude Desktop’s config file, add an entry using npx mcp-remote with your server’s SSE URL (e.g., "http://localhost:8787/sse"). After restarting Claude, a browser login window will open.

How do I deploy the server to Cloudflare?

Run npx wrangler kv namespace create OAUTH_KV, add the namespace ID to wrangler.jsonc, then execute npm run deploy. The server will be available at your workers.dev URL.

How do I debug connection issues?

Restart Claude, or try connecting directly via npx mcp-remote http://localhost:8787/sse. In rare cases, clear the files in ~/.mcp-auth with rm -rf ~/.mcp-auth.

Tags

More from Cloud & Infrastructure