ClaudeCodeMod

All shelves / MCP servers

MCP Local Router

kaichen/mcp-local-router · 19 stars · Rust

MCP server An MCP (Model Context Protocol) local router that serves as an aggregation proxy for MCP servers.

Install

The repo has no one-line install. Follow its README.

Open the repo

Files

README.md

MCP Local Router

This project is an MCP (Model Context Protocol) local router that serves as an aggregation proxy for MCP servers. It can connect to multiple upstream MCP servers and aggregate their functionalities into a single interface for downstream clients.

Features

  • Supports specifying a configuration file via command line arguments
  • Supports configuring multiple upstream MCP servers
  • Supports stdio transport
  • Supports injecting environment variables into stdio transport
  • Supports SSE transport with aggregated /sse and per-upstream /sse/{serverName} endpoints

Usage

Running

It must be run with a configuration file:

cargo run -- --config mcp-config.json --transport sse

SSE Routing

When the router runs with --transport sse, it exposes two kinds of endpoints:

  • /sse streams the aggregated tool surface area from every configured upstream server.
  • /sse/{serverName} streams only the tools from a single upstream. The {serverName} segment must match the key from mcpServers in your configuration file (for example /sse/filesystem or /sse/workspace-search).

The server name keys should be URL-safe because they are used directly as path segments.

Each SSE connection emits an initial endpoint event containing the HTTP path clients should use for POST requests. All streaming endpoints share the same POST /message?sessionId=… channel.

Configuration File Format

The configuration file is in JSON format; an example is shown below:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop"
      ],
      "env": {
        "LINEAR_ACCESS_TOKEN": "your_personal_access_token"
      }
    },
    "workspace-search": {
      "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 and the /sse/{serverName} path)
    • Each value is an object containing the following fields:
      • command: the command to execute
      • args: an array of command arguments
      • env: a mapping of environment variables to inject

Build and Installation

# Build the project
cargo build --release

# Run
cargo run --release -- --config mcp-config.json --transport stdio

Dependencies

  • Rust 2021 Edition
  • tokio async runtime
  • MCP-related libraries: rmcp

Facts

Kind
MCP server
Repo
kaichen/mcp-local-router
Group
Uncategorized
Stars
19
Language
Rust
Last push
2025-09-24
Forks
3

More on this shelf

  1. 1REAio.github.morluto/reaReverse engineer anything from your terminal or agent with one CLI and MCP server.125.3k
  2. 2com.browser-use/browser-usecom.browser-use/browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.117.7k
  3. 3World Monitorapp.worldmonitor/mcpLive markets, conflicts, country risk, chokepoints, energy, and China decision signals. 93 tools.88.3k
  4. 4Scrapling MCP Serverd4vinci/scrapling🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scraplingdev86.9k
  5. 5Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
  6. 6Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k