mcp-agent-mesh
mcp-agent-mesh
Mesh-шлюз для MCP — позволяет одному MCP-клиенту обращаться к N MCP-серверам с маршрутизацией на основе префиксов, проверками здоровья, автоматическим переключением при отказе (circuit breaker) и единой конечной точкой как через stdio, так и через Streamable HTTP.
Что он делает
mcp-agent-mesh объединяет несколько вышестоящих MCP-серверов за одним
логическим MCP-сервером. Каждый инструмент вышестоящего сервера доступен под
префиксом server_name.tool_name, поэтому клиент, подключающийся к mesh-шлюзу, видит
единый tools/list, содержащий инструменты всех работоспособных вышестоящих серверов.
Когда вызов инструмента завершается ошибкой и circuit breaker сервера размыкается, mesh-шлюз автоматически переключается на настроенные серверы-реплики, прежде чем вернуть ошибку клиенту.
Related MCP server: mcp-0ne
Возможности
Возможность | Описание |
Агрегация |
|
Префиксная маршрутизация | Вызовите |
Circuit breaker | Индивидуальный circuit breaker для каждого сервера с настраиваемым порогом и таймаутом |
Проверка здоровья | Фоновый цикл ping обнаруживает ранние сбои вышестоящих серверов |
Переключение при отказе | Настраиваемые группы переключения позволяют алиасам подменять отказавший сервер |
Двойной транспорт | Работает как stdio MCP-сервер и как Streamable HTTP-сервер |
Таймауты и повторы | Каждый вышестоящий вызов обёрнут в |
Архитектура
┌─────────────────────┐
MCP client ───────►│ MeshGateway │
│ (stdio / HTTP) │
└────────┬───────────┘
│ tools/list
│ tools/call
┌─────────┼─────────────┐
▼ ▼ ▼
┌────────┐ ┌─────────┐ ┌─────────┐
│ Server │ │ Server │ │ Server │
│ "A" │ │ "B" │ │ "C" │ (upstream MCP servers)
└────────┘ └─────────┘ └─────────┘Модули
Модуль | Ответственность |
| Разбор YAML-конфигурации — |
| Индивидуальный |
| Префиксная маршрутизация ( |
|
|
Установка
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-серверы (без реальных субпроцессов) и покрывает разбор конфигурации, логику circuit breaker, префиксную маршрутизацию, агрегацию инструментов, переключение при отказе и сквозное поведение шлюза.
Лицензия
MIT
This server cannot be installed
Maintenance
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
- AlicenseNot gradedqualityDmaintenanceGateway MCP Server - Route MCP requests intelligently to multiple backend servers.3MIT
- AlicenseNot gradedqualityCmaintenanceA 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
- AlicenseNot gradedqualityDmaintenanceMCP Gateway that aggregates multiple upstream MCP servers into a single endpoint with persistent connections, tool registry, and authentication.452MIT
- AlicenseNot gradedqualityBmaintenanceA 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.1MIT
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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