home / mcp / remote mcp server on cloudflare mcp server

Remote MCP Server on Cloudflare MCP Server

Provides a remote MCP server on Cloudflare Workers with OAuth login and local/remote access via SSE.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "anandkumarpatel-remote-mcp-server": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8787/sse"
      ]
    }
  }
}

You will run a remote MCP server that exposes its API over HTTP and can be connected to by MCP clients and Claude Desktop. This setup enables local development, remote access, and OAuth-based login while keeping tools accessible through familiar MCP clients.

How to use

You can use this MCP server with an MCP client to explore tools, authenticate, and execute actions. Start by testing locally, then connect a remote client once you deploy.

Connect the MCP inspector to your server from a local development environment to explore available tools and endpoints. Use the inspector to switch the Transport Type to SSE and point it at your local server’s SSE URL, then login when prompted. You’ll be redirected back to the inspector with access to list and call defined tools.

Connect Claude Desktop to your local MCP server by configuring Claude’s MCP connection to use the local SSE URL. Claude will prompt you to login and then expose the available tools in the UI for you to call with your prompts.

How to install

Prerequisites you need before starting work: Node.js and npm (or an equivalent Node runtime). Ensure you have access to the command line and network connections to install dependencies and start the server.

Step-by-step locally from scratch:

# clone the project repository
git clone [email protected]:cloudflare/ai.git

# move into the project directory
cd ai

# install dependencies
npm install

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

# open the app in your browser
# http://localhost:8787/

Additional sections

Deploy to Cloudflare. You will create a KV namespace for OAuth, configure wrangler, and deploy the worker so the MCP server becomes accessible remotely.

Call your newly deployed remote MCP server from a remote MCP client by starting the MCP inspector and pointing it to the deployed Worker’s SSE URL (for example, https://<your-worker>.workers.dev/sse). Then connect and interact with the server just as you did locally.

Connect Claude Desktop to your remote MCP server by updating Claude’s MCP configuration to use your workers.dev SSE URL. This enables Claude to authenticate and call the remote server’s tools via the same interface you use locally.

Debugging. If something goes wrong, you can restart Claude, or connect directly to your MCP server from the command line to test connectivity and tool calls. You can also clear authentication data if needed to reset sessions.

Example quick-start flow you may follow after setup includes starting local development, connecting the MCP inspector, and validating tool calls through Claude Desktop. Use the local SSE URL for initial tests and then switch to the deployed remote SSE URL when you’re ready to test remote access.