MCP.so
Sign In

Overview

What is Remote MCP Server on Cloudflare?

A project template to quickly deploy a remote MCP (Model Context Protocol) server on Cloudflare Workers with built-in OAuth login. It is for developers who want to host an MCP server at a public URL and connect it to MCP clients such as the MCP Inspector or Claude Desktop.

How to use Remote MCP Server on Cloudflare?

Clone the repository, install dependencies, and run locally with npx nx dev remote-mcp-server. To connect tools, use the MCP Inspector with SSE transport at http://localhost:8787/sse. For Claude Desktop, configure the MCP client using the mcp-remote proxy and your Worker’s URL. Deploy to Cloudflare with npm run deploy after setting up a KV namespace for OAuth.

Key features of Remote MCP Server on Cloudflare

  • Runs as a Cloudflare Worker with OAuth login.
  • Uses SSE (Server-Sent Events) transport for MCP communication.
  • Integrates with the MCP Inspector for tool testing.
  • Works with Claude Desktop via a local proxy.
  • Supports local development with hot‑reload.
  • Deploys to a public workers.dev URL.

Use cases of Remote MCP Server on Cloudflare

  • Expose an MCP math tool as a remote API for testing.
  • Connect Claude Desktop to a self‑hosted MCP server over the internet.
  • Develop and debug MCP tools locally before deploying to production.
  • Provide OAuth‑protected MCP endpoints for multiple clients.

FAQ from Remote MCP Server on Cloudflare

What does this server do?

It hosts an MCP server as a Cloudflare Worker, enabling remote MCP clients (like Claude Desktop) to call its tools after OAuth login.

What are the dependencies?

Node.js, npm, and a Cloudflare account with Wrangler CLI installed. A Cloudflare KV namespace is required for OAuth state storage.

Where does data (OAuth state, etc.) live?

OAuth data is stored in Cloudflare Workers KV. No user data is persisted beyond authentication tokens.

How does the OAuth flow work?

The server implements a mock OAuth login. In local development a user/password screen appears; on deployment the real OAuth flow from Cloudflare’s access protection is used.

Which transport does the server use?

It uses SSE (Server-Sent Events) transport. Clients must connect to the /sse endpoint.

Tags

More from Cloud & Infrastructure