How much latency an MCP gateway adds, and how to benchmark it yourself


There's no neutral benchmark for MCP gateway latency, and vendor numbers rarely match your setup. Here is what a gateway actually adds per call and a simple test you can run before you pick one.
Every gateway vendor says they're fast. cool. Your agent doesn't care about their benchmark, it cares about yours.
Short answer: a well-run MCP gateway usually adds milliseconds, not seconds, to a tool call. The slow part is almost always the upstream app's API, the network distance between pieces, and extra round trips your agent makes. There's no neutral, published benchmark across vendors, so the only number worth trusting is one you measure: call the same tool directly and through the gateway, from the same place, many times, and compare p50 and p95.
A tool call through a gateway has more hops than you'd think:
Steps 2 and 3 are the gateway's real overhead. Step 4 is usually the biggest number and has nothing to do with the gateway. A token refresh in step 3 is a one-off spike, not the normal case.
For a reference point, IBM's open-source ContextForge gateway publishes performance targets in its repo: under 10ms p95 for an authenticated request through the gateway core, and under 20ms p95 for a simple tool invocation on a standalone MCP server. Those are goals they test against, not measured results, and not a promise from anyone else. But it gives you a sense of scale.
ok this is the part people miss.
Some gateways expose every tool up front. Others, MewCP included, expose a few meta-tools (search, get the schema, call) so the agent's context stays small. That's great for tokens. It also means the first time an agent uses a tool it may make two or three calls instead of one.
Each of those is a model turn on your side too, and a model turn costs far more time than any gateway hop. So when you benchmark, measure the whole task ("find the open PRs and summarise them"), not just one call. If the extra discovery steps hurt, have the agent keep the schema it already fetched and reuse it for repeat calls.
Same logic for every gateway tbh. Count round trips first, milliseconds second.
Here's a minimal setup. Pick one read-only tool you actually use, like listing issues in a repo.
A small Python harness using the fastmcp client:
import asyncio, statistics, time
from fastmcp import Client
from fastmcp.client.transports import StreamableHttpTransport
async def bench(url, headers, tool, args, n=100, warmup=5):
transport = StreamableHttpTransport(url, headers=headers)
times = []
async with Client(transport)
Run it once against the direct server and once against the gateway. For a gateway that uses meta-tools, the tool name and arguments differ, so read them from the gateway's schema first (on MewCP, call get_schema to confirm the current parameters). Check the transport class against your fastmcp version, since that API moves.
That last one matters more than any brochure number. MewCP logs every call with tool, time, status and latency, so you can see which app is slow instead of blaming the gateway, or the other way round. Whatever you choose, make sure you get that view.
Usually milliseconds per call, though no neutral cross-vendor benchmark exists. IBM ContextForge targets under 10ms p95 for an authenticated request through its gateway core. Upstream API time and extra agent round trips usually matter more.
Call the same read-only tool directly and through the gateway from where your agent runs, at least 100 times after a warm-up. Compare p50, p95 and p99, add concurrency, and also time a full multi-step task.
It can. Gateways that expose a few meta-tools need a search and schema step before the first call to a tool. Reusing a fetched schema for repeat calls removes most of that.