Remote MCP Server on Cloudflare
by benjaminhdd
This project sets up a remote MCP (Model Context Protocol) server on Cloudflare Workers with OAuth login. It allows you to connect to the server locally, through the MCP Inspector, or remotely from Claude Desktop.
Last updated: N/A
What is Remote MCP Server on Cloudflare?
This is a remote MCP server implementation designed to run on Cloudflare Workers. It provides a way to expose tools and functionalities that can be accessed by MCP-compatible clients, such as Claude.
How to use Remote MCP Server on Cloudflare?
The server can be used locally for development and testing, and then deployed to Cloudflare Workers for remote access. Instructions are provided for connecting to the server using the MCP Inspector and Claude Desktop, both locally and remotely. The deployment process involves creating a Cloudflare KV namespace, updating the wrangler.jsonc file, and running the deploy command.
Key features of Remote MCP Server on Cloudflare
Remote access via Cloudflare Workers
OAuth login
Integration with MCP Inspector
Integration with Claude Desktop
SSE (Server-Sent Events) transport
Use cases of Remote MCP Server on Cloudflare
Exposing custom tools to AI models like Claude
Building serverless MCP APIs
Developing and testing MCP integrations
Creating remote services for AI interactions
Enabling AI models to access external resources and functionalities
FAQ from Remote MCP Server on Cloudflare
How do I connect to the server locally?
How do I connect to the server locally?
Use the MCP Inspector with Transport Type 'SSE' and the URL http://localhost:8787/sse
How do I connect Claude Desktop to the server?
How do I connect Claude Desktop to the server?
Update the Claude configuration file to point to the server's URL (either local or remote) using the provided JSON snippet.
How do I deploy the server to Cloudflare?
How do I deploy the server to Cloudflare?
Create a Cloudflare KV namespace, add the namespace ID to wrangler.jsonc
, and run npm run deploy
.
What if something goes wrong?
What if something goes wrong?
Try restarting Claude, connecting directly to the server with npx mcp-remote http://localhost:8787/sse
, or clearing the files in ~/.mcp-auth
.
How do I find my workers.dev URL?
How do I find my workers.dev URL?
After deploying to Cloudflare, the URL will be in the format worker-name.account-name.workers.dev/sse