Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multi-MCP Orchestrator Agent

A multi-agent engineering & incident assistant powered by Deep Agents that orchestrates multiple Model Context Protocol (MCP) servers via specialized subagents.

Architecture

Instead of dumping dozens of tools from multiple MCP servers into a single LLM context window (causing tool selection confusion and high token consumption), the orchestrator delegates domain-specific tasks to isolated subagents:

                          ┌─────────────────────────────┐
                          │   Orchestrator Deep Agent   │
                          │      (Planning & Synthesis) │
                          └──────────────┬──────────────┘
                                         │
                 ┌───────────────────────┼───────────────────────┐
                 ▼                       ▼                       ▼
       ┌──────────────────┐    ┌──────────────────┐    ┌──────────────────┐
       │   GitHub Agent   │    │  Database Agent  │    │   Slack Agent    │
       │    (SubAgent)    │    │    (SubAgent)    │    │    (SubAgent)    │
       └─────────┬────────┘    └─────────┬────────┘    └─────────┬────────┘
                 │                       │                       │
                 ▼                       ▼                       ▼
       ┌──────────────────┐    ┌──────────────────┐    ┌──────────────────┐
       │   GitHub MCP     │    │   SQLite MCP     │    │    Slack MCP     │
       │     Server       │    │     Server       │    │     Server       │
       └──────────────────┘    └──────────────────┘    └──────────────────┘

Features

  • Multi-Server MCP Integration: Uses langchain-mcp-adapters to connect to multiple MCP servers concurrently (stdio or HTTP transports).
  • Clean Context Windows (mode="isolated"): Each subagent only receives the tools and instructions relevant to its domain, returning a synthesized summary to the parent orchestrator.
  • Cross-Domain Workflows: Solves composite tasks like: "Query recent critical incidents in SQLite, retrieve the related GitHub PR, and draft an incident debrief".

Prerequisites

  • Python 3.11+
  • uv package manager
  • Model API key (ANTHROPIC_API_KEY or OPENAI_API_KEY)

Setup

  1. Copy the environment file:

    cp .env.example .env

    Add your model provider API key (ANTHROPIC_API_KEY or OPENAI_API_KEY).

  2. Install dependencies with uv:

    uv sync

Running the Agent

Run the interactive CLI:

uv run python agent.py

Or pass a specific multi-step goal:

uv run python agent.py --query "Inspect the latest open bug in the repository, cross-reference it with the incident database, and prepare a summary report."

About

Orchestrating multiple MCP servers across domain-specialized subagents using DeepAgents

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages