Remote MCP Server on Cloudflare

Remote MCP server on Cloudflare Workers with OAuth login, deployable locally or in the cloud.
  • 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 that exposes MCP endpoints from a Cloudflare Workers deployment, then test it locally, connect clients like Claude Desktop, and deploy to the cloud. This guide walks you through developing locally, testing with the MCP Inspector, connecting Claude Desktop, deploying to Cloudflare, and debugging common issues.

How to use

You can explore and use your MCP server from an MCP client such as the MCP Inspector. Start the local server, connect the Inspector via SSE, login on the mock screen, and then access the defined tools. For Claude Desktop, configure the client to point at your local or remote MCP server so Claude can call the available tools through the MCP proxy.

How to install

Prerequisites: you need Node.js and npm installed on your system. You also need a terminal or command prompt with access to run npm and npx commands.

git clone git@github.com:cloudflare/ai.git
cd ai
npm install
npx nx dev remote-mcp-server

Additional content

Deploy and connect workflows are described below. You can run a local MCP server, test with the MCP Inspector, and then deploy to Cloudflare if you need a remote instance.

Deploy to Cloudflare

Prepare a Cloudflare Workers deployment and create a KV namespace for OAuth state if required. Then deploy your remote MCP server so clients can reach it over the public web.

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

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

Use an MCP client such as the MCP Inspector, and point it to the remote Worker URL for the SSE endpoint. You should connect and then be able to list and call the defined tools on your deployed server.

npx @modelcontextprotocol/inspector@latest

Enter the workers.dev URL for the SSE endpoint, for example:
https://worker-name.account-name.workers.dev/sse
Click Connect and login if prompted.

Connect Claude Desktop to your remote MCP server

Update Claude Desktop to point to your remote MCP server SSE URL so Claude can call tools through the remote proxy.

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

Debugging

If something goes wrong, try restarting Claude or connect directly to your MCP server from the command line to verify the SSE endpoint is reachable.

npx mcp-remote https://worker-name.account-name.workers.dev/sse

Available tools

MCP Inspector

A tool to explore the MCP API, switch Transport Type to SSE, connect to the MCP server SSE endpoint, and login to access and call defined tools.

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