Remote MCP Server on Cloudflare logo

Remote MCP Server on Cloudflare

by aninibread

This project provides a remote Model Context Protocol (MCP) server that runs on Cloudflare Workers, complete with OAuth login. It allows you to connect MCP clients like the MCP Inspector and Claude Desktop to a server deployed on Cloudflare.

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 enables you to expose MCP tools and APIs to clients like the MCP Inspector and Claude Desktop, leveraging Cloudflare's serverless platform.

How to use Remote MCP Server on Cloudflare?

To use this server, you first need to clone the repository and install dependencies. You can then run it locally for development and testing. To deploy to Cloudflare, you need to create a KV namespace, add the namespace ID to wrangler.jsonc, and then run npm run deploy. Finally, configure your MCP client (e.g., MCP Inspector or Claude Desktop) to point to the deployed server's URL.

Key features of Remote MCP Server on Cloudflare

  • Remote MCP server

  • Cloudflare Workers deployment

  • OAuth login

  • MCP Inspector compatibility

  • Claude Desktop integration

Use cases of Remote MCP Server on Cloudflare

  • Exposing MCP tools to remote clients

  • Integrating custom tools with Claude

  • Building serverless AI applications

  • Testing and development of MCP integrations

  • Creating a scalable MCP server infrastructure

FAQ from Remote MCP Server on Cloudflare

How do I connect the MCP Inspector?

Start the 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 the server's URL, replacing the existing configuration with the provided JSON snippet.

What if something goes wrong?

Try restarting Claude or connecting directly to the MCP server using npx mcp-remote http://localhost:8787/sse. You can also try clearing the files in ~/.mcp-auth.

How do I deploy to Cloudflare?

Create a KV namespace using npx wrangler kv namespace create OAUTH_KV, add the namespace ID to wrangler.jsonc, and then run npm run deploy.

What is MCP?

MCP stands for Model Context Protocol. It is a protocol that allows tools to communicate with Large Language Models.