Remote

Provides a remote MCP server on Cloudflare Workers with local development and OAuth login for client connections.
  • typescript

0

GitHub Stars

typescript

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can run a remote MCP server on Cloudflare Workers and connect it to MCP clients for interactive tool access, using an OAuth-based login flow and a local development server that can later deploy to the edge.

How to use

To use your remote MCP server, first run the local development server and then connect to it from an MCP client such as the MCP Inspector or Claude Desktop. You will authenticate with OAuth in a browser window, then list and call the available MCP tools exposed by the server. For development and testing, start the local server, connect the inspector via SSE, and verify you can log in and access tools.

How to install

Prerequisites: you need Node.js and npm installed on your machine. You will also use npx to run MCP-related commands during development and deployment.

# Install Node.js and npm if needed
# (use your system package manager or installer)

# clone the project repository
# note: the command shown here is for local development; adapt if your setup differs
# git clone git@github.com:cloudflare/ai.git

# install dependencies for the local server
cd ai
npm install

# run the local MCP server in development mode
npx nx dev remote-mcp-server

Additional sections

Deploying and connecting to remote MCP environments requires a few explicit steps for configuration and testing. The local development server runs on port 8787 and provides an SSE endpoint at /sse for MCP clients to connect.

If you want to explore the server with the MCP Inspector, you can start the inspector and connect to the local SSE endpoint. The inspector provides a mock login screen and allows you to list and invoke defined tools after authentication.

To connect Claude Desktop to your local MCP server, point Claude to the local proxy by updating the configuration to route to http://localhost:8787/sse. This enables Claude to discover and call the same tools exposed by your MCP server.

Deploy to Cloudflare

Prepare a Cloudflare Workers KV namespace to store OAuth state and related data, then deploy the server to Cloudflare. The following steps outline the process you will follow.

npx wrangler@latest kv namespace create remote-mcp-server-oauth-kv
# Follow the guidance to add the kv namespace ID to wrangler.jsonc
npm run deploy

Call your newly deployed remote MCP server from a remote MCP client

After deployment, you can connect MCP clients to your remote server by using the Worker URL and the SSE endpoint. In the MCP Inspector, provide the workers.dev SSE URL and establish the connection to begin interacting with tools.

npx @modelcontextprotocol/inspector@latest

Connect Claude Desktop to your remote MCP server

Update Claude Desktop to point to your deployed Worker URL and restart Claude so it uses the remote MCP server.

{
  "mcpServers": {
    "math": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://worker-name.account-name.workers.dev/sse"
      ]
    }
  }
}

Debugging

If something goes wrong, restart Claude or try connecting directly to your MCP server from the command line to verify the endpoint is responsive.

npx mcp-remote http://localhost:8787/sse

Optional cleanup of local authentication files if needed

rm -rf ~/.mcp-auth

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational