Remote MCP Server logo

Remote MCP Server

by anniandnevi

This project provides a remote MCP (Model Context Protocol) server that can be deployed on Cloudflare Workers. It enables connecting MCP clients like the MCP Inspector and Claude Desktop to a remote server instance.

View on GitHub

Last updated: N/A

What is Remote MCP Server?

The Remote MCP Server is a server implementation of the Model Context Protocol designed to run on Cloudflare Workers. It allows you to expose tools and functionalities to AI models like Claude through a standardized protocol.

How to use Remote MCP Server?

To use the server, you first develop it locally using npm install and npx nx dev remote-mcp-server. Then, you can deploy it to Cloudflare using npx wrangler kv namespace create OAUTH_KV and npm run deploy. You can connect to it using the MCP Inspector or Claude Desktop by configuring them with the server's URL.

Key features of Remote MCP Server

  • Remote MCP server deployment

  • Cloudflare Workers compatibility

  • OAuth login support

  • Integration with MCP Inspector

  • Integration with Claude Desktop

Use cases of Remote MCP Server

  • Exposing custom tools to AI models

  • Creating a centralized MCP server for multiple clients

  • Developing and testing MCP integrations

  • Enabling AI models to interact with external services

  • Providing a secure and scalable MCP server solution

FAQ from Remote MCP Server

How do I connect the MCP Inspector to the server?

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 or worker-name.account-name.workers.dev/sse) and click "Connect".

How do I connect Claude Desktop to the server?

Update the Claude configuration file (Settings > Developer > Edit Config) to point to the server's URL and restart Claude. The configuration should include the mcpServers section with the correct URL.

What if I encounter issues connecting to the server?

Try restarting Claude, or connecting directly to the server on the command line with npx mcp-remote http://localhost:8787/sse. You can also try clearing the files added to ~/.mcp-auth with rm -rf ~/.mcp-auth.

What is the purpose of the OAUTH_KV namespace?

The OAUTH_KV namespace is used for storing OAuth-related data, likely for user authentication and authorization when accessing the MCP server.

Can I use this server with other MCP clients besides the MCP Inspector and Claude Desktop?

Yes, any MCP client that supports the SSE transport type should be able to connect to this server, as long as it's configured with the correct URL.