- Home
- MCP servers
- Remote MCP Server MCP
Remote MCP Server MCP
- 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.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"peteknowsai-remote-mcp-server": {
"command": "npx",
"args": [
"nx",
"dev",
"remote-mcp-server"
]
}
}
}You can run a remote MCP server on Cloudflare Workers and connect it to MCP clients like the MCP Inspector and Claude Desktop. This guide walks you through developing locally, testing with the inspector, wiring Claude Desktop, deploying to Cloudflare, and debugging common issues.
How to use
Use the MCP server to expose your machine-controlled prompts and tooling to MCP clients. You can develop locally, test with the MCP Inspector, and then connect Claude Desktop or other MCP clients to either your local server or a deployed remote server.
How to install
Prerequisites: Node.js and npm. You will also need Git to clone the repository if you start from the provided source.
Clone the repository and install dependencies, then run the development server locally.
# 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 sections
Deploying to Cloudflare and connecting from remote MCP clients are supported. Use the command sequence shown to create a KV namespace for OAuth, deploy, and then connect using the remote MCP client configuration.
How to use the MCP Inspector with your server
To explore your new MCP api, start the MCP Inspector, switch the Transport Type to SSE, and enter the URL to connect to your MCP server. You will encounter a mock login screen; enter any email and password to proceed. Once logged in, you can list and call defined tools.
Connect Claude Desktop to your local MCP server
Configure Claude Desktop to talk to your local MCP server by setting up the MCP server in Claude’s config. Use the following configuration to proxy requests to your local server.
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/sse"
]
}
}
}
Deploy to Cloudflare
Prepare a Cloudflare KV namespace for OAuth, then deploy the MCP server so it can be reached via a workers.dev URL.
npx wrangler kv namespace create OAUTH_KV
Follow the guidance to add the kv namespace ID to wrangler.jsonc, then run the deployment.
## Call your newly deployed remote MCP server from a remote MCP client
Install and run the MCP Inspector, then point it to your Worker URL ending with /sse to connect remotely.
npx @modelcontextprotocol/inspector@latest
Then enter the workers.dev URL (for example, worker-name.account-name.workers.dev/sse) as the MCP server URL to connect to.
Connect Claude Desktop to your remote MCP server
Update Claude’s configuration to point to your remote MCP server URL and restart Claude to connect to the deployed server.
{
"mcpServers": {
"math": {
"command": "npx",
"args": [
"mcp-remote",
"https://worker-name.account-name.workers.dev/sse"
]
}
}
}
Debugging
If something goes wrong, you can restart Claude or try connecting directly to your MCP server from the command line to verify the server is reachable.
npx mcp-remote http://localhost:8787/sse
In some cases you may need to clear local authentication data.
## Available tools
### MCP Inspector
A debugging tool to connect to an MCP server using SSE, inspect available tools, and call them from the inspector UI.
### Claude Desktop integration
Integration flow to connect Claude Desktop to a local or remote MCP server via a configured MCP server entry.
### Cloudflare deployment flow
Steps to create the OAuth KV namespace and deploy the MCP server to a Cloudflare Worker for remote access.