Get the FREE Ultimate OpenClaw Setup Guide →

mcp -router

mcprouter for remote mcp servers

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio chatmcp-mcp-server-router npx -y mcprouter \
  --env SERVER_KEY="xxx"

How to use

This MCP server acts as a proxy to remote MCP servers. Specifically, mcprouter connects to a remote MCP endpoint using a server key, and exposes a local MCP server interface that clients can connect to in order to route requests to the remote server. In the Quick Start example, you configure a server entry named fetch that runs the mcprouter package via npx, supplying your SERVER_KEY for authentication. Once running, clients (like Claude Desktop) configure their MCP client to point at this local proxy, which then handles the communication with the remote MCP server and forwards messages accordingly. The tooling highlights include the MCP Inspector for debugging and the ability to run in development mode with auto-rebuild, which helps test routing behavior before going to production.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Internet access to fetch npm packages

Step-by-step:

  1. Install dependencies for the project: npm install
  2. Build the server (produces a runnable build in the build directory): npm run build
  3. (Optional) Enable auto-rebuild during development: npm run watch
  4. Run or integrate into your environment as shown in the Quick Start, using an MCP client to point at the configured proxy (e.g., Claude Desktop).

Notes:

  • Ensure you have a valid SERVER_KEY from MCP.so and configure it in the mcpServers entry.
  • If testing locally, you can use npx mcprouter to run the proxy without a global install.

Additional notes

Tips and caveats:

  • Debugging MCP servers uses stdio; if you encounter issues, consider using the MCP Inspector tool (npm run inspector) to observe traffic and debugging endpoints.
  • Keep your SERVER_KEY secure; rotate keys if necessary and update your client configuration accordingly.
  • On macOS and Windows, ensure the client configuration file paths in the Installation section are accessible and correctly formatted for your environment.
  • If your environment blocks network access for npm or npx, you may need to preinstall mcprouter locally and reference the local build path in the command configuration.

Related MCP Servers

Sponsor this space

Reach thousands of developers