Remote

A remote MCP server that runs on Cloudflare Workers with local and remote access via SSE endpoints.
  • javascript

0

GitHub Stars

javascript

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

This remote MCP server enables you to run a Model Context Protocol (MCP) server on Cloudflare Workers, with local development, Dockerless deployment, and easy integration with MCP clients like Claude. It supports connecting via HTTP(S) and can be accessed from both local and remote clients.

How to use

You can connect MCP clients to this server to explore and call available tools. Start by running your local MCP server, then connect an MCP inspector or Claude Desktop to the appropriate endpoint. You can also deploy the server to Cloudflare and connect from a remote MCP client.

How to install

Prerequisites you need before installation:

# Prerequisites
- Node.js (LTS)
- npm
- wrangler (for Cloudflare deployment)

Step by step install and run locally:

# clone the repository
git clone git@github.com:cloudflare/ai.git

# navigate to this example
cd ai/demos/remote-mcp-server

# install dependencies
npm install

# run locally
npm run dev

Deploy to Cloudflare

Deploy the MCP server to Cloudflare and expose it for remote MCP clients.

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

Configure client connections

You can connect MCP clients to either a local server or a remote deployed server. Use the Inspector to explore the server locally, then point Claude Desktop to the server URL to use tools in your prompts.

# Local server via MCP Inspector
npx @modelcontextprotocol/inspector
# In the inspector, set Transport Type to SSE and URL to http://localhost:8787/sse

Using Claude Desktop with a local server

Configure Claude Desktop to connect to your local MCP server. Create or edit your MCP configuration with the following entry to route through a local proxy.

{
  "mcpServers": {
    "math": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8787/sse"
      ]
    }
  }
}

Using Claude Desktop with a remote server

To connect Claude to your deployed MCP server, update the configuration to point to the remote workers URL. This enables Claude to access tools via the remote endpoint.

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

Debugging

If something goes wrong, restart Claude or connect directly to your MCP server from the command line to test connectivity.

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

If necessary, you can clear authentication data on your machine to resolve auth issues.

rm -rf ~/.mcp-auth

Troubleshooting tips

Ensure the MCP server is reachable at the specified SSE endpoint. If you deploy to Cloudflare, verify the KV namespace is configured correctly and that the deployed worker is responding to /sse with the expected MCP protocol.

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