Skip to main content
Glama

title: Delegation MCP emoji: ๐Ÿš€ colorFrom: blue colorTo: purple sdk: docker pinned: false license: mit short_description: Intelligent Multi-Agent Routing & Guidance tags:

  • mcp-server

  • building-mcp-track-enterprise

  • multi-agent

  • agent-orchestration


๐Ÿš€ Delegation MCP Server

Intelligent Multi-Agent Routing & Guidance

Tests License MCP Version Anthropic

Built for the MCP 1st Birthday Hackathon - Winter 2025

โšก Quick Start

# One command to install and configure everything
python install.py

That's it! Restart Claude Code and start delegating:

"scan this codebase for security vulnerabilities"
โ†’ MCP suggests: "Delegate to Gemini"
โ†’ Claude executes: gemini scan .

"design an authentication architecture"
โ†’ MCP suggests: "Handle directly (Claude is best)"
โ†’ Claude executes: (Internal reasoning)

"refactor the delegation engine"
โ†’ MCP suggests: "Delegate to Aider"
โ†’ Claude executes: aider --message "refactor delegation engine"

Features:

  • โœ… One-command installation - 30 seconds to full setup

  • โœ… Intelligent Routing - Rules + Capabilities analysis

  • โœ… Privacy-First - Your code never passes through this server

  • โœ… Lightweight - Minimal footprint, no heavy databases

  • โœ… Cross-platform - Windows, Mac, Linux


Related MCP server: ypollak2/llm-router

๐ŸŽฎ Try the Interactive Demo

Hugging Face Spaces

Experience the routing intelligence in action! Our HF Space demo lets you:

Interactive Features:

  • ๐Ÿงช Test Any Query - See routing decisions in real-time

  • ๐Ÿ“Š Routing Transparency - View the complete decision-making process:

    • Task classification (security, architecture, refactoring, etc.)

    • Complexity assessment (simple/medium/complex)

    • Detected keywords and routing reasoning

    • CLI command that would be executed

  • โš™๏ธ Live Configuration - Toggle agents and routing strategies to see how settings affect decisions

  • ๐Ÿ’ก Example Queries - Simple and complex multi-step scenarios

Try This:

  1. Visit the HF Space

  2. Enter: "Audit the authentication system for SQL injection, XSS, and CSRF vulnerabilities"

  3. Watch it route to Gemini with full reasoning

  4. Disable Gemini in settings โ†’ See it route to Claude instead!

Want to test with real agents? Duplicate the Space and add your API keys!


๐ŸŒŸ What Is This?

A lightweight MCP server that acts as a routing intelligence layer for AI coding agents. Instead of executing tasks itself (which creates a bottleneck and security risk), it analyzes your request and guides your main agent (like Claude Code) on which tool to use.

Key Insight: This follows the Routing Guidance pattern:

  1. Analyze: The server analyzes the prompt (e.g., "audit security").

  2. Route: It determines the best agent based on your presets and rules.

  3. Guide: It returns the exact command to run.

  4. Execute: The client (Claude) executes the command directly.

This ensures zero lock-in, maximum privacy, and native performance.


๐ŸŽฏ The Core Value Proposition

Problem

Developers manually switch between AI agents, losing context and productivity:

  • Claude for architecture

  • Gemini for security analysis

  • Aider for git operations

  • Copilot for GitHub integration

Solution

One MCP server that tells your agent who to call:

You โ†’ Claude Code โ†’ Delegation MCP โ†’ "Use Gemini for this" โ†’ Claude calls Gemini

You work with ONE agent, but get the power of ALL agents.


๐Ÿ“ฆ Installation

Prerequisites

  • Python 3.10+

  • At least one AI agent CLI installed:

# Clone repository
git clone https://github.com/carlosduplar/multi-agent-mcp.git
cd multi-agent-mcp

# One-command install
python install.py

# Or on Unix/Mac
bash install.sh

The installer will:

  1. Check system requirements

  2. Discover installed agents

  3. Configure Claude Code automatically

  4. Verify everything works

Restart Claude Code and you're ready!


๐ŸŽฏ How It Works

Intelligent Routing Guidance

We use a hybrid approach to determine the best agent for the job:

  1. Rule-Based Presets: Your configured rules take priority (e.g., "Always use Gemini for security").

  2. Capability Analysis: If no rule matches, we analyze agent capabilities to find the best fit.

Query: "scan for vulnerabilities"

  1. Check Rules: Matches security_audit preset? -> Gemini

  2. Guide: Return guidance to use Gemini

Example Interaction

User: "Audit my authentication code for SQL injection"

Claude Code calls get_routing_guidance:

{
  "query": "Audit auth.py for SQL injection"
}

MCP Server responds:

{
  "decision": "DELEGATE_TO: gemini",
  "agent": "gemini",
  "task_type": "security_audit",
  "cli_command": "gemini \"Audit auth.py for SQL injection\""
}

