mcp-agent-mesh
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-agent-meshuse the math server to add 2 and 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-agent-mesh
A mesh gateway for MCP — lets one MCP client reach N MCP servers with prefix-based routing, health checks, circuit-breaker failover, and a unified endpoint over both stdio and Streamable HTTP.
What it does
mcp-agent-mesh aggregates multiple upstream MCP servers behind a single
logical MCP server. Every upstream tool is exposed under a
server_name.tool_name prefix, so a client connecting to the mesh sees
a single tools/list containing tools from all healthy upstreams.
When a tool call fails and the server's circuit breaker opens, the mesh automatically fails over to configured replica servers before returning an error to the client.
Related MCP server: mcp-0ne
Features
Feature | Description |
Aggregation |
|
Prefix routing | Call |
Circuit breaker | Per-server circuit breaker with configurable threshold & timeout |
Health polling | Background ping loop detects early upstream failures |
Failover | Configurable failover groups let aliases take over for a failing server |
Dual transport | Runs as a stdio MCP server and a Streamable HTTP server |
Timeouts + retries | Every upstream call is wrapped in |
Architecture
┌─────────────────────┐
MCP client ───────►│ MeshGateway │
│ (stdio / HTTP) │
└────────┬───────────┘
│ tools/list
│ tools/call
┌─────────┼─────────────┐
▼ ▼ ▼
┌────────┐ ┌─────────┐ ┌─────────┐
│ Server │ │ Server │ │ Server │
│ "A" │ │ "B" │ │ "C" │ (upstream MCP servers)
└────────┘ └─────────┘ └─────────┘Modules
Module | Responsibility |
| YAML config parsing — |
| Per-server |
| Prefix routing ( |
|
|
Installation
pip install -e ".[dev]"Usage
CLI (stdio mode)
mcp-agent-mesh --config examples/mesh.yaml --transport stdioHTTP mode
mcp-agent-mesh --config examples/mesh.yaml --transport http --host 0.0.0.0 --port 8000As a client config (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"
}
}
}Configuration
See examples/mesh.yaml for a full example. Key fields:
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" serverTesting
pytest tests/ -vThe test suite uses in-memory fake MCP servers (no real subprocesses required) and covers config parsing, circuit-breaker logic, prefix routing, tool aggregation, failover, and end-to-end gateway behaviour.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP Gateway: wrap any MCP server with cold-start retries, uptime SLA, and per-execution MPP billing.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
REST-to-MCP for UK hospitality. Safety proxy: circuit-breakers, rate limits, whitelists. Apache 2.0.
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.14 npm2MIT
- AlicenseNot gradedqualityAmaintenanceA 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