Skip to main content
Glama

mcp-agent-mesh

MCP용 메시 게이트웨이 — 하나의 MCP 클라이언트가 접두사 기반 라우팅, 상태 확인, 회로 차단기 장애 조치, 그리고 stdio와 Streamable HTTP 모두에서 동작하는 통합 엔드포인트를 통해 N개의 MCP 서버에 도달할 수 있게 해줍니다.

개요

mcp-agent-mesh는 단일 논리 MCP 서버 뒤에서 여러 업스트림 MCP 서버를 집계합니다. 모든 업스트림 도구는 server_name.tool_name 접두사 아래에 노출되므로, 메시에 연결하는 클라이언트는 모든 정상 업스트림의 도구가 포함된 단일 tools/list를 보게 됩니다.

도구 호출이 실패하고 서버의 회로 차단기가 열리면, 메시는 클라이언트에 오류를 반환하기 전에 구성된 복제 서버로 자동 장애 조치합니다.

Related MCP server: mcp-0ne

주요 기능

기능

설명

집계

tools/list가 모든 업스트림 서버의 도구를 하나의 평면 목록으로 병합합니다

접두사 라우팅

math.add를 호출하면 메시가 math 서버로 라우팅합니다

회로 차단기

임계값과 타임아웃을 구성할 수 있는 서버별 회로 차단기

상태 폴링

백그라운드 ping 루프가 업스트림의 초기 장애를 감지합니다

장애 조치

구성 가능한 장애 조치 그룹을 통해 별칭이 장애가 발생한 서버를 대신할 수 있습니다

이중 전송

stdio MCP 서버 Streamable HTTP 서버로 실행됩니다

타임아웃 + 재시도

모든 업스트림 호출은 asyncio.wait_for로 래핑됩니다

아키텍처

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

모듈

모듈

역할

config.py

YAML 구성 파싱 — ServerConfig, MeshConfig

health.py

서버별 CircuitBreaker + ServerHealthMonitor (백그라운드 ping)

router.py

접두사 라우팅 (server.tool), 장애 조치 그룹 확인, 도구 레지스트리

gateway.py

MeshGateway — 업스트림 연결, 도구 목록 집계, 호출 라우팅, stdio + HTTP를 통한 MCP 제공

설치

pip install -e ".[dev]"

사용법

CLI (stdio 모드)

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

HTTP 모드

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

클라이언트 구성으로 사용 (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"
    }
  }
}

구성

전체 예시는 examples/mesh.yaml을 참조하세요. 주요 필드:

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

테스트

pytest tests/ -v

테스트 스위트는 인메모리 가짜 MCP 서버를 사용하며(실제 하위 프로세스가 필요하지 않음), 구성 파싱, 회로 차단기 로직, 접두사 라우팅, 도구 집계, 장애 조치, 엔드투엔드 게이트웨이 동작을 다룹니다.

라이선스

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