The MCP Router server provides service discovery and proxy operations for MCP (Model Control Protocol) services. It offers three core capabilities:
• Search for MCP Servers - Find registered servers using vector-based similarity search with the search_mcp_server
tool
• Register New MCP Servers - Add servers to the discovery service using add_mcp_server
, specifying name, description, endpoint, and available tools
• Execute Tools on Remote Servers - Proxy tool execution on any registered MCP server via exec_mcp_tool
by providing server name, tool name, and parameters
The server acts as a central discovery point and execution proxy, fully complying with the MCP protocol specification while abstracting direct interactions with remote MCP servers.
Provides service discovery and proxy capabilities using Alibaba Cloud's DashScope and DashVector services for vector-based similarity search and intelligent management of registered MCP services
MCP Router
MCP Router is a service discovery and proxy for MCP (Model Control Protocol) services. It allows you to register, discover, and execute tools on remote MCP servers.
Features
Service Discovery: Register and search for MCP services using vector-based similarity search
Tool Execution Proxy: Execute tools on remote MCP servers through the router
MCP Compliance: Fully compliant with the MCP protocol specification
Architecture
The MCP Router consists of two core modules:
MCP Data Plane: The frontend that interacts with MCP clients, providing service discovery, registration, and tool execution proxying
MCP Discovery Service: The backend that uses Alibaba Cloud's vector database and embedding models for intelligent search and management of registered MCP services
Prerequisites
Python 3.11 or higher
Access to Alibaba Cloud DashScope and DashVector services
API keys for DashScope and DashVector
Installation
Clone the repository:
git clone <repository-url> cd mcp-routerInstall dependencies using uv:
uv add pydantic httpx dashscope dashvector python-dotenvSet up environment variables in
.env
: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
Usage
Run the MCP Router server:
Tools
The MCP Router provides three tools:
search_mcp_server: Search for registered MCP servers based on a query
add_mcp_server: Register a new MCP server with the discovery service
exec_mcp_tool: Execute a tool on a target MCP server
Development
Code Structure
mcp_router.py
: Main MCP server implementation (Data Plane)discovery_service.py
: Discovery service implementation (Discovery Service)config.py
: Configuration management
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A service discovery and proxy for MCP servers that enables registration, discovery, and execution of tools on remote MCP servers. Uses vector-based similarity search through Alibaba Cloud services to intelligently route requests to appropriate MCP services.
Related MCP Servers
- -securityFlicense-qualityAn MCP server that integrates with SerpApi to retrieve search results from multiple search engines including Google, Bing, Yahoo, and others, enabling fast access to both live and archived search data.Last updated -15
- AsecurityFlicenseAqualityA server that provides access to Alibaba Cloud workitem descriptions through MCP protocol, allowing agents to retrieve structured workitem data including text, images, and HTML content by ID.Last updated -11
- -securityFlicense-qualityAn intelligent server that helps discover and research MCP servers using the Exa AI search engine, enabling users to find appropriate Model Context Protocol servers for specific requirements.Last updated -3
- AsecurityAlicenseAqualityAn MCP server that allows users to efficiently search and reference user-configured documents through document listing, grep searching, semantic searching with OpenAI Embeddings, and full document retrieval.Last updated -43MIT License