MCP.so
Sign In
Servers

Remote MCP Server on Cloudflare

@CyberTwizted

Overview

What is Remote MCP Server on Cloudflare?

A template to quickly set up a remote MCP (Model Context Protocol) server on Cloudflare Workers, complete with OAuth login. It is intended for developers who want to run MCP tools with authentication on Cloudflare’s edge platform.

How to use Remote MCP Server on Cloudflare?

Clone the repository, install dependencies, and run locally with npx nx dev remote-mcp-server. For deployment, create a KV namespace with npx wrangler kv namespace create OAUTH_KV, add the ID to wrangler.jsonc, then run npm run deploy. Connect clients (MCP Inspector or Claude Desktop) using the SSE endpoint at /sse.

Key features of Remote MCP Server on Cloudflare

  • OAuth login integration for secure access
  • Deployable to Cloudflare Workers’ global network
  • Local development with live reload
  • Compatible with MCP Inspector for tool testing
  • Works with Claude Desktop via mcp-remote proxy

Use cases of Remote MCP Server on Cloudflare

  • Running a remote MCP server with authentication
  • Developing and testing custom MCP tools locally
  • Connecting MCP tools to Claude Desktop from any location
  • Rapid prototyping of AI‑powered tool integrations

FAQ from Remote MCP Server on Cloudflare

How do I run the MCP server locally?

Clone the repo, install dependencies, then run npx nx dev remote-mcp-server. The server will be available at http://localhost:8787/.

How do I deploy to Cloudflare?

Use npx wrangler kv namespace create OAUTH_KV, add the returned ID to wrangler.jsonc, then execute npm run deploy.

How do I connect Claude Desktop to my server?

Edit Claude Desktop’s config file (Settings > Developer > Edit Config) and add an entry pointing npx mcp-remote to your server’s SSE URL (e.g., http://localhost:8787/sse locally or https://worker-name.account-name.workers.dev/sse after deployment).

How do I debug connection issues?

Restart Claude, or test connectivity directly with npx mcp-remote http://localhost:8787/sse. In rare cases, clear cached auth files with rm -rf ~/.mcp-auth.

How do I connect using MCP Inspector?

Start the inspector with npx @modelcontextprotocol/inspector, set Transport Type to SSE, and enter your server’s SSE URL (e.g., http://localhost:8787/sse). Complete the OAuth login to access and call tools.

More from Cloud & Infrastructure