- Home
- MCP servers
- MCP Router
MCP Router
- python
1
GitHub Stars
python
Language
5 months ago
First Indexed
2 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": {
"ai-castle-labs-mcp-router": {
"command": "python3",
"args": [
"/path/to/mcp-router/src/mcp_server.py"
],
"env": {
"ENV": "{}"
}
}
}
}You use the MCP Router to automatically select the best machine learning model for each task inside the Cursor IDE. It analyzes your query, weighs strategy and cost, and routes execution to the most suitable model, all without you managing keys or separate API calls.
How to use
You interact with the MCP Router through the Cursor agent tools. When you have a task, describe it clearly and ask for a model recommendation. You can then execute or compare suggested models, or request a list of all available models. Use strategy presets to prioritize quality, speed, cost, or a balanced approach. You can also inspect routing statistics to understand past decisions.
How to install
Prerequisites: ensure Python is installed on your system.
Step 1: Clone the MCP Router repository.
Step 2: Change into the project directory.
Step 3: Install dependencies.
git clone https://github.com/AI-Castle-Labs/mcp-router.git
cd mcp-router
pip install -r requirements.txt
pip install mcp # MCP SDK for Cursor integration
Step 4: Configure Cursor to use the MCP Router as a local, stdio-based server.
{
"version": "1.0",
"mcpServers": {
"mcp_router": {
"command": "python3",
"args": ["/path/to/mcp-router/src/mcp_server.py"],
"env": {}
}
}
}
Step 5: Place the Cursor configuration in your home directory to point Cursor at the MCP Router. You will add the above mcp_router server entry to your Cursor configuration file.
Step 6: Restart Cursor to load the new MCP Router integration. You will see the MCP Router appear as an agent tool in your Cursor environment.
Additional notes
Only the local stdio configuration is provided here since there is no remote MCP URL shown. The MCP Router runs as a local Python process and does not require external API keys. All model routing decisions occur inside the Router and Cursor handles the integration.
Available tools
route_query
Route a query and get model recommendation without executing the task.
get_model_recommendation
Get a single model recommendation for a given task description.
list_models
List all registered MCP models available for routing.
get_routing_stats
Retrieve usage statistics and historical routing decisions.
analyze_query
Analyze query characteristics such as task type, complexity, and requirements.