The MCP Local Router is a powerful aggregation proxy designed to connect multiple upstream MCP (Model Context Protocol) servers and consolidate their functionalities into a single interface for downstream clients. This tool simplifies the management of multiple MCP servers, making it an essential component for developers working with distributed systems.
To run the MCP Local Router, you must provide a configuration file:
cargo run -- --config mcp-config.json
The configuration file is in JSON format. Below is an example:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop"
],
"env": {
"LINEAR_ACCESS_TOKEN": "your_personal_access_token"
}
},
"everything": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-everything"
],
"env": {}
}
}
}
Description:
- mcpServers: A mapping of multiple server configurations.
- Each key is the server's name (used for logging).
- Each value is an object containing:
- command: The command to execute.
- args: An array of command arguments.
- env: A mapping of environment variables to inject.
To build and install the MCP Local Router, follow these steps:
# Build the project
cargo build --release
# Run the router
cargo run --release -- --config mcp-config.json
The MCP Local Router is an essential tool for developers looking to aggregate multiple MCP servers into a single, manageable interface. It is designed to simplify the complexities of working with distributed systems, providing a streamlined and efficient solution.
No releases published
No packages published