MCP Router

一个 MCP-Router Demo
  • python

0

GitHub Stars

python

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "maverick-ljxuan-mcp-router": {
      "command": "uv",
      "args": [
        "run",
        "python",
        "mcp_router.py"
      ],
      "env": {
        "COLLECTION_NAME": "mcp_services_collection",
        "DASHSCOPE_API_KEY": "YOUR_DASHSCOPE_API_KEY",
        "DASHVECTOR_API_KEY": "YOUR_DASHVECTOR_API_KEY",
        "DASHVECTOR_ENDPOINT": "YOUR_DASHVECTOR_ENDPOINT",
        "EMBEDDING_DIMENSION": "1024"
      }
    }
  }
}

MCP Router is a service discovery and proxy for MCP services. It lets you register, discover, and run tools on remote MCP servers through a central router, enabling streamlined tooling and integration across MCP deployments.

How to use

You interact with the MCP Router through an MCP client to register MCP servers, search for services, and execute tools on remote MCP endpoints. Start by ensuring the router is running, then use the available tools to add servers, search for them using semantic queries, and trigger tools on selected MCP servers. The router handles discovery, registration, and proxying tool executions, keeping MCP interactions centralized and consistent.

How to install

Prerequisites: You need Python 3.11 or higher and access to Alibaba Cloud DashScope and DashVector services with API keys.

Install and configure the router locally with these steps:

How to install

Step 1: Clone the repository and move into the project directory.

git clone <repository-url>
cd mcp-router

Step 2: Install dependencies using the project’s package manager.

uv add pydantic httpx dashscope dashvector python-dotenv

Step 3: Set up environment variables in a local file for the discovery services and routing configuration.

DASHSCOPE_API_KEY=YOUR_DASHSCOPE_API_KEY
DASHVECTOR_API_KEY=YOUR_DASHVECTOR_API_KEY
DASHVECTOR_ENDPOINT=YOUR_DASHVECTOR_ENDPOINT
COLLECTION_NAME=mcp_services_collection
EMBEDDING_DIMENSION=1024

Step 4: Run the MCP Router server to start handling MCP client requests.

uv run python mcp_router.py

Available tools

search_mcp_server

Search for registered MCP servers based on a query using semantic similarity and vector search.

add_mcp_server

Register a new MCP server with the discovery service so it becomes available to clients.

exec_mcp_tool

Execute a tool on a target MCP server via the router, facilitating remote tooling.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational