Four read-only MCP queries, still queued one behind the other


You wired an internal MCP server into Hermes, and it exposes six tools: tickets, deploy history, metrics, docs. Then something breaks in production, you ask for “the tickets, the last three deploys and the past hour of metrics for this service”, and the agent does exactly the right thing — it fires four tool calls in one batch. You watch them come back one at a time. 0.9s, 0.9s, 0.9s, 0.9s. Four independent read-only queries, four independent round trips, one queue.

The model was not being timid, and your server was not slow. That was MCP’s serialization layer: on a single server connection, one RPC in flight at a time.

One lock per connection

MCP is request-response. The client sends tools/call, waits for the result, sends the next one. Hermes held one RPC lock per server connection, and the reason is legitimate: a lot of MCP servers are stateful. Session-scoped progress notifications, sampling (the server asking the model for inference) and elicitation (the server asking the user a question) all travel on that same connection. With two calls in flight, a callback has no way to say which call it belongs to.

The supports_parallel_tool_calls setting has existed for a while, but it governs admission: whether tools from that server may join a parallel tool-call batch. Across servers it already worked — ask a docs server and a database server in one turn and both run at once. Inside one server, the calls still had to queue for that lock. Which is how you end up staring at four identical 0.9s waits.

What changed: the round trip, not the admission

PR #158056 separates “admitted together” from “actually in flight together”. Two successful tools/call requests to the same server can now overlap on Streamable HTTP. The boundaries are spelled out in the official docs:

Situation Overlaps?
Streamable HTTP, supports_parallel_tool_calls: true, sampling and elicitation both off Yes
Same, but sampling or elicitation is enabled No
stdio server No
Explicit transport: sse, or the automatic SSE fallback No
Resource / prompt utilities, discovery No — existing locking kept
Setting absent or false No

The discovery admission barrier is untouched: the batch still resolves the server’s tool list before anything runs. Only the mutex between two real business calls is relaxed.

Turning it on

The switch is still the per-server field, plus turning both callbacks off:

mcp_servers:
  docs:
    url: "https://mcp.internal.example.com/mcp"
    supports_parallel_tool_calls: true
    sampling:
      enabled: false
    elicitation:
      enabled: false

All three conditions are required. Both callbacks are enabled by default, so supports_parallel_tool_calls: true alone changes nothing — deliberately, so nobody discovers concurrency by surprise after an upgrade.

Restart the gateway or reload MCP (/reload-mcp), then check the connection with hermes mcp test docs; hermes mcp list shows what is configured. The full subcommand surface is in the hermes mcp reference.

One detail that matters on shared machines: the opt-in belongs to the calling profile. When profiles share one connection to a same-named server — the mechanism behind multi-profile MCP fan-out — profile A declaring its tools parallel-safe does not make profile B’s serial x run two calls at once. Whoever declares it owns it.

When not to turn it on

Parallelism is only free if the tools genuinely do not interfere. The docs’ caution is worth repeating plainly: if the tools read and write shared state, shared files, the same database rows or the same external resource, review the race conditions before flipping the flag.

In practice:

  • Pure lookups with unrelated arguments — “ticket 12” and “metrics for the last hour” — are a good fit.
  • Anything that writes: “create ticket” and “update ticket” stay serial, even with different arguments.
  • Tools that depend on an implicit cursor or paging token (list --page 2) depend on ordering for correctness. Serial is the correct semantics there.

And if your server offers sampling or elicitation at all — some do, to ask the user for a confirmation mid-call — leave it serial. Saving 700ms is not worth a callback landing on the wrong request.

Can you use it today

Only from main. The PR merged on 2026-11-20, after the v0.23.3 tag was cut, so no published build contains it — including v0.23.3 itself, whose window we broke down in the v0.23.3 release analysis. Run it from main if you want to try it now, but know that you are on unreleased code.

Update (2026-11-25): these changes shipped in v0.23.4 (November 24) — hermes update brings them in. The “not in v0.23.3 / on main only” wording above is a snapshot from publication time.

That said, MCP latency has more than one source. If you have not read it yet, the respawn backoff work covers the other common kind of waiting — reconnect loops after a server dies — and batch tool search covers the “too many tools to find the right one” half of the problem. Fix all three and MCP stops being the slow part of a turn.

The short version: concurrency is not free, it is a trade. You cannot ask one connection to carry several in-flight calls and server-initiated callbacks that need to be attributed to one of them. Decide which kind of server you have, and the answer follows.