Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Measured 27,257 MCP Connections. The p90 Session Waits 35s

Description and use

Removing unnecessary MCP servers and analyzing logs reduced average connection time to 550 ms, cutting the long tail to 3.4 s when no token refresh occurs.

Problem

MCP connections exhibit long tail latency, causing slow session starts and wasted developer time.

Outcome

By disabling heavy MCP servers and focusing on OAuth refresh and transport choices, session start times dropped from a median of 582 ms to a more predictable 550 ms, with the p90 reduced from 3,678 ms to 3,400 ms for non‑refresh connections.

Workflow

  • 1. Write a shell script to remove unnecessary MCP servers.
  • 2. Collect JSONL logs from MCP servers over 35 days.
  • 3. Pair "Starting connection" and "Connection established" lines to compute latency per connection.
  • 4. Aggregate statistics: median, p75, p90, p95, p99.
  • 5. Split data by token refresh occurrence to isolate OAuth impact.
  • 6. Compare transport types (HTTP vs stdio) for median and tail latency.
  • 7. Analyze per‑session fan‑out to assess cumulative connection time.
  • 8. Identify servers with worst latency and remove them.
  • 9. Cap measurements at client timeout (30s) to avoid skew from idle laptop.
  • 10. Apply findings: count servers, make heavy ones opt‑in, prefer HTTP, review logs.

Evidence

I wrote a 56‑line shell script called mcp-optional whose entire job was to remove two MCP servers from my config.

Source

39% of connections take longer than a second, and the p99 is fourteen seconds.

Source

5.8× slower. Same servers, same network, same machine. The only difference is whether the client had to go get a new access token first.

Source

  • Record date: 2026-09-21T00:45:38.175Z