Remote MCP Server on Cloudflare
by k4han
This project sets up a remote Model Context Protocol (MCP) server on Cloudflare Workers with OAuth login. It allows you to connect to the server locally, deploy it to Cloudflare, and integrate it with tools like the MCP Inspector and 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 an interface for tools to interact with language models like Claude.
How to use Remote MCP Server on Cloudflare?
To use this server, you first need to clone the repository and install the dependencies. You can then run it locally for development and testing. To deploy to Cloudflare, you need to create a KV namespace and configure your wrangler.jsonc
file. Finally, you can connect to the server using the MCP Inspector or integrate it with Claude Desktop by updating the configuration file.
Key features of Remote MCP Server on Cloudflare
Remote MCP server
Cloudflare Workers deployment
OAuth login
MCP Inspector integration
Claude Desktop integration
Use cases of Remote MCP Server on Cloudflare
Connecting language models to external tools
Providing a remote interface for MCP
Integrating Claude with custom tools
Developing and testing MCP servers locally
Deploying MCP servers to a serverless environment
FAQ from Remote MCP Server on Cloudflare
How do I run the server locally?
How do I run the server locally?
Clone the repository, install dependencies with npm install
, and run npx nx dev remote-mcp-server
.
How do I connect the MCP Inspector?
How do I connect the MCP Inspector?
Start the inspector with npx @modelcontextprotocol/inspector
, switch the Transport Type to SSE
, and enter the server URL (e.g., http://localhost:8787/sse
).
How do I connect Claude Desktop?
How do I connect Claude Desktop?
Update the Claude configuration file with the server URL and restart Claude.
How do I deploy to Cloudflare?
How do I deploy to Cloudflare?
Create a KV namespace with npx wrangler kv namespace create OAUTH_KV
, add the namespace ID to wrangler.jsonc
, and run npm run deploy
.
How do I debug issues?
How do I debug issues?
Restart Claude, connect directly to the server with npx mcp-remote http://localhost:8787/sse
, or clear the files in ~/.mcp-auth
.