Remote MCP Server on Cloudflare
@k4han
Overview
What is Remote MCP Server on Cloudflare?
A template for deploying a Model Context Protocol (MCP) server on Cloudflare Workers, complete with OAuth login. It provides an example math tool and supports SSE transport, enabling remote AI clients like Claude Desktop to call tools over HTTP.
How to use Remote MCP Server on Cloudflare?
Clone the repository, install dependencies, and run npx nx dev remote-mcp-server for local development. Deploy with npm run deploy after configuring a KV namespace. Connect clients (MCP Inspector or Claude Desktop) using the workers.dev URL with the /sse endpoint.
Key features of Remote MCP Server on Cloudflare
- Runs on Cloudflare Workers with OAuth login
- Uses SSE transport for remote MCP connections
- Includes a sample math (add) tool
- Deployable with a single
npm run deploycommand - Connects to Claude Desktop via
mcp-remoteproxy - Full local development with MCP Inspector support
Use cases of Remote MCP Server on Cloudflare
- Deploy a remote MCP server for Claude Desktop to call custom tools
- Prototype and test MCP tools locally with the inspector
- Provide OAuth‑protected tool access to remote AI clients
- Serve as a reference architecture for Workers‑based MCP servers
FAQ from Remote MCP Server on Cloudflare
What runtime or platform does Remote MCP Server on Cloudflare require?
It runs on Cloudflare Workers; local development requires Node.js and the wrangler CLI (installed via npm).
How does Remote MCP Server on Cloudflare handle authentication?
It uses OAuth login via a browser redirect. In development a mock login screen is shown; in production real OAuth flows are used.
Can I use Remote MCP Server on Cloudflare with Claude Desktop?
Yes. Configure Claude Desktop to use mcp-remote as a command with the server’s /sse URL; Claude will open a browser for login.
Where does Remote MCP Server on Cloudflare store data?
Session state uses a Cloudflare KV namespace (OAUTH_KV) that you create and bind during deployment.
What transport does Remote MCP Server on Cloudflare support?
Server‑Sent Events (SSE) via the /sse endpoint. No other transports (e.g., stdio) are documented.