Routing, Load Balancing, and Failover Strategies for Multi-Server MCP Fleets
A stateless MCP protocol enables simpler load balancing without session affinity.

An MCP gateway gives AI agents one endpoint through which to reach multiple Model Context Protocol servers and sends each tool call to the right backend. Safe production routing requires more than load distribution, however. It must preserve tool compatibility, identity, and auditability through retries and failover.
Why multi-server MCP fleets cannot be treated as a simple API tier
Without a gateway, N agents connecting to M servers create an N × M configuration problem, with separate authentication, error handling, and connection lifecycles. No shared layer distributes the load. With a gateway, the traffic path runs from agent client through a common endpoint to a logical server pool and then an upstream replica. But agentic traffic adds dynamic retries on schema failures, authorization boundaries that change per invocation, and natural-language intent that static API routes cannot evaluate.
A standalone gateway can multiplex servers while leaving authentication and reliability to individual tools, whereas an action runtime absorbs authentication, retries, delegation, and audit logging into the execution platform. The protocol’s session model adds another constraint, and its removal changes which conventional load-balancing techniques become practical.
How the July 2026 stateless specification change reshapes load balancing decisions
The 2026-07-28 MCP specification removes the initialize handshake and Mcp-Session-Id and replaces protocol-level sessions with _meta fields in each request that hold the protocol version and client capabilities. It also requires Streamable HTTP requests to include Mcp-Method and Mcp-Name headers, so the gateway can read dispatch information without inspecting the body. The server no longer needs that session affinity. Previously, remote scaling required sticky sessions, a shared session store, and deep packet inspection at the gateway, adding substantial operational work.
With the stateless model, any compatible instance can serve a request, so a remote fleet can use plain round-robin balancing without sticky sessions or a shared session store. Platform teams weighing these patterns need to check that their implementations follow the revised specification before they drop session infrastructure. Advice written for the earlier protocol may otherwise solve a constraint their deployment no longer has.
Load-balancing strategy selection across the five main approaches

