MCP Local Router
An MCP (Model Context Protocol) local router that serves as an aggregation proxy for MCP servers.
Overview
MCP Local Router is a local router that serves as an aggregation proxy for Model Context Protocol (MCP) servers, allowing multiple upstream MCP servers to be connected and their functionalities aggregated into a single interface for downstream clients.
To use MCP Local Router, you need to run it with a configuration file that specifies the upstream MCP servers and their configurations. The command to run it is: bash cargo run -- --config mcp-config.json
- Supports specifying a configuration file via command line arguments. - Configures multiple upstream MCP servers. - Supports stdio transport for communication. - Allows injecting environment variables into stdio transport.
- Aggregating functionalities from multiple MCP servers into a single interface.
- Simplifying the management of multiple upstream servers for downstream clients.
- Facilitating the development of applications that rely on multiple MCP services.
Add to your AI client
Use these steps to connect MCP Local Router in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-local-router-kaichen": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-local-router-kaichen"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-local-router-kaichen": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-local-router-kaichen"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-local-router-kaichen": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-local-router-kaichen"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-local-router-kaichen": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-local-router-kaichen"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-local-router-kaichen": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-local-router-kaichen"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-local-router-kaichen": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-local-router-kaichen"
]
}
}
}FAQ
What is the configuration file format?
The configuration file is in JSON format and specifies the upstream MCP servers and their respective commands and arguments.
What dependencies are required to run MCP Local Router?
It requires Rust 2021 Edition, tokio async runtime, and various MCP-related libraries.
How can I build and install MCP Local Router?
You can build it using the command `cargo build --release` and run it with the specified configuration file.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3292,"uuid":"d28c0bac-939d-4bf8-be04-66f463f1be1d","name":"mcp-local-router","title":"MCP Local Router","description":"An MCP (Model Context Protocol) local router that serves as an aggregation proxy for MCP servers.","avatar_url":"https://avatars.githubusercontent.com/u/4048?v=4","created_at":"2025-03-18T15:09:47.659Z","updated_at":"2025-03-18T15:11:12.713Z","status":"created","author_name":"kaichen","author_avatar_url":"https://avatars.githubusercontent.com/u/4048?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/kaichen/mcp-local-router","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"7\",\"license\":\"\",\"language\":\"Rust\",\"is_official\":false,\"latest_commit_time\":\"2025-05-02 23:17:18\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]