Remote MCP Server on Cloudflare logo

Remote MCP Server on Cloudflare

by MCP-Mirror

This project allows you to set up a remote MCP (Model Context Protocol) server on Cloudflare Workers with OAuth login. It enables you to connect to the server locally, remotely, and integrate it with applications like Claude.

View on GitHub

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 AI tools and functionalities through the Model Context Protocol, allowing applications like Claude to interact with them.

How to use Remote MCP Server on Cloudflare?

  1. Clone the repository and install dependencies. 2. Run the server locally for development. 3. Connect the MCP inspector or Claude Desktop to the local or deployed server. 4. Deploy the server to Cloudflare Workers using Wrangler. 5. Configure your client (MCP Inspector, Claude) to point to the deployed server's URL.

Key features of Remote MCP Server on Cloudflare

  • Remote access via Cloudflare Workers

  • OAuth login for security

  • Integration with MCP Inspector for testing

  • Integration with Claude for AI tool usage

  • SSE (Server-Sent Events) transport

Use cases of Remote MCP Server on Cloudflare

  • Exposing AI tools to applications

  • Connecting Claude to custom tools

  • Building a remote AI service

  • Testing and debugging MCP implementations

  • Creating a scalable MCP server

FAQ from Remote MCP Server on Cloudflare

How do I connect the MCP Inspector?

Start the MCP Inspector, switch the Transport Type to SSE, and enter the server's URL (e.g., http://localhost:8787/sse or your Cloudflare Workers URL).

How do I connect Claude Desktop?

Edit the Claude configuration file to point to your server's URL, specifying the command and arguments for the MCP server.

What if something goes wrong?

Try restarting Claude. You can also connect directly to your MCP server on the command line with npx mcp-remote http://localhost:8787/sse. Clearing the files added to ~/.mcp-auth may also help.

How do I deploy to Cloudflare?

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

What is MCP?

MCP stands for Model Context Protocol. It's a protocol that allows applications to interact with AI models and tools.