HarrisonCN’s mcp-gateway v2.1.0, released in October 2026, defines five strategies under servers[].loadBalancing. Round-robin is the default. It suits homogeneous replica pools because rotating requests needs little routing state once session affinity disappears. Random selection offers an alternative for high-throughput, low-latency fleets where maintaining round-robin state becomes overhead. Neither approach accounts for differences in replica capacity or tool execution time.
Weighted routing addresses the first difference by directing more requests to higher-capacity members, using per-replica weights in servers[].replicas. Least-latency routing addresses the second. Its exponentially weighted moving average, or EWMA, favors the replica with the lowest recent latency, so it is a good default when some tools take much longer to run than others. The distinction is between assigning capacity in advance and responding to measured performance.
Failover takes a different view of the pool. It treats members as an ordered priority list, using the primary until a failoverOn condition causes dispatch to fall through to another replica. Disconnection is the default trigger, while timeout and error are opt-in. Alongside these five strategies, teams can build complexity-aware routing to send CPU-intensive calls to high-performance nodes, memory-intensive calls to high-capacity nodes, and simple operations through round-robin. That is a custom dispatch pattern and requires tool-name or complexity-metadata inspection.
Replica topology and health-aware routing in the mcp-gateway model
The release models each logical server as a primary with a servers[].replicas list. Each replica overrides transport fields including url, command, args, env, headers, and transport, and has its own weight. That allows heterogeneous backends beneath one logical server ID. Internally, replicas use the naming convention <id>~<n> and are supervised and reconnected individually. Their tools appear under the logical ID, with a replica’s tool list substituting when the primary has none.
Periodic pings cover every member, while normal dispatch skips those marked disconnected, degraded, offline, or ejected. When none is healthy, the gateway tries all members rather than turning a transient connectivity event into a complete blackout. The operator endpoint GET /api/v1/load-balancing exposes connection state, health, latency, call and error counts, and ejection status. Per-request trace attributes mcp.upstream.id and mcp.upstream.attempts let tracing systems attribute latency and retry cost to specific upstreams.
Circuit-breaker design and passive ejection for agentic failure modes
A server can answer pings even when its tools work badly. Agent retries can keep landing on a degraded member before periodic checks detect trouble, and schema failures can prompt retries across several servers. That amplifies pressure on an already weakened fleet. Slow but successful calls need particular care because a failure counter alone will not catch them unless they cross a configured timeout boundary.
The release’s passive ejection mechanism removes a member after ejectAfter consecutive failures and holds it out for ejectMs milliseconds before re-admission. Trigger selection determines what counts toward that isolation. The failoverOn setting defaults to not-connected, with timeout and error available as opt-in conditions. These controls let teams tune sensitivity to the failure signatures their tools actually produce rather than treating every unsuccessful interaction alike.
The retries parameter sets a separate limit on how many other members a request tries before it returns a failure to the caller. Retry budget and ejection threshold serve different purposes. One bounds work for a request, while the other determines when a member leaves the pool. A more complex circuit-breaker pattern adds an open state and then half-open probes after cooldown, so a server can show that it has recovered before it gets full traffic again. The release’s timed re-admission mechanism does not include these probes.
Namespace pattern routing and tool-name-based dispatch for heterogeneous fleets
A healthy file server is still the wrong destination for a database tool. Capability selection must precede load balancing across eligible members. Namespace routing uses tool names, prefixes, and wildcard patterns to make that choice, with db.* pointing to a database pool and fs.* to a file pool. Each pool can have named primary and backup destinations, automatic failover retries, and its own balancing and ejection settings.
A high-complexity tool name can select a high-performance pool, after which the pool’s normal algorithm chooses a healthy member. The new headers make that separation cheaper. Mcp-Method and Mcp-Name expose the routing information without requiring a gateway to open the request body. Namespace dispatch is an architectural pattern here.
What governance requirements add to the routing and failover layer
Failover changes which server enforces a tool call’s permissions. A backup that lacks the primary’s controls is therefore not an equivalent destination, even if it returns the same tool result. Most MCP server implementations provide only minimal, ephemeral logging by default, leaving regulated organizations unable to reconstruct agent activity without an additional audit trail. Gateway records need to show which server received the call, which tool was called, and what parameters it received. This affects SOC 2 and HIPAA obligations and outage diagnosis.
Effective authorization is the intersection of agent and user permissions per action. Failover must preserve that intersection. A replica enforcing only agent permissions can silently expand access beyond what the user was allowed to do. The two-identity model combines a project-level workload key, represented by an OAuth client scoped to the application, with a user-level OIDC identity as the delegated subject. The gateway must re-assert both against the replica, which requires more than replaying the original token.
The NSA flagged MCP as an active attack surface, identifying absent OAuth enforcement, excessive tool responses, missing audit trails, and prompt-injection paths through tool output. CISA co-signed a related Five Eyes advisory on agentic AI. These risks extend beyond endpoint uptime. A governed routing layer gives servers a shared point for enforcing policy, and requiring servers to register before dispatch brings otherwise unreviewed MCP servers into view. Governing internal database, file-system, and API access requires the server that exposes it to be inside that boundary.
How gateway products approach the routing and governance combination in practice
The gateway-versus-runtime distinction becomes concrete when comparing replica controls, authorization, tool execution, and audit support rather than treating “MCP support” as a complete specification. The release discussed above supplies explicit replica algorithms, passive ejection, periodic health checks, an operator API, and upstream OpenTelemetry attributes. Its useful comparison point is the precision of those traffic controls.
Bifrost from Maxim AI combines LLM routing and MCP tool orchestration in a single binary, with automatic failover, load balancing, and tool-scoped virtual keys. It is self-hostable under Apache 2.0. IBM ContextForge takes federation into multi-cluster environments with in-memory data store-backed caching, retries, and rate limiting. Its OpenTelemetry integration supports Phoenix, Jaeger, and Zipkin, and deployment options run from PyPI or Docker to Kubernetes multi-cluster environments. These options differ in scope as well as packaging.
Microsoft MCP Gateway provides a Kubernetes reverse proxy and management layer with control-plane lifecycle management and Azure Entra ID integration. Its session-aware stateful routing is relevant to pre-stateless-spec deployments. Agentgateway focuses on security, observability, and governance for agent-to-agent and agent-to-tool communication. MCP Mesh instead presents one governed endpoint with OAuth 2.1 and API-key-based RBAC, an encrypted token vault, Virtual MCPs for composing toolsets, OpenTelemetry observability, and organization-scoped multitenancy. That places tool composition and tenant boundaries directly in the comparison.
Commercial products offer different policy entry points. Cloudflare MCP Server Portals aggregate registered servers behind one portal URL, with administrators curating the available servers and tools. Policies use existing identity providers, device posture checks, and geographic restrictions, but Cloudflare says it does not enforce independent MFA for servers authorized through a portal. Kong AI Gateway uses the familiar API plugin and policy model, making it relevant where Kong already governs the API estate. Its semantic caching returns stored responses for semantically similar prompts to reduce latency and cost.
Tyk MCP Gateway proxies remote servers and converts REST APIs into MCP tools, with OAuth 2.1, per-tool access policies, rate limits, and permission-filtered discovery. It exports analytics through OpenTelemetry and the Tyk Dashboard. Arcade.dev MCP Gateway sits inside an action runtime with delegated multi-user authorization, vaulted credentials, hosted execution, tool optimization, and audit logs. Composio MCP Gateway combines managed integrations with governance controls for fleet-wide rollout. The practical dividing line is how much execution and governance each option absorbs.
Where an AI control plane sits above the gateway tier and what it governs that gateways cannot
A gateway governs traffic for the clients and servers connected to it, but on its own it cannot make policy consistent across gateways that are managed separately. An AI control plane occupies that wider scope. It applies fleet-wide identity and RBAC, unifies cost and usage telemetry, detects unregistered shadow MCP servers, and provides real-time checks for PII, prompt injection, and secrets before tool calls reach servers. A gateway can enforce local policy while the control plane defines and observes the enterprise boundary.
The enterprise ratio of 45 non-human identities to each human identity makes isolated credential management especially difficult. Servers, agents, and tools each introduce credentials. Tying them to existing identity providers such as Okta and Entra ID, through SAML/OIDC, gives the control plane a common basis for evaluating workload and user identity on every call. Fine-grained RBAC then applies the permission intersection regardless of which gateway or replica handles the request.
That shared view also changes how routing decisions are evaluated. Cost per tool call, usage by team, latency by server, and audit records with invocation parameters and responses show how the fleet behaves in practice, beyond what its configuration says it should do. A fast primary and an available backup are only part of that picture. Production-safe failover requires a destination that can perform the tool call under the same authorization and leave an accountable record of the action.


