RM

rupinder2/mcp-orchestrator

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 3 forks 质量 69 趋势 14MIT

MCP Orchestration Gateway – aggregates tools from multiple MCP servers with BM25 search and deferred loading for Claude Desktop

概览

A central hub that connects to multiple downstream MCP servers, aggregates their tools, and provides unified access with powerful tool search capabilities. Built around — search across all your servers without blowing Claude's context window. - : Add downstream MCP servers via JSON config file - : Automatic server_name__tool_name format - : Unified BM25/regex search with deferred loading support - : Static saved headers or token forwarding - : stdio or HTTP - : Cached definitions, raw result passthrough - : In-memory (development) or Redis (production) This starts the server on http://localhost:8080/mcp with CORS enabled. Add downstream MCP servers in server_config.json: The orchestrator provides unified tool search (BM25 by default, regex optional): Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json): Search for tools using BM25 relevance ranking or regex pattern matching.

README

以下为原文 README 节选,完整内容请查看原文。

MCP Orchestrator

A central hub that connects to multiple downstream MCP servers, aggregates their tools, and provides unified access with powerful tool search capabilities.

Built around deferred tool loading — search across all your servers without blowing Claude’s context window.

Features

  • Config-based Server Registration: Add downstream MCP servers via JSON config file
  • Tool Namespacing: Automatic server_name__tool_name format
  • Tool Search: Unified BM25/regex search with deferred loading support
  • Flexible Authentication: Static saved headers or token forwarding
  • Multiple Transports: stdio or HTTP
  • Tool Definition Caching: Cached definitions, raw result passthrough
  • Storage Backends: In-memory (development) or Redis (production)

Quick Start

Installation

pip install mcp-orchestrator

Running the MCP Server

# Run as stdio MCP server (for Claude Desktop, Cursor, etc.)
mcp-orchestrator

# Or run with Python directly
python -m mcp_orchestrator.main

HTTP Transport:

ORCHESTRATOR_TRANSPORT=http ORCHESTRATOR_PORT=8080 python -m mcp_orchestrator.main

This starts the server on http://localhost:8080/mcp with CORS enabled.

Configuring Servers

Add downstream MCP servers in server_config.json:

{
  "servers": [
    {
      "name": "my-server",
      "url": "http://localhost:8080/mcp",
      "transport": "http",
      "auth_type": "static",
      "auth_headers": {
        "Authorization": "Bearer my-token"
      }
    },
    {
      "name": "my-stdio-server",
      "url": "server.py",
      "transport": "stdio",
      "command": "uv",
      "args": ["run", "python", "server.py"]
    }
  ]
}

Searching for Tools

The orchestrator provides unified tool search (BM25 by default, regex optional):

# BM25 search (default - natural language)
results = await mcp_client.call_tool("tool_search", {
    "query": "get weather information",
    "max_results": 3
})

# Regex search (set use_regex=true)
results = await mcp_client.call_tool("tool_search", {
    "query": "weather|forecast",
    "use_regex": true,
    "max_results": 3
})

Architecture

┌─────────────────────────────────────────────────────┐
│                  MCP Orchestrator                    │
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mcp-orchestrator": { "command": "mcp-orchestrator", "env": { "STORAGE_BACKEND": "memory", "ORCHESTRATOR_LOG_LEVEL": "INFO" } } } }