- Home
- MCP servers
- Remote
Remote
- 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.
You can run a remote MCP server that connects to a front-end client via server-sent events (SSE) and supports OAuth login. This setup lets clients discover and call MCP tools from anywhere, including Cloudflare Workers and desktop integrations like Claude Desktop.
How to use
Use the MCP Inspector to explore your MCP server. Connect to your local server at the SSE endpoint and login to see the available tools.
- Open the MCP Inspector and switch Transport Type to SSE
- Enter the MCP server SSE URL: http://localhost:8787/sse
- Click Connect
- Login with any email and password to proceed
- Browse and call defined tools from the inspector
How to install
Prerequisites: ensure Node.js and npm are installed on your system. You will run commands locally to develop and test the MCP server.
# clone the repository
git clone git@github.com:cloudflare/ai.git
# install dependencies
cd ai
npm install
# run locally
npx nx dev remote-mcp-server
Additional steps for local and remote usage
Connect Claude Desktop to your local MCP server by configuring Claude to proxy through a local mcp-remote instance. This requires updating Claude's Developer configuration with the local SSE URL.
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse"
]
}
}
}
Deploy to Cloudflare
Prepare a Cloudflare deployment by creating a KV namespace and deploying your Worker so clients can connect remotely via SSE.
npx wrangler@latest kv namespace create remote-mcp-server-oauth-kv
Then add the KV namespace ID to your wrangler configuration and deploy the server.
npm run deploy
Call your newly deployed remote MCP server from a remote MCP client
Once deployed, connect from a remote MCP client by using the remote SSE URL for the Worker.
npx @modelcontextprotocol/inspector@latest
In the inspector, provide your Worker’s dev URL (for example: https://worker-name.account-name.workers.dev/sse) as the MCP server URL and connect.
Connect Claude Desktop to your remote MCP server
Update Claude's configuration to point to your remote MCP server SSE URL and restart Claude to enable tool usage from Claude.
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"https://worker-name.account-name.workers.dev/sse"
]
}
}
}
Debugging
If you run into issues, restart Claude or connect directly to your MCP server from the command line to test the SSE endpoint.
npx mcp-remote http://localhost:8787/sse
If needed, clear local authentication data to resolve auth issues.
rm -rf ~/.mcp-auth
Available tools
MCP Inspector
Tool to connect to and explore MCP servers via SSE, login, list and call defined tools.
Claude Desktop integration
Connect Claude Desktop to an MCP server via a local proxy using mcp-remote and update Claude configuration to access MCP tools.