What is Remote MCP Server on Cloudflare?
It is a guide and template for running a remote MCP (Model Context Protocol) server on Cloudflare Workers, complete with OAuth login. It is intended for developers who want to deploy and use MCP tools with remote clients like 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. Connect to the server using the MCP Inspector with SSE transport at http://localhost:8787/sse, or configure Claude Desktop to use the local proxy (npx mcp-remote http://localhost:8787/sse). To deploy, create a KV namespace with npx wrangler kv namespace create OAUTH_KV, update wrangler.jsonc, and run npm run deploy.
Key features of Remote MCP Server on Cloudflare
- Runs on Cloudflare Workers as a remote MCP server
- OAuth login via browser-based authentication
- Supports SSE (Server-Sent Events) transport
- Works with MCP Inspector and Claude Desktop
- Deployable to a
workers.dev URL
Use cases of Remote MCP Server on Cloudflare
- Connecting Claude Desktop to a remote MCP server hosted on Cloudflare
- Running MCP tools at the edge with Cloudflare Workers
- Developing and testing MCP servers locally with the MCP Inspector
- Distributing an MCP server that requires OAuth authentication
评论