Master MCP Orchestrator

Master MCP Orchestrator

Centralized MCP server that intelligently routes user queries to appropriate MCP tools, aggregates responses from multiple servers, and supports both rule-based and AI-powered routing.

Category
Visit Server

README

Master MCP Orchestrator

A central MCP server that connects to multiple MCP servers and intelligently routes user queries to the appropriate MCP tools, then aggregates and returns responses.

πŸš€ Quick Start (Interactive CLI)

The easiest way to get started is with our interactive CLI:

python src/cli.py

The CLI will guide you through:

  • API key setup
  • MCP server discovery
  • MCP selection
  • Interactive query interface

See CLI_QUICKSTART.md for detailed instructions.

Features

  • πŸ”Œ Multi-MCP Connection: Connect to multiple MCP servers simultaneously
  • πŸ€– AI-Powered Routing: Uses LLM to intelligently route queries (default)
  • 🧠 Intelligent Routing: Analyzes queries to determine which MCP(s) to call
  • πŸ” Tool Discovery: Automatically discovers available tools from connected MCPs
  • πŸ“Š Response Aggregation: Combines responses from multiple MCPs when needed
  • ⚑ Async Execution: Parallel execution for faster responses
  • 🎯 Query Analysis: Understands query intent to route to correct MCPs
  • πŸ”„ Fallback Support: Automatically falls back to rule-based routing if AI fails

Architecture

User Query
    β”‚
    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Master MCP Server  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Query Analyzerβ”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚          β”‚          β”‚
β”‚          β–Ό          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ MCP Router    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚          β”‚          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
    β”‚             β”‚
    β–Ό             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ MCP #1  β”‚  β”‚ MCP #2  β”‚
β”‚ Router  β”‚  β”‚ Coding  β”‚
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
     β”‚            β”‚
     β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ Response β”‚
    β”‚ Aggregatorβ”‚
    β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
    User Response

Installation

cd master-mcp
pip install -r requirements.txt

AI Routing Setup (Optional)

The Master MCP works out-of-the-box without API keys using rule-based routing.

For enhanced AI-powered routing, set an API key:

# Option 1: OpenAI (default)
export OPENAI_API_KEY=your_key_here

# Option 2: Anthropic
export ANTHROPIC_API_KEY=your_key_here
export MASTER_MCP_AI_PROVIDER=anthropic
export MASTER_MCP_AI_MODEL=claude-3-5-haiku

Routing Modes:

Mode API Key Required Speed Intelligence
Rule-based (default) ❌ No ⚑ Fast Good
AI-powered βœ… Yes πŸ”„ +200ms Excellent

To disable AI routing even if API key is set:

export MASTER_MCP_USE_AI=false

Configuration

Create a config.json file to register MCP servers:

{
  "mcp_servers": {
    "mcp-router": {
      "command": "python3",
      "args": ["/path/to/mcp-router/src/mcp_server.py"],
      "env": {}
    },
    "mcp-coding-agent": {
      "command": "python3",
      "args": ["/path/to/mcp-coding-agent/src/main.py"],
      "env": {}
    }
  }
}

Usage

As MCP Server (Cursor Integration) - Recommended

The Master MCP is now integrated with Cursor! See CURSOR_SETUP.md for detailed instructions.

Quick Start:

  1. The Master MCP has been added to your ~/.cursor/mcp.json
  2. Restart Cursor
  3. Use it:
    @master-mcp query_mcp "What model should I use for debugging?"
    @master-mcp list_mcps
    

Benefits:

  • 🎯 Auto-discovers all your existing MCPs
  • πŸ€– Intelligent query routing (AI or rule-based)
  • πŸ“Š Aggregates responses from multiple MCPs
  • πŸ”Œ Works out-of-the-box (no API key required for rule-based routing)

Standalone MCP Server

Add to any MCP client's configuration:

{
  "version": "1.0",
  "mcpServers": {
    "master-mcp": {
      "command": "python3",
      "args": ["/path/to/master-mcp/src/master_mcp_server.py"],
      "env": {
        "MASTER_MCP_USE_AI": "true"
      }
    }
  }
}

CLI Usage

python src/master_mcp_server.py --query "What model should I use for debugging?"

How It Works

  1. Query Analysis: Analyzes user query to determine intent
  2. MCP Selection: Selects appropriate MCP(s) based on query
  3. Tool Selection: Chooses the right tool(s) from selected MCPs
  4. Execution: Calls MCP tools (in parallel when possible)
  5. Aggregation: Combines responses into a unified result
  6. Response: Returns formatted response to user

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured