home / mcp / remote mcp server
Exposes MCP tools via local development, Cloudflare deployment, and remote clients for OAuth-enabled access.
Configuration
View docs{
"mcpServers": {
"aungkoko-coding-remote-mcp-server": {
"url": "http://localhost:8787/sse"
}
}
}You can run a remote MCP Server on Cloudflare Workers to expose MCP tools securely, with local development, in-browser inspector access, and remote clients like Claude Desktop. This guide walks you through setting up locally, connecting with the MCP Inspector, deploying to Cloudflare, and using a remote MCP client.
To use the MCP server, start it locally, connect with the MCP Inspector, and optionally bridge it to Claude Desktop or deploy it to Cloudflare Workers for remote access.
Connect the MCP Inspector to your local server by starting the inspector, selecting SSE as the transport, and pointing it to the local server endpoint. You can login with any email and password on the mock login screen, then you’ll be able to list and call defined tools.
Open Claude Desktop and configure it to connect to your local MCP server by providing the local SSE URL. This creates a local proxy so Claude can talk to your MCP server over HTTP.
Deploy the server to Cloudflare to enable remote access. After deployment, you’ll receive a Worker URL you can use from remote MCP clients.
From a remote MCP client, start the MCP Inspector and point it to your Worker URL with the /sse endpoint to connect. You will be able to use the same tools as in local development.
Update Claude Desktop to connect to your remote Worker URL and restart Claude to access the tools remotely.
If something goes wrong, you can restart Claude or verify your local server is reachable at the SSE endpoint. You can also reset local authentication data if needed.
Prerequisites: ensure you have Node.js installed and a package manager available (pnpm is used in the setup). You will also need a working internet connection for dependencies and deployment tools.
Step 1: Clone the project repository
Step 2: Install dependencies
Step 3: Run the local development server
Step 4: Open the local server in your browser
# 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
# You should be able to open http://localhost:8787/ in your browserConfiguration, deployment, and debugging are described below. The most important endpoints you will interact with are the local SSE endpoint http://localhost:8787/sse for development and the Cloudflare Worker endpoint for remote access.
Note the following commands used in the workflow:
Starting the local server
Connecting the MCP Inspector to a local server
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse"
]
}
}
}