MCP Meta-Router

Route tasks to external MCP servers with unified tool discovery, capability inference, and a normalized registry. Connect to browser-mcp, paaf, research-agent, and more.

226 Tests Passing 5 Modules MCP Protocol

5-Module Architecture

p03-1 MCP Client

Connect to MCP servers via stdio transport. Handle JSON-RPC messages, sessions, and reconnection.

74 tests | Transport Layer

p03-2 MCP Discovery

Discover available servers and tools. Auto-detect capabilities from tool names and descriptions.

40 tests | Discovery Engine

p03-3 MCP Registry

Unified tool registry with capability mapping, tool normalization, and search.

62 tests | Tool Registry

p03-4 MCP Router

Main router with tool selection, execution, and fallback handling.

Meta-Router Core

p03-5 MCP Config

Configuration schemas for server definitions, transport settings, and validation.

50 tests | Config Schemas

Supported MCP Servers

Route to any MCP-compatible server. Here are some examples:

browser-mcp
Browser automation, screenshots
paaf
Project audit, documentation
research-agent
Research, synthesis, reports
smart-inventory
CLAUDE.md generation
next-conductor
NEXT.md task tracking
filesystem
File read/write operations

Request Flow

Task
Discovery
Registry
Router
MCP Client
Server

Tasks are matched to tools via capabilities, then routed to the appropriate MCP server.

Key Features

Auto-Discovery

Automatically discover tools from configured MCP servers at startup.

Capability Inference

Infer capabilities from tool names and descriptions using pattern matching.

Tool Normalization

Normalize tools from different servers into a unified format.

Stdio Transport

Communicate with MCP servers via standard input/output (JSON-RPC).

Session Management

Maintain persistent sessions with automatic reconnection.

Unified Registry

Search, filter, and select tools across all connected servers.

Quick Example

from mcp_router import MCPRouter
from mcp_config import load_mcp_config

# Load server configurations from .mcp.json
config = load_mcp_config(".mcp.json")

# Initialize router with auto-discovery
router = MCPRouter(config)
await router.discover_all()

# Find tools by capability
tools = router.find_tools(capability="browser")
print(tools)  # [browser_navigate, browser_screenshot, ...]

# Execute a tool
response = await router.execute(
    tool="browser_navigate",
    input_data={"url": "https://example.com"},
)
print(response.server)  # browser-mcp