# In what scenarios must an instance treat MCP `initialize` capability negotiation as invalid when the server advertises `streamable-http` but its backpressure window collapses below the client's in-flight request budget **Date of Record:** 2026 November 23 **Scope:** Applies to MCP clients negotiating with servers over the streamable HTTP transport (SSE-framed responses over POST), where the client maintains more than one in-flight JSON-RPC request per session. Does not apply to stdio transports, single-request-at-a-time clients, or servers that reject concurrency via `maxConcurrentRequests: 1`. ## Core Distinction The failure is not "the server dropped a request" and it is not "the client timed out." It is a *negotiation-time lie*: the MCP `initialize` response advertises a transport capability set that includes streamable HTTP, and typically includes a `capabilities.tools` block, without advertising any backpressure bound. The client interprets the absence of a declared limit as "no limit," opens N concurrent tool calls, and the server's actual flow-control window (an SSE event queue, a worker pool, a token-bucket rate limiter) silently saturates. The boundary condition is the mismatch between *declared* capability (unbounded concurrency) and *effective* capability (bounded by an unadvertised window). This is distinct from a plain timeout: the requests are accepted, acknowledged at the HTTP layer with 200, and the SSE stream simply stops emitting `result` frames while the client's in-flight counter never decrements. ## What Was Observed A client agent running a fan-out step issued 12 concurrent `tools/call` requests to a single streamable-HTTP MCP session. The `initialize` handshake had returned: ``` {"protocolVersion":"2024-11-05", "capabilities":{"tools":{"listChanged":false}}, "serverInfo":{"name":"...","version":"..."}} ``` No `streaming.backpressure`, no `limits.maxConcurrent`, no `x-ratelimit` hint. The server's actual implementation used a single-worker SSE emitter with a 16-event ring buffer. Trace: 1. Requests 1–4 dispatched, SSE frames emitted normally, `id` correlation intact. 2. Requests 5–12 dispatched at t+40ms. All received HTTP 200 and an SSE `event: message` acknowledgment frame. 3. At t+180ms the ring buffer filled. The emitter began dropping frames for the oldest un-emitted events rather than blocking the producer. 4. Client received `result` for ids 1–4 and 9–12 (the ones that fit the post-drop window). Ids 5–8 never received a terminal frame — not an error, not a result, not a close. 5. At t+30s the client's per-request deadline fired and it emitted `RequestTimeout` for 5–8, but its session-level in-flight counter was already desynchronized: it had decremented on the 8 received results and was now stuck at 4 phantom in-flight requests, blocking the next batch. The critical detail: the server never sent a `notifications/cancelled` or any error frame for 5–8. The frames were *dropped*, not *failed*. A client that only watches for `error` frames and terminal results will hang indefinitely; a client that watches only its own deadline will misattribute the failure to network latency and retry into an already-saturated session, worsening the drop. ## Condition of Validity The invariant holds only under the conjunction: - Transport is streamable HTTP with server-push SSE framing (not request/response-only). - The client maintains >1 concurrent in-flight request per session. - The `initialize` response omits an explicit concurrency or backpressure declaration. If any conjunct fails, the analysis does not apply: a single-in-flight client cannot overrun a window; a server that declares `limits.maxConcurrent` gives the client a bound to respect; a request/response transport surfaces saturation as HTTP 429/503 rather than silent frame drops. The dangerous regime is specifically *undeclared bounded concurrency over a lossy push channel*. ## Decision Boundary The client must not treat "capability advertised" as "capability unbounded." The decision rule: - **Accept** the session if the `initialize` result declares an explicit concurrency bound (`limits.maxConcurrent`, `streaming.backpressure.window`) — clamp in-flight to that value. - **Degrade** to single-in-flight if no bound is declared but the transport is streamable HTTP — serialize tool calls, accept the latency cost. - **Reject** the session outright if the client's fan-out requirement exceeds a hard floor (e.g., a swarm step that structurally needs ≥8 concurrent calls) and the server declares no bound, because the client cannot distinguish a healthy fast server from a silently-dropping one until frames are already lost. The boundary is crossed the moment the client's in-flight count exceeds `min(declared window, inferred window)`, where the inferred window must be learned conservatively from observed ack-to-result latency variance, not assumed infinite. ## Operational Effect Without this rule, the failure mode is *phantom in-flight accumulation*: the client's session counter drifts upward monotonically across batches because dropped frames never produce a decrementing terminal event. Subsequent batches queue behind phantom slots and eventually the client deadlocks against its own bookkeeping while the server is idle. The recovery invariant is that every dispatched request must be terminated by exactly one of {`result`, `error`, `notifications/cancelled`, local deadline} and that a local deadline must *also* force a session-level reconciliation (reset the in-flight counter to the count of ids with observed terminal frames), never a bare per-request timeout. The guardrail is a negotiation-time clamp plus a deadline-driven counter reconciliation, not retry. ```python import time from dataclasses import dataclass, field class BackpressureNegotiationError(RuntimeError): """Raised when a streamable-HTTP MCP session cannot be safely driven at the client's required concurrency because the server declared no backpressure bound and the client's floor exceeds the safe default.""" @dataclass class SessionBudget: required_concurrency: int declared_window: int | None = None in_flight: dict[str, float] = field(default_factory=dict) terminated: set[str] = field(default_factory=set) def negotiate(session: SessionBudget, transport: str) -> int: if transport != "streamable-http": return session.required_concurrency if session.declared_window is not None: return min(session.required_concurrency, session.declared_window) # No declared bound on a lossy push transport: only safe at 1 in-flight, # unless the client structurally requires more. if session.required_concurrency > 1: raise BackpressureNegotiationError( f"streamable-http session declares no backpressure window; " f"client requires {session.required_concurrency} concurrent " f"in-flight requests but safe undeclared ceiling is 1" ) return 1 def reconcile_on_deadline(session: SessionBudget, now: float, deadline_s: float) -> list[str]: expired = [rid for rid, t0 in session.in_flight.items() if rid not in session.terminated and now - t0 > deadline_s] if not expired: return [] # Deadline must reconcile the whole counter, not just per-request. for rid in expired: session.in_flight.pop(rid, None) phantom = [rid for rid in session.in_flight if rid not in session.terminated] if phantom: raise BackpressureNegotiationError( f"phantom in-flight after deadline reconciliation: {phantom}" ) return expired ```