MCP.so
Sign In

Overview

What is Remote MCP Server on Cloudflare?

This server helps you run a remote MCP (Model Context Protocol) server on Cloudflare Workers, complete with OAuth login. It is designed for developers who want to deploy an MCP server that can be accessed from remote clients like Claude Desktop or the MCP Inspector.

How to use Remote MCP Server on Cloudflare?

Clone the repository, install dependencies (npm install), and run locally with npx nx dev remote-mcp-server. Connect clients by pointing them to the server’s SSE endpoint (http://localhost:8787/sse). For deployment, create a KV namespace (npx wrangler kv namespace create OAUTH_KV), add the namespace ID to wrangler.jsonc, then run npm run deploy. Configure Claude Desktop by editing its config file to include an mcpServers entry using npx mcp-remote with your deployed Workers URL.

Key features of Remote MCP Server on Cloudflare

  • Deployable on Cloudflare Workers with OAuth authentication.
  • Supports SSE transport for MCP communication.
  • Includes a math tool (add) as an example.
  • Works with MCP Inspector for testing and debugging.
  • Connects to remote clients like Claude Desktop via a local proxy.

Use cases of Remote MCP Server on Cloudflare

  • Deploy a secure, remotely accessible MCP server for AI assistants.
  • Prototype and test MCP servers locally before production deployment.
  • Expose custom tools (e.g., math operations) to Claude Desktop over the internet.
  • Enable OAuth-protected API endpoints for MCP interactions.

FAQ from Remote MCP Server on Cloudflare

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

Edit Claude Desktop’s configuration file (Settings > Developer > Edit Config) and add an entry for the math server with npx mcp-remote http://localhost:8787/sse as the command and arguments.

How do I deploy to Cloudflare?

First create a KV namespace with npx wrangler kv namespace create OAUTH_KV, then add the returned ID to wrangler.jsonc. Finally run npm run deploy to push the worker to Cloudflare.

How do I debug connection issues?

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

What transport does the server use?

The server uses Server-Sent Events (SSE) transport. Clients connect to the /sse endpoint, as shown in the MCP Inspector and Claude Desktop configuration examples.

Tags

More from Cloud & Infrastructure