Claude Code then executes:

gemini "Audit auth.py for SQL injection"

๐Ÿ”ง MCP Tools

get_routing_guidance

Get routing guidance for a task. Returns which agent should handle it and the exact CLI command to run.

{
  "query": "Audit auth.py for SQL injection"
}

discover_agents

Automatically discover available CLI agents on the system and register them.

{
  "force_refresh": false  # Optional: force re-discovery
}

list_agents

List all registered agents and their availability status.

โšก Token Overhead

One of the key advantages of this MCP server is its minimal context footprint. Here's the actual token usage:

MCP Tools:
โ”œโ”€ get_routing_guidance: 601 tokens
โ”œโ”€ discover_agents:      584 tokens
โ””โ”€ list_agents:          554 tokens
                         โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Total MCP overhead:      1,739 tokens (0.9% of 200k context)

What this means:

  • โœ… Less than 1% of your context budget

  • โœ… Leaves 99%+ for actual code and conversation

  • โœ… No heavy prompts or bloated instructions

  • โœ… Intelligent routing without sacrificing context

Compare this to running multiple agent instances or complex orchestration frameworks that can consume 10-20% of your context just for coordination overhead.


๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Claude Code (or other MCP client)      โ”‚
โ”‚  - User chats here                      โ”‚
โ”‚  - Calls get_routing_guidance           โ”‚
โ”‚  - EXECUTES the returned command        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚ MCP Protocol (stdio)
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Delegation MCP Server                   โ”‚
โ”‚  - Analyzes task complexity & type       โ”‚
โ”‚  - Checks rules & capabilities           โ”‚
โ”‚  - Returns guidance (NO EXECUTION)       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

v0.4.0 - Lightweight Architecture

Privacy & Security:

  • No Code Execution: The server never executes code or commands. It only suggests them.

  • No Data Persistence: No databases or logs of your code are kept by the server.

  • Direct Connection: Your agent talks directly to the delegated tool (e.g., Claude -> Gemini).

Agent Auto-Discovery:

  • Automatically detects installed CLI agents (Claude, Gemini, Aider, etc.)

  • Verifies agent availability

  • Graceful error handling


๐Ÿ—‚๏ธ Project Structure

multi-agent-mcp/
โ”œโ”€โ”€ src/delegation_mcp/
โ”‚   โ”œโ”€โ”€ server.py              # MCP server (Routing Guidance) โญ
โ”‚   โ”œโ”€โ”€ delegation.py          # Routing logic & scoring
โ”‚   โ”œโ”€โ”€ orchestrator.py        # Agent registry
โ”‚   โ”œโ”€โ”€ agent_discovery.py     # System scanner for agents
โ”‚   โ”œโ”€โ”€ tool_discovery.py      # Tool definitions
โ”‚   โ”œโ”€โ”€ config.py              # Configuration handling
โ”‚   โ”œโ”€โ”€ cli.py                 # CLI tools
โ”‚   โ””โ”€โ”€ adapters/              # Agent definitions
โ”‚       โ”œโ”€โ”€ claude.py
โ”‚       โ”œโ”€โ”€ gemini.py
โ”‚       โ”œโ”€โ”€ copilot.py
โ”‚       โ””โ”€โ”€ aider.py
โ”œโ”€โ”€ tools/                     # Tool definitions (JSON)
โ”œโ”€โ”€ tests/                     # Comprehensive tests
โ””โ”€โ”€ config/                    # Default delegation rules

๐Ÿš€ Roadmap

โœ… Phase 1: Foundation (COMPLETE)

  • MCP server with routing guidance

  • Capability-based routing

  • Agent auto-discovery

  • Production-grade architecture

๐Ÿ”œ Phase 2: Intelligence (Q1 2026)

  • ML-powered routing

  • Learning from user feedback

  • Custom agent definitions

๐Ÿ”ฎ Phase 3: Collaboration (Q2 2026)

  • Complex multi-step workflows

  • Parallel agent execution guidance


๐Ÿค Contributing

We welcome contributions! Add new agent adapters, improve routing logic, or enhance documentation.


๐Ÿ“„ License

MIT License - see LICENSE


๐ŸŽฏ The Vision

"You work with ONE agent, but get the power of ALL agents."

Today's AI landscape has amazing specialists, but they work in silos. Delegation MCP changes that. It's the intelligence layer that lets agents collaborate, creating something greater than the sum of its parts.


Built with โค๏ธ for the MCP ecosystem

Available Tools

3 tools
discover_agentsC

Discover and register available CLI agents on the system

