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

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

说明与用途

通过删除不必要的 MCP 服务器并分析日志,将平均连接时间降低到 550 ms,长尾时间在无令牌刷新时降至 3.4 s。

问题

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

结果

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.

工作流

  • 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.

证据

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

来源

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

来源

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.

来源

  • 记录日期: 2026-09-21T00:45:38.175Z