Remote MCP Server logo

Remote MCP Server

by shuaking

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 or deploy it to Cloudflare for remote access, enabling integration with tools like the MCP Inspector and Claude.

View on GitHub

Last updated: N/A

What is Remote MCP Server?

This is a remote MCP server implementation designed to run on Cloudflare Workers. It provides a server-side endpoint for the Model Context Protocol, allowing AI models like Claude to access and utilize external tools.

How to use Remote MCP Server?

To use this server, you can first develop it locally using npm install and npx nx dev remote-mcp-server. Then, you can connect the MCP Inspector or Claude Desktop to your local or deployed server by configuring the appropriate SSE endpoint URL. Finally, deploy it to Cloudflare using npm run deploy after setting up the necessary KV namespace.

Key features of Remote MCP Server

  • Remote MCP server

  • Cloudflare Workers deployment

  • OAuth login

  • SSE transport

  • Integration with MCP Inspector

  • Integration with Claude

Use cases of Remote MCP Server

  • Connecting AI models to external tools

  • Enabling Claude to perform tasks using external tools

  • Providing a serverless MCP endpoint

  • Testing and developing MCP integrations locally

  • Deploying MCP servers to the cloud

FAQ from 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 URL (e.g., http://localhost:8787/sse) and click connect.

How do I connect Claude Desktop?

Follow Anthropic's Quickstart and update the Claude configuration file with the server URL.

How do I deploy to Cloudflare?

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

What if something goes wrong?

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

What is MCP?

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