home / mcp / remote mcp server

Remote MCP Server

A remote MCP server on Cloudflare Workers enabling remote client access and OAuth-style login for MCP tooling.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "amila-deshan-remote-mcp-server": {
      "command": "npx",
      "args": [
        "nx",
        "dev",
        "remote-mcp-server"
      ]
    }
  }
}

You can run a remote MCP server on Cloudflare Workers and connect it to MCP clients for remote tool usage. This setup supports local development, integration with the MCP Inspector, and deployment to Cloudflare, enabling OAuth-style login and remote access to MCP tools.

How to use

You connect to your MCP server from an MCP client to discover and call available tools. Start the local server, then use the MCP Inspector to explore its endpoints and tools. For Claude Desktop, configure a local proxy so Claude talks to your MCP server over HTTP. When deployed, you connect to the remote server from any MCP client by pointing to its workers.dev URL.

How to install

Prerequisites you should have installed before getting started: Node.js and npm (or pnpm), and a modern browser for local testing.

# clone the repository
git clone https://github.com/cloudflare/ai.git
# Or if using ssh:
# git clone [email protected]:cloudflare/ai.git

# install dependencies
cd ai
# Note: using pnpm instead of just "npm"
pnpm install

# run locally
npx nx dev remote-mcp-server

Additional sections

Deploying and connecting to the MCP server involves several practical steps. Below are the main workflows you will follow and the required configurations.

Develop locally and test with the MCP Inspector. Start the local server and connect the inspector using SSE transport.

Connect Claude Desktop to your local MCP server by configuring a local proxy so Claude talks to your MCP server over HTTP.

Deploy to Cloudflare to expose your MCP server remotely. After deployment you can connect MCP clients to the remote endpoint.

Debugging and troubleshooting: restart Claude when needed and you can try connecting directly to your MCP server from the command line. If you encounter auth state issues, you can clear local authentication files.

Available tools

MCP Inspector

A browser-based tool to explore the MCP server API, switch transport to SSE, connect to the server URL, and enumerate available tools.

Claude Desktop integration

Configuration workflow to connect Claude Desktop to the MCP server via a local proxy, enabling Claude to discover and invoke MCP tools.