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:
- Install dependencies using uv:
- Set up environment variables in
.env
:
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
Running Tests
Code Structure
mcp_router.py
: Main MCP server implementation (Data Plane)discovery_service.py
: Discovery service implementation (Discovery Service)config.py
: Configuration managementtest_mcp_router.py
: Unit tests
License
MIT
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 -11Python
- 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 -11Python
- -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 -3Python
- 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 -43PythonMIT License