Skip to main content
Glama

mcp-agent-mesh

Ein Mesh-Gateway für MCP — ermöglicht einem MCP-Client, N MCP-Server mit präfixbasiertem Routing, Health-Checks, Circuit-Breaker-Failover und einem einheitlichen Endpunkt über sowohl stdio als auch Streamable HTTP zu erreichen.

Was es tut

mcp-agent-mesh aggregiert mehrere Upstream-MCP-Server hinter einem einzigen logischen MCP-Server. Jedes Upstream-Tool wird unter einem server_name.tool_name-Präfix bereitgestellt, sodass ein Client, der sich mit dem Mesh verbindet, eine einzige tools/list mit den Tools aller gesunden Upstreams sieht.

Wenn ein Tool-Aufruf fehlschlägt und der Circuit Breaker des Servers auslöst, wechselt das Mesh automatisch zu konfigurierten Replikat-Servern über, bevor ein Fehler an den Client zurückgegeben wird.

Related MCP server: mcp-0ne

Features

Feature

Beschreibung

Aggregation

tools/list führt die Tools aller Upstream-Server zu einer flachen Liste zusammen

Präfix-Routing

Rufe math.add auf und das Mesh leitet an den math-Server weiter

Circuit Breaker

Circuit Breaker pro Server mit konfigurierbarer Schwelle & Timeout

Health-Polling

Hintergrund-Ping-Schleife erkennt Upstream-Ausfälle frühzeitig

Failover

Konfigurierbare Failover-Gruppen lassen Aliase für einen ausfallenden Server einspringen

Doppelter Transport

Läuft als stdio-MCP-Server und als Streamable-HTTP-Server

Timeouts + Wiederholungen

Jeder Upstream-Aufruf ist in asyncio.wait_for gekapselt

Architektur

                     ┌─────────────────────┐
  MCP client ───────►│   MeshGateway       │
                     │   (stdio / HTTP)    │
                     └────────┬───────────┘
                              │ tools/list
                              │ tools/call
                    ┌─────────┼─────────────┐
                    ▼         ▼             ▼
               ┌────────┐ ┌─────────┐ ┌─────────┐
               │ Server │ │ Server  │ │ Server  │
               │  "A"   │ │  "B"   │ │  "C"   │   (upstream MCP servers)
               └────────┘ └─────────┘ └─────────┘

Module

Module

Verantwortung

config.py

YAML-Konfigurationsparsing — ServerConfig, MeshConfig

health.py

CircuitBreaker pro Server + ServerHealthMonitor (Hintergrund-Ping)

router.py

Präfix-Routing (server.tool), Failover-Gruppenauflösung, Tool-Registry

gateway.py

MeshGateway — verbindet sich mit Upstreams, aggregiert Tool-Listen, leitet Aufrufe weiter, stellt MCP über stdio + HTTP bereit

Installation

pip install -e ".[dev]"

Verwendung

CLI (stdio-Modus)

mcp-agent-mesh --config examples/mesh.yaml --transport stdio

HTTP-Modus

mcp-agent-mesh --config examples/mesh.yaml --transport http --host 0.0.0.0 --port 8000

Als Client-Konfiguration (Claude Code / Codex / OpenCode)

{
  "mcpServers": {
    "mesh": {
      "command": "mcp-agent-mesh",
      "args": ["--config", "/path/to/mesh.yaml", "--transport", "stdio"]
    }
  }
}
{
  "mcpServers": {
    "mesh": {
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

Konfiguration

Siehe examples/mesh.yaml für ein vollständiges Beispiel. Wichtige Felder:

servers:
  - name: math            # tool-name prefix
    transport: stdio       # "stdio" or "http"
    command: python        # stdio: how to spawn
    args: ["-m", "..."]
    url: http://...        # http: endpoint URL
    timeout: 30.0
    circuit_breaker_threshold: 3
    circuit_breaker_timeout: 300.0

failover_groups:
  math: [math_backup]      # failover aliases for the "math" server

Testen

pytest tests/ -v

Die Testsuite verwendet In-Memory-Fake-MCP-Server (keine echten Subprozesse erforderlich) und deckt Konfigurationsparsing, Circuit-Breaker-Logik, Präfix-Routing, Tool-Aggregation, Failover und End-to-End-Gateway-Verhalten ab.

Lizenz

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A standalone MCP gateway that multiplexes multiple backend MCP servers behind a single endpoint, supporting both HTTP and stdio transports. It allows users to dynamically manage backends at runtime and organizes tools using a configurable namespace prefix.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP Gateway that aggregates multiple upstream MCP servers into a single endpoint with persistent connections, tool registry, and authentication.
    45
    2
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    A universal MCP gateway that aggregates multiple MCP servers into a single endpoint, providing features like hot-reload, auto-healing, and a hook system for request/response mutation.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for interacting with the Supabase platform

  • An MCP server for Arcjet - the runtime security platform that ships with your AI code.

  • MCP server for Appcircle mobile CI/CD platform.

View all MCP Connectors

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/itsPremkumar/mcp-agent-mesh'

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