Aggregates multiple MCP servers into a single proxy, routing requests and initializing tools across backends.
Configuration
View docs{
"mcpServers": {
"itstanner5216-multi-mcp": {
"url": "http://127.0.0.1:9080/sse",
"headers": {
"BRAVE_API_KEY": "YOUR_API_KEY",
"MULTI_MCP_API_KEY": "YOUR_SECRET_KEY",
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_TOKEN"
}
}
}
}Multi MCP is a flexible proxy that aggregates and routes between multiple MCP servers, enabling you to operate as a single MCP endpoint while connecting to backends over STDIO or SSE. It automatically initializes capabilities from connected servers and supports dynamic runtime management of MCP backends to suit your tooling and collaboration needs.
You connect to the proxy using an MCP-compatible client, then choose either STDIO or SSE transport depending on your environment. In STDIO mode, you pipe data to and from the proxy for CLI-style tool chaining. In SSE mode, you expose an HTTP SSE endpoint so remote agents and browser-based tools can access the connected MCP servers through the proxy. The proxy automatically namespaces tools from different servers to avoid conflicts and exposes a single access point for all connected backends.
Prerequisites: ensure you have Python and the tooling used by the project available on your system. You will clone the project, install dependencies, and prepare the environment before running the proxy.
# Clone the repository
git clone https://github.com/kfirtoledo/multi-mcp.git
cd multi-mcp
# Install using uv (recommended)
uv venv
uv pip install -r requirements.txtChoose the mode that fits your workflow. STDIO is ideal for local, CLI-style tool chaining. SSE is suitable for remote access and browser-based interactions.
# STDIO mode
uv run main.py --transport stdio
# SSE mode
uv run main.py --transport sseFor production deployments that connect to external MCP servers, set your environment variables and start the production workflow using the provided startup script.
# Set required environment variables
export GITHUB_PERSONAL_ACCESS_TOKEN="your-token-here"
export BRAVE_API_KEY="your-api-key-here"
export MULTI_MCP_API_KEY="your-secret-key" # Optional, for authentication
# Run the startup script
./start-server.shThe proxy can initialize from a local JSON config or connect to remote MCP servers via SSE. A local setup defines which MCP-compatible servers to spawn at startup, while a remote setup uses an SSE URL for each backend.
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["./tools/get_weather.py"]
},
"calculator": {
"command": "python",
"args": ["./tools/calculator.py"]
}
}
}
```
This config initializes two MCP servers at startup. Tool names are namespaced internally as `server_name::tool_name` to avoid conflicts; for example, a server named `calculator` exposing an `add` tool would be referenced as `calculator::add`.When running in SSE mode, you can add, remove, or list MCP servers at runtime through HTTP endpoints.
GET /mcp_servers # List active MCP servers
POST /mcp_servers # Add a new MCP server
DELETE /mcp_servers/{name} # Remove an MCP server by name
GET /mcp_tools # List all tools and their sourcesYou can post a JSON payload to add a new MCP server while the proxy is running.
curl -X POST http://localhost:8080/mcp_servers \
-H "Content-Type: application/json" \
--data @add_server.json
```
add_server.json
```json
{
"mcpServers": {
"unit_converter": {
"command": "python",
"args": ["./tools/unit_converter.py"]
}
}
}Tools from different MCP servers are exposed with a namespace to prevent collisions. For example, a weather server exposing a get_weather tool would be referenced as weather::get_weather.
Containerize and run the SSE server in Kubernetes or locally with Docker. Build the image and run it with port exposure to access the SSE endpoint.
# Build the image
make docker-build
# Run locally with port exposure
make docker-runDeploy the proxy in a Kubernetes cluster using the provided manifests. The default manifest exposes the SSE server via a NodePort for external access.
kind create cluster --name multi-mcp-test
kind load docker-image multi-mcp --name multi-mcp-test
kubectl apply -f k8s/multi-mcp.yaml
# Access the SSE endpoint from outside the cluster
http://<kind-node-ip>:30080/sseOnce the proxy is running, connect with any MCP-compatible client. You can integrate with tooling ecosystems that support MCP, such as LangGraph, to access tools from multiple backend MCP servers.
Example integrations can be built with adapters that connect to the proxy’s SSE endpoint and expose the combined tool surface to your language models or agents.
Prepare an environment for client usage by ensuring you have an MCP-compatible client and an environment file containing necessary credentials. A sample environment setup may include model configuration and API keys for your tooling.
Fetches current weather data using the weather MCP server tool
Performs arithmetic calculations via the calculator MCP server tool
Converts units using the unit_converter MCP server tool