Get the FREE Ultimate OpenClaw Setup Guide →

mcp-proxy

An MCP proxy server that aggregates and serves multiple MCP resource servers through a single interface

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio adamwattis-mcp-proxy-server node /path/to/mcp-proxy-server/build/index.js \
  --env MCP_CONFIG_PATH="/absolute/path/to/your/config.json" \
  --env KEEP_SERVER_OPEN="1"

How to use

MCP Proxy serves as a central hub that connects to multiple MCP resource servers and exposes a unified interface for resources, tools, and prompts. Once running with a configured MCP_CONFIG_PATH, it will discover and manage all connected resource servers, route requests to the appropriate backend, and aggregate responses for clients. You can connect several resource servers, and the proxy will maintain consistent URI schemes and handle routing across them, allowing tools and prompts from different servers to be accessed through a single endpoint. Use cases include aggregating tooling across servers, combining resource endpoints, and enabling multi-server prompt and tool execution without clients needing to know the underlying backend topology. Tools, prompts, and resources are then available through the MCP proxy’s consolidated API surface.

To use it, start the proxy with a configured config.json that lists the resource servers to connect to. The proxy will manage the connections and route calls to the appropriate backend servers. When you call a tool or request a resource, the proxy will determine the best backend, forward the request, and aggregate responses if multiple servers contribute to a given capability. This enables workflows that draw on multiple servers in parallel or sequentially while presenting a single, coherent interface to clients.

How to install

Prerequisites:

  • Node.js (LTS) and npm installed on your system
  • Access to the network to install or fetch MCP servers as needed

Install and build:

  1. Clone or download the MCP proxy repository.
  2. Navigate to the project root.
  3. Install dependencies:
npm install

Build the server (if a build step is provided for your environment):

npm run build

Run the proxy:

  • Prepare a config.json describing the resource servers to connect to (see the example in the README).
  • Start the server, providing the path to your config:
MCP_CONFIG_PATH=./config.json node build/index.js

If you are developing, you can also run in watch or dev modes as described in the repository documentation:

npm run watch
# or
npm run dev

Additional notes

Tips and considerations:

  • MCP_CONFIG_PATH must point to a valid JSON config that lists all resource servers to connect to.
  • KEEP_SERVER_OPEN, when set to a truthy value (e.g., "1"), keeps the SSE connection open even if clients disconnect; useful for multi-client setups.
  • The proxy aggregates resources, tools, and prompts from connected servers. If a capability exists on multiple servers, the proxy will route or merge as defined by its routing logic.
  • Debugging: If you run into stdio-based communication issues, consider using the MCP Inspector tool (npm run inspector) to inspect protocol interactions and diagnostics.
  • Ensure network access to all configured resource servers and correct environment variables for authentication or API keys if required by the backend servers.
  • When updating the config, reload or restart the proxy so it picks up the new server list and routing rules.

Related MCP Servers

Sponsor this space

Reach thousands of developers