ParametersJSON Schema
NameRequiredDescriptionDefault
force_refreshNoForce re-discovery even if cache exists

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'discover and register' which implies a write operation (registration), but doesn't clarify permissions, side effects, or what 'register' entails (e.g., updating a cache, adding to a database). This is a significant gap for a tool that appears to modify system state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part earns its place, making it highly concise and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's apparent complexity (involving discovery and registration of CLI agents), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'register' means, what the output looks like, or how it interacts with system state, leaving critical gaps for an agent to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'force_refresh' well-documented in the schema. The description doesn't add any parameter-specific details beyond what the schema provides, so it meets the baseline of 3 for adequate coverage without extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('discover and register') and resource ('available CLI agents on the system'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'list_agents', which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'list_agents' or 'get_routing_guidance'. There's no mention of prerequisites, typical use cases, or exclusions, leaving the agent with little context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_routing_guidanceB

Get routing guidance for a task - returns which agent should handle it and the exact CLI command to run (guidance only, no execution)

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe task query to get routing guidance for

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns guidance without execution, which is helpful. However, it doesn't address important behavioral aspects like whether this requires authentication, has rate limits, what happens with invalid queries, or the format/structure of the guidance returned. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise and well-structured in a single sentence that clearly communicates the core functionality ('Get routing guidance for a task'), specifies the outputs ('returns which agent should handle it and the exact CLI command to run'), and adds crucial behavioral context ('guidance only, no execution'). Every word earns its place with zero redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no annotations and no output schema, the description provides adequate basic information about what the tool does but lacks completeness. It doesn't describe the format of the guidance returned, error conditions, or operational constraints. For a tool that presumably returns structured routing decisions, more context about the output would be helpful, though the description meets minimum viable standards.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with the single parameter 'query' well-documented in the schema as 'The task query to get routing guidance for'. The description adds no additional parameter information beyond what the schema provides. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't enhance parameter understanding but doesn't need to compensate for schema gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get routing guidance for a task' with specific outputs ('which agent should handle it and the exact CLI command to run'). It distinguishes from potential siblings by specifying this is 'guidance only, no execution'. However, it doesn't explicitly differentiate from 'discover_agents' or 'list_agents' which likely list agents rather than provide routing decisions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by stating it provides 'guidance only, no execution', suggesting this tool should be used when you need routing advice rather than actual task execution. However, it doesn't explicitly state when to use this versus the sibling tools 'discover_agents' or 'list_agents', nor does it provide any exclusion criteria or prerequisites for use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_agentsB

List all registered agents and their availability status

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists agents and availability status but doesn't cover critical aspects like whether this is a read-only operation, potential rate limits, authentication requirements, or what the output format looks like. This leaves significant gaps for a tool that presumably interacts with agent data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is front-loaded and appropriately sized for a simple tool, earning a perfect score for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'availability status' entails, how the list is formatted, or any behavioral traits like safety or performance. For a tool that likely returns structured data about agents, more context is needed to guide the agent effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so there are no parameters to document. The description appropriately doesn't mention any parameters, which aligns with the schema. A baseline of 4 is applied since no parameters exist, and the description doesn't add unnecessary information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all registered agents and their availability status'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'discover_agents' or 'get_routing_guidance', which prevents a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'discover_agents' or 'get_routing_guidance'. It lacks any context about prerequisites, timing, or exclusions, leaving the agent with minimal usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.0
    • First observeddiscover_agents
    • First observedget_routing_guidance
    • First observedlist_agents

TDQS

C2.9/5.0
Disambiguation3/5

The tools have overlapping purposes that could cause confusion. 'discover_agents' and 'list_agents' both deal with agent listing/registration, with unclear boundaries between discovery vs. listing. 'get_routing_guidance' is distinct but the agent-focused tools have significant overlap in their described functionality.

Naming Consistency4/5

Tool names follow a consistent verb_noun pattern throughout (discover_agents, get_routing_guidance, list_agents). The naming is predictable and readable, with only minor deviation in 'get_routing_guidance' using 'guidance' instead of a simpler noun.

Tool Count2/5

With only 3 tools, this server feels under-scoped for a delegation/routing system. The domain suggests needs for agent management, task execution, and status monitoring, but the current set provides limited operational coverage. A delegation system typically requires more comprehensive tooling.

Completeness2/5

Significant gaps exist for a delegation system. There's no way to execute tasks, manage agent capabilities, update agent status, or handle task lifecycle (create, monitor, cancel). The surface provides discovery and guidance but lacks execution and management capabilities, creating dead ends for agents.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Intelligent routing service that selects optimal AI models based on capability requirements and normalizes input/output formats across multiple providers like OpenAI, Anthropic, Google, and others.
    -
  • A
    license
    A
    quality
    A
    maintenance
    Routes your AI tasks to the best available model across 20+ providers โ€” automatically selecting based on task type, budget, and subscription pressure. Supports text, image, video, and audio with built-in cost optimization and fallback chains.
    60
    77
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/carlosduplar/multi-agent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server