Remote MCP Server on Cloudflare logo

Remote MCP Server on Cloudflare

by Laity624

This project allows you to set up a remote Model Context Protocol (MCP) server on Cloudflare Workers with OAuth login. It provides instructions for local development, deployment, and integration with tools like the MCP Inspector and Claude Desktop.

View on GitHub

Last updated: N/A

What is Remote MCP Server on Cloudflare?

This is a remote Model Context Protocol (MCP) server that can be deployed on Cloudflare Workers. It enables you to expose tools and functionalities to language models like Claude in a secure and scalable manner.

How to use Remote MCP Server on Cloudflare?

To use this server, you need to clone the repository, install dependencies, and run it locally for development. Then, you can deploy it to Cloudflare Workers using the provided instructions, including setting up a KV namespace for OAuth. Finally, configure your MCP client (e.g., MCP Inspector or Claude Desktop) to connect to the deployed server's URL.

Key features of Remote MCP Server on Cloudflare

  • Remote MCP server

  • Cloudflare Workers deployment

  • OAuth login

  • Integration with MCP Inspector

  • Integration with Claude Desktop

Use cases of Remote MCP Server on Cloudflare

  • Exposing custom tools to language models

  • Building scalable and secure MCP servers

  • Integrating language models with external services

  • Developing and testing MCP integrations locally

  • Deploying MCP servers to a serverless environment

FAQ from Remote MCP Server on Cloudflare

How do I run the server locally?

Clone the repository, install dependencies with npm install, and then run npx nx dev remote-mcp-server.

How do I connect the MCP Inspector?

Start the inspector with npx @modelcontextprotocol/inspector, switch the Transport Type to SSE, and enter the server's URL (e.g., http://localhost:8787/sse).

How do I connect Claude Desktop?

Update the Claude configuration file to point to the server's URL and restart Claude.

How do I deploy to Cloudflare?

Create a KV namespace, add the namespace ID to wrangler.jsonc, and run npm run deploy.

What do I do 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.