- Home
- MCP servers
- Remote
Remote
- typescript
0
GitHub Stars
typescript
Language
6 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{
"mcpServers": {
"mahjong-dice-remote-mcp-server": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse"
]
}
}
}You can run a remote MCP (Model Context Protocol) server on a Cloudflare Worker, host it locally for development, connect it to MCP clients like the MCP Inspector and Claude Desktop, and deploy it so others can reach it remotely. This guide walks you through installing, using, and deploying the server, plus practical tips for debugging and connecting clients.
How to use
Start by running the MCP server locally to develop and test your setup. Use the MCP Inspector to explore the API, social login flow, and available tools. You can then connect Claude Desktop to either your local or remote MCP server by updating its configuration to point at the appropriate SSE endpoint.
How to install
Prerequisites you need before installing: a recent version of Node.js and pnpm. You will also use the MCP Inspector and Claude Desktop during setup.
- Clone the project and install dependencies locally. Execute these commands one per line.
git clone https://github.com/cloudflare/ai.git
# Or if using ssh:
# git@github.com:cloudflare/ai.git
cd ai
# Note: using pnpm instead of just "npm"
pnpm install
- Run the remote MCP server in development mode. Start the server and open the UI at the given address.
npx nx dev remote-mcp-server
Additional configurations and usage notes
Connect to your local MCP server from the Claude Desktop to enable HTTP proxying and testing against a local endpoint.
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse"
]
}
}
}
Deploy to Cloudflare
Prepare a Cloudflare deployment by creating an OAuth KV namespace, then deploy your worker. Use these steps exactly as shown.
1. npx wrangler kv namespace create 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
After deployment, you can connect from a remote MCP client by pointing it at the worker’s SSE endpoint. Use the MCP Inspector to connect to the remote URL or configure your client to use the remote SSE URL.
Connect Claude Desktop to your local MCP server
Open Claude Desktop and set up a local MCP proxy configuration so Claude talks to your local server over HTTP. Create or edit the Claude configuration file as shown.
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse"
]
}
}
}
Connect Claude Desktop to your remote MCP server
Update the Claude configuration to point to the remote Worker SSE URL once the deployment is live. Claude will then prompt you to log in and you will see the available tools.
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"https://worker-name.account-name.workers.dev/sse"
]
}
}
}
Debugging
If you run into issues, you can restart Claude or connect directly to your MCP server from the command line to verify the endpoint is reachable.
npx mcp-remote http://localhost:8787/sse
rm -rf ~/.mcp-auth
Available tools
MCP Inspector
A debugging and exploration tool to connect to the MCP server over SSE, view available tools, and perform mock login flows.
Claude Desktop
A client that can be configured to talk to an MCP server via the mcp-remote proxy, enabling prompt-driven tool calls from Claude.
wrangler
Cloudflare CLI used to deploy the MCP server and manage KV namespaces during deployment.
mcp-remote
CLI helper to route commands to the MCP server endpoint via SSE, used by local and remote configurations.