Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · mcp

One read of Model Context Protocolmcp-20261118T203717Z

12 pages moved out of 362 read.

Pages moved 12 significant first
Pages read 362 in this capture
Captured 20:37 UTC
Corpus hash fcb1de7e4819 corpus-hash

What this read moved

1-12 of 12

docs/2026-07-28/tools/inspector Changed · +5 / -0 lines

from line 148
148148>
149149> Connect once, then run many commands against a named connection.
150150 
151> [card] [Load testing](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/load-testing.md)
152>
153> Concurrent and sustained load from the web client, the CLI, or mcpdo, with
154> CI thresholds and baselines.
155 
151156> [card] [Security](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/security.md)
152157>
153158> The threat model: the web backend's token, Docker, secret storage, stdio

docs/2026-07-28/tools/inspector/cli Changed · +16 / -3 lines

## Load testing a tool

from line 53
5353| - | - | - |
5454| `initialize` | None | Connect-only probe: `{serverInfo, protocolVersion, capabilities, instructions}`. |
5555| `tools/list` | None | `--strict` turns its schema portability check into a gate (see [CI gates](#ci-gates)). |
56| `tools/call` | `--tool-name`, plus optional `--tool-arg` / `--tool-args-json` | |
56| `tools/call` | `--tool-name`, plus optional `--tool-arg` / `--tool-args-json` | `--load` calls it repeatedly (see [Load testing](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/load-testing.md)). |
5757| `resources/list` | None | |
5858| `resources/read` | `--uri` | |
5959| `resources/templates/list` | None | |
from line 118
118118> `--format`; `--format json` reshapes only the single-tool output of
119119> `tools/call --app-info`.
120120 
121## Load testing a tool
122 
123`--load` calls one tool, or a weighted mix of tools, resources and prompts, repeatedly and concurrently, and prints a latency and error-rate summary in place of a result. [Load testing](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/load-testing.md) covers every flag, the summary's fields, thresholds for CI and the other run modes.
124 
125```bash theme={null}
126# 20 calls in flight for 30 seconds; fail the job if p99 is above 250 ms
127mcp-inspector --cli <server> --method tools/call --tool-name search \
128 --tool-arg query=mcp --load --load-concurrency 20 --load-duration 30 --load-max-p99 250
129```
130 
131A completed run exits `0` whatever its error rate, unless a threshold or baseline is set, which exits `10` on a breach. Ctrl+C prints the summary of what completed and exits `130`.
132 
121133## Exit codes and error envelopes
122134 
123135Every non-zero exit maps to a stable failure class, so a caller can branch on *why* without scraping prose:
from line 146
134146| `7` | `--verify` found a skill that violates SEP-2640 (conformance, digest, or size mismatch). |
135147| `8` | `--verify` couldn't check every skill within its read bounds. |
136148| `9` | `--verify --require-digests` found a skill that advertises no digests. |
137| `10` | A `--load` run breached a `--load-max-error-rate` or `--load-max-p99` threshold. The summary is printed first, and the envelope `code` names the threshold: `load_error_rate_exceeded` or `load_p99_exceeded`. |
149| `10` | A `--load` run breached a [threshold](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/load-testing.md#thresholds) or its [baseline](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/load-testing.md#comparing-against-a-baseline) budget. The summary is printed first, and the envelope `code` names the check, such as `load_p99_exceeded` or `load_regression`. |
138150| `11` | The server answered HTTP 429 (envelope `code` `rate_limited`). The envelope also carries `method`, plus `retryAfter` (the `Retry-After` header as sent) and `retryAfterMs` when the server sent one that parses. |
151| `130` | A `--load` run was interrupted by Ctrl+C or SIGTERM (envelope `code` `interrupted`). The summary of what completed is printed first. |
139152 
140153On any non-zero exit the CLI also writes a **single JSON line to stderr**:
141154 
from line 200
187200* `--strict` (with `tools/list`): reports tool-schema portability problems in full on stderr (path, issue, suggested fix) and exits `6` if any is error-severity. Without it, `tools/list` prints only a one-line count. Under `--format json` the findings are folded into the output as `schemaFindings`.
188201* `--verify` (with `skills/list` or `skills/get`): runs the SEP-2640 conformance and digest checks, writes one JSON report per skill on stdout, and exits `7` on a violation or `8` when the read bounds stopped it before every skill was checked. `--skill-catalog-max-skills` and `--skill-catalog-max-bytes` set those bounds.
189202* `--require-digests` (with `--verify`): exits `9` for a skill that advertises no digests, instead of reporting it as unverifiable and exiting `0`.
190* `--load-max-error-rate <fraction>` and `--load-max-p99 <ms>` (with `--load`): turn a load run into a gate. The run prints its summary, then exits `10` when the share of failed calls is above the fraction (`0` to `1`, so `0` fails on any failed call), when the p99 latency is above the given milliseconds, or when no call completed. `--load` (with `tools/call --tool-name`) calls the tool repeatedly and concurrently and prints a latency and error-rate summary instead of a result, bounded by `--load-duration <sec>` (default `10` when `--load-requests` is not set) and `--load-requests <n>`, with in-flight calls still finishing. `--load-concurrency <n>` (default `10`) caps the calls in flight, `--load-connections <n>` (default `1`, at most `--load-concurrency`, HTTP and SSE servers only) spreads them over independent sessions opened before timing starts, and `--load-rate <n>` (default unlimited) caps the calls started per second.
203* `--load-max-error-rate`, `--load-max-p50`, `--load-max-p95`, `--load-max-p99` and `--load-min-throughput` (with `--load`): print the load run's summary, then exit `10` when the run breaches the limit. `--load-baseline` with `--load-max-regression` does the same for a run worse than a saved one. See [Thresholds](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/load-testing.md#thresholds) and [Comparing against a baseline](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/load-testing.md#comparing-against-a-baseline).
191204 
192205```bash theme={null}
193206mcp-inspector --cli <server> --method tools/list --strict > /dev/null

docs/2026-07-28/tools/inspector/load-testing New page · 412 lines, new page

# Load testing ## In the web client ## From the command line ## The summary ## Watching a run ## Saving every call ## Varying the arguments ## Scenarios ## Stepped and ramped load ## Open loop ## When a run fails or stops ## Thresholds ## Comparing against a baseline ## Multiple sessions ## Session churn ## Notification fan-out ## Multiple generator processes ## On an mcpdo connection

A whole new page. There's nothing to diff it against, so here is what it says.

# Load testing

> Call a tool, or a weighted mix of tools, resources and prompts, repeatedly and concurrently from the web client, the CLI or mcpdo, and read the latency and error-rate summary

The Inspector can aim one of its own connections at a server and keep calling it, so you can see how the server behaves under concurrent or sustained traffic without rebuilding the connection's transport, headers and OAuth in a separate script. When the run ends, you get one latency and error-rate summary.

One engine runs behind three front ends, so the settings, their defaults and the summary fields mean the same thing in each:

| Client | How to start a run |
| - | - |
| [Web](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/web.md) | The **Load test** button on a tool, on the Tools screen. |
| [CLI](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/cli.md) | `--method tools/call --load`, which connects, runs and disconnects. |
| [mcpdo](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/mcpdo.md) | `tools/call --load` against an open connection, run inside the daemon. |

## In the web client

Select a tool on the Tools screen and choose **Load test**, beside **Execute Tool**. Each call sends the arguments currently in the tool's form, so fill those in first. Placeholders such as `{{seq}}` in a value are filled in per call (see [Varying the arguments](#varying-the-arguments)).

![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/load-test-button.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=f5a43de3b4e2fe091e6c5a0491929731)

The Load test button beside Execute Tool. This form's message, load \{\{seq}}, gives each call a distinct value.

The panel loads either the selected tool or a pasted [scenario](#scenarios). Set the concurrency, the rate (empty for as fast as possible), the duration or request count, and a warm-up, or give comma-separated **Steps** to run [stepped load](#stepped-and-ramped-load) by concurrency or by rate. Then choose **Start**.

![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/load-test-form.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=bd6b4d040987eec16588bdd6cb95e771)

The form, set for 10 calls in flight at 40 calls per second for 6 seconds, after a 1-second warm-up.

While the run goes, a progress line shows the calls so far and the latest p50 and p99. **Stop** ends the run early.

![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/load-test-running.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=f078cfcc490ade4db845207d3bcdaf3a)

A run in progress.

When the run ends, the summary renders as tables: an overview of counts and rates, the latency percentiles of the successful and failed calls, and the warm-up, steps, stages and error messages when the run has them. The fields are the same ones the command line reports, described in [The summary](#the-summary).

![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/load-test-summary.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=1493229de8e0ae2ae06e87726f18bc33)

The summary of that run: every call succeeded, and the target rate of 40 calls per second was met with no dropped slots.

![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/load-test-scenario-stages.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=2e7be20ec8319f423ef95c3b4fbd53ce)

A two-step scenario stepped over concurrency 2, 4 and 8. The get\_temp step omits a required argument, so it fails every call, which shows the per-step rows, the per-stage rows and the error tally.

The run happens in the browser rather than on the backend, because the connection being inspected, with its transport, OAuth tokens, headers and negotiated era, lives in the tab. Every call therefore crosses the browser-to-backend hop, and the page records each call in the monitoring sidebar, so latencies include both. Close the sidebar for figures that measure the server rather than the page.

## From the command line

The same runs, from the CLI and from mcpdo:

```bash theme={null}
# 20 calls in flight for 30 seconds
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --tool-arg query=mcp --load --load-concurrency 20 --load-duration 30

# exactly 500 calls, started at no more than 50 per second
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --tool-arg query=mcp --load --load-requests 500 --load-rate 50

# the first run again, on an open mcpdo connection
mcpdo @my-server tools/call search query:=mcp --load --load-concurrency 20 --load-duration 30
```

| Flag | Meaning |
| - | - |
| `--load` | Load-test the tool instead of calling it once. Requires `--method tools/call` and `--tool-name <name>` (or a [scenario](#scenarios)). |
| `--load-concurrency <n>` | The most calls in flight at once (default `10`). |
| `--load-duration <sec>` | Stop *starting* calls after this many seconds. Calls already in flight still finish. Default `10` when `--load-requests` is not set. |
| `--load-requests <n>` | Stop after starting this many calls. With `--load-duration` too, whichever is reached first ends the run. |
| `--load-rate <n>` | Start at most this many calls per second across all workers, spaced evenly (default unlimited). |
| `--load-progress <sec>` | How often to print a progress line on stderr (default `5`). See [Watching a run](#watching-a-run). |
| `--load-interval <sec>` | Also report the run as a time series of buckets this long. |
| `--load-warmup <sec>` | Run this long first, at the same concurrency and rate, and leave those calls out of every figure. |

The other `--load-*` flags shape the traffic or judge the result, and each group is covered below:

| Topic | Flags |
| - | - |
| [Varying the arguments](#varying-the-arguments) | `--load-args-file`, `--load-args-random`, and placeholders in argument values |
| [Scenarios](#scenarios) | `--load-scenario` |
| [Stepped and ramped load](#stepped-and-ramped-load) | `--load-steps`, `--load-ramp`, `--load-step-by`, `--load-step-duration`, `--load-stop-on-breach` |
| [Open loop](#open-loop) | `--load-open-loop` |
| [Saving every call](#saving-every-call) | `--output` (CLI only) |
| [Thresholds](#thresholds) | `--load-max-error-rate`, `--load-max-p50`, `--load-max-p95`, `--load-max-p99`, `--load-min-throughput` |
| [Comparing against a baseline](#comparing-against-a-baseline) | `--load-baseline`, `--load-max-regression` |
| [Multiple sessions](#multiple-sessions) | `--load-connections` |
| [Session churn](#session-churn) | `--load-churn`, `--load-churn-calls` |
| [Notification fan-out](#notification-fan-out) | `--load-subscribe`, `--load-subscribers`, `--load-subscribe-wait` |
| [Multiple generator processes](#multiple-generator-processes) | `--load-workers` (CLI only) |

Each `--load-*` flag requires `--load`. In the CLI, `--load` is rejected with any method other than `tools/call`, and with `--app-info`, `--output-format`, `--list-stored-auth` and `--print-handoff`. Each of those mistakes, and each pair of `--load-*` flags that cannot be combined, exits `1` with the envelope `code` `load_flag_conflict`.

## The summary

The [web client](#in-the-web-client) shows the summary as tables. On the command line it goes to stdout in one of three shapes:

* **`--format text`, or no `--format` when stdout is a terminal:** a short, readable table, in colour unless `NO_COLOR` is set. mcpdo prints the same one.
* **`--format json`:** the summary wrapped in `{ "result": … }`.
* **No `--format` when stdout is a pipe or a file:** the bare summary as pretty-printed JSON, so scripts written against earlier releases keep working. Pass `--format json` to be explicit.

The JSON summary looks like this:

```json theme={null}
{
  "tool": "search",
  "concurrency": 20,
  "durationMs": 30000,
  "requests": 41210,
  "ok": 41187,
  "toolErrors": 0,
  "errors": 23,
  "errorRate": 0.0006,
  "elapsedMs": 30012.4,
  "throughput": 1373.12,
  "okThroughput": 1372.35,
  "latencyMs": {
    "min": 2.1,
    "mean": 14.5,
    "p50": 12.9,
    "p90": 22.4,
    "p95": 30.7,
    "p99": 61.3,
    "p999": 140.2,
    "max": 212.8
  },
  "errorLatencyMs": {
    "min": 30001.2,
    "mean": 30003.1,
    "p50": 30002.9,
    "p90": 30004.1,
    "p95": 30004.6,
    "p99": 30004.8,
    "p999": 30004.8,
    "max": 30004.8
  },
  "errorMessages": [{ "message": "Request timed out", "count": 23 }],
  "toolErrorMessages": []
}
```

* **`toolErrors`** counts results that carry `isError: true`, meaning the tool ran and reported a failure. **`errors`** counts calls that never produced a result, such as protocol errors, request timeouts or a dropped connection. `errorRate` is both together over `requests`, rounded to four places.
* **`errorMessages`** groups the thrown messages by frequency. It keeps the first ten distinct messages and counts any others under `(other)`. **`toolErrorMessages`** does the same for `isError` results, using the first text block of each, cut to 200 characters, so a run where every call returned `rate limited` says so.
* **Latency** is measured per call on the client, in milliseconds. `latencyMs` covers the successful calls only, and `errorLatencyMs` covers the failed ones, so failures that return instantly can't make a struggling server look fast. Either is `null` when it has no calls. `throughput` counts every completed call per second, and `okThroughput` counts only the successful ones.
* **Percentiles** are `p50`, `p90`, `p95`, `p99` and `p999` (the 99.9th), by nearest rank. Memory stays bounded however long the run: the first 10,000 latencies of each kind are kept exactly, so a short run's percentiles are exact, and later ones fold into a histogram whose percentiles are within 1% of the exact value. `min`, `max` and `mean` are always exact.
* **`plannedStarts`, `droppedSlots` and `achievedRate`** appear only with `--load-rate`. Starts follow an even `1/rate` grid. A slot missed because every worker was busy is dropped rather than made up later, so a stall is never followed by a burst. A server too slow for the target rate can then report healthy latency while most of the planned load never ran, so when fewer than 90% of `plannedStarts` were started, a warning goes to stderr (dropped by `--quiet`). Raise `--load-concurrency`, lower the rate, or switch to [open loop](#open-loop). Rates in the high hundreds per second and above are reached only approximately.
* **`stoppedEarly`** appears when the run ended before its bounds, with a `reason` and a `detail`. See [When a run fails or stops](#when-a-run-fails-or-stops).
* **Other blocks** appear only when the mode that fills them is on: `steps` for a scenario, `stages` for a stepped run, `intervals` and `warmup` for those flags, `openLoop`, `connections`, `churn`, `fanout` and `workers`. A default run's summary has none of them.

`--load-duration` stops new calls, but calls in flight are allowed to finish, so `elapsedMs` can exceed the window by up to one call. A run that reaches its `--load-duration` is measured over that whole window at least, so a `--load-rate 1` run over five seconds reports 1 call per second. Each call is still bounded by the server's request timeout (`requestTimeout` in the catalog or config file).

## Watching a run

* **Progress.** Every `--load-progress` seconds a line goes to stderr with the totals so far, plus the completion rate and the p50 and p99 of the successful calls over the last interval, such as `[load 12.0s] 1234 calls (1230 ok, 4 failed), 102.3/s, p50 12.1 / p99 40.2 ms`. It is prefixed `warm-up` during a warm-up and `stage N` in a stepped run. `--quiet` turns it off, and it never reaches stdout.
* **Time series.** `--load-interval <sec>` adds an `intervals` array: the run's calls bucketed by completion time, one entry per interval with empty ones included, so a GC pause or a slow leak in the middle of a run shows instead of averaging away. Each entry has `startMs` and `endMs`, then the same counts, rates, latencies and message tallies as the totals.
* **Warm-up.** `--load-warmup <sec>` runs that long first, over the same connections, and leaves those calls out of every figure. `--load-duration` and `--load-requests` bound the measured part only, and `warmup` reports what the warm-up ran. If the warm-up stops early, the run ends there and nothing is measured. It is refused with `--load-steps` and `--load-ramp`, where the first stage already plays that part.

## Saving every call

In the CLI, with `--load`, `--output <path>` writes one NDJSON line per measured call, for analysis the summary can't do: your own histogram, a scatter over time, or a join against server logs. The summary still goes to stdout.

```json theme={null}
{"seq":17,"worker":3,"startMs":412.5,"latencyMs":14.218,"outcome":"ok"}
{"seq":18,"worker":0,"startMs":415.02,"latencyMs":30001.4,"outcome":"error","message":"Request timed out"}
```

* `seq` is the run-wide call number and `worker` is the worker that made the call. `startMs` is measured from the start of the run, or of the stage in a stepped run.
* `outcome` is `ok`, `tool_error` (with the result's text as `message`) or `error` (with the thrown message). A scenario adds `step`, and a stepped run adds `stage`.
* Lines are in completion order. Warm-up calls are not written.
* `--output-format` is refused with `--load`. A file that can't be written exits `1` (`output_write_failed`) after the summary is printed.

## Varying the arguments

A server that caches results or dedupes identical requests looks far faster under one fixed argument than under real traffic. Two ways to vary each call's arguments can be used together:

```bash theme={null}
# a distinct id per call, and a random page from 1 to 50
mcp-inspector --cli <server> --method tools/call --tool-name lookup \
  --tool-arg id=user-{{seq}} --tool-arg page={{rand:1-50}} --load --load-requests 1000

# one argument object per line of args.ndjson, in turn
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --load --load-args-file args.ndjson --load-duration 30
```

**Placeholders** work in any string value of a call's arguments (`--tool-arg`, `--tool-args-json`, an args-file row, and a scenario step's `args` and `uri`), and only in a `--load` run:

| Placeholder | Becomes |
| - | - |
| `{{seq}}` | The call's number in start order, from `1`. |
| `{{worker}}` | The index of the worker making it, from `0`. |
| `{{uuid}}` | A fresh random UUID (v4). |
| `{{rand:<min>-<max>}}` | A random integer from `min` to `max`, inclusive. |

A value that is exactly one numeric placeholder, like `page={{rand:1-50}}`, is sent as a number, so an integer-typed argument receives an integer. A placeholder inside other text, like `user-{{seq}}`, yields a string. Anything else in double braces is sent as written, so an argument that is itself a template is untouched. A `{{rand:…}}` with reversed or out-of-range bounds exits `1` (`load_args_invalid`) before anything connects.

**`--load-args-file <file>`** is NDJSON, one JSON object per line. Each call takes the next row in turn (or a random one with `--load-args-random`), cycling, and merges it over the `--tool-arg` and `--tool-args-json` arguments, with the row winning on a shared key. Placeholders inside a row are substituted too. A file that can't be read, or a line that isn't a JSON object, exits `1` (`load_args_invalid`). It can't be combined with `--load-scenario`, whose steps carry their own `args`.

## Scenarios

Real traffic is rarely one tool with fixed arguments. `--load-scenario <file>` runs a weighted mix of `tools/call`, `resources/read` and `prompts/get` steps over the same connections and bounds:

```json theme={null}
{
  "steps": [
    {
      "name": "search",
      "method": "tools/call",
      "tool": "search",
      "args": { "query": "mcp" },
      "weight": 7
    },
    { "method": "resources/read", "uri": "docs://readme", "weight": 2 },
    {
      "method": "prompts/get",
      "prompt": "summarize",
      "args": { "style": "short" },
      "weight": 1
    }
  ]
}
```

```bash theme={null}
mcp-inspector --cli <server> --method tools/call \
  --load --load-scenario scenario.json --load-duration 30 --load-concurrency 20
```

* **The file** is that object or a bare array of steps. Each step has a `method` and what it calls (`tool`, `uri` or `prompt`), plus optional `args` (tools and prompts), `meta` (the request's `_meta`), `weight` (a positive number, default `1`) and `name`. Any other key is an error, so a typo such as `"argument"` fails the run instead of silently sending no arguments. Every problem with the file exits `1` (`load_scenario_invalid`) before anything connects.
* **The mix is exact, not random.** Steps are picked by smooth weighted round-robin, so weights `7:2:1` start exactly 7, 2 and 1 calls in every 10, interleaved, and two runs of the same scenario are comparable.
* **The summary** keeps its totals at the top level, so the thresholds judge the whole mix, and adds a `steps` array with each step's `name`, `method`, `target` and `weight` followed by the same counts, rates, latencies and messages as the totals, for that step alone.
* **Tools are checked up front; resources and prompts are not.** A missing tool exits `5` (`tool_not_found`) before the clock starts. A server may serve URIs or prompts it doesn't list, so a bad one shows up as that step's `errors`.
* `--load-scenario` replaces `--tool-name`, `--tool-arg`, `--tool-args-json` and `--tool-metadata`, so combining it with any of them is refused. `--method tools/call` is still required, since it selects the load mode.

## Stepped and ramped load

One concurrency or rate shows how a server behaves at one load level. To find where latency or errors start climbing, run consecutive stages at rising levels in one run, with one summary row per stage:

```bash theme={null}
# concurrency 10, 25, 50, then 100, 30 seconds each
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --tool-arg query=mcp --load --load-steps 10,25,50,100 --load-step-duration 30

# rate from 50/s to 500/s over two minutes in 10 s stairs, over 200 workers,
# stopping at the first stage whose p99 tops 250 ms
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --tool-arg query=mcp --load --load-ramp 50:500:120 --load-step-duration 10 \
  --load-step-by rate --load-concurrency 200 --load-max-p99 250 --load-stop-on-breach
```

* **`--load-steps <list>`** runs one stage per level. **`--load-ramp <from>:<to>:<sec>`** is a staircase of `sec / --load-step-duration` stages with levels spaced evenly from `from` to `to`, both included. Stairs rather than a continuous ramp give every level enough time to measure and a row of its own.
* **`--load-step-by`** says what a level sets. `concurrency` (the default) is calls in flight, so `--load-concurrency` is refused. `rate` is calls started per second over a fixed pool of `--load-concurrency` workers, so `--load-rate` is refused.
* **Each stage runs for `--load-step-duration`** seconds (default `10`), so `--load-duration` and `--load-requests` are refused. Connections are opened once and serve every stage.
* **The summary** keeps its totals at the top level, across every stage, and adds a `stages` array with one full summary per stage that ran, each carrying `stage`, `stepBy` and `level`.
* **Any early stop ends the run.** With `--load-stop-on-breach`, which needs a [threshold](#thresholds), so does the first stage that breaches one, with `stoppedEarly.reason` `threshold_breached`. Without it every stage runs, and the run still exits `10` if any stage breached.

## Open loop

By default `--load-rate` is closed-loop: a slot that no worker is free to take is dropped, so a server too slow for the rate is sent fewer requests and its latency looks healthier than its users would see. `--load-open-loop` keeps the rate grid as the arrival schedule instead:

* **No slot is dropped while the run lasts.** A slot that comes due while every worker is busy waits, and starts as soon as one frees.
* **Each call is timed from its scheduled start**, so the wait for a worker counts in its latency, and queueing behind a slow server shows in `latencyMs`.
* `--load-concurrency` still caps the calls in flight. Slots still waiting when the window closes are reported in `droppedSlots`, and the summary carries `"openLoop": true`.
* It needs `--load-rate`, or `--load-step-by rate`, whose stages then all run open loop.

## When a run fails or stops

The tool is looked up once before the clock starts, so a missing tool exits `5` instead of reporting a 100% error rate. Otherwise a completed run exits `0` whatever its error rate, because the summary is the result, unless a [threshold](#thresholds) is set.

A server that dies mid-run would otherwise turn the rest of the window into thousands of instant failures, so the run stops early once 50 calls in a row have thrown, or calls have done nothing but throw for a full second. Only thrown calls count: a tool error is the server answering. The summary covers what completed and carries `"stoppedEarly": { "reason": "consecutive_errors" }`, with a warning on stderr. The exit code is unchanged.

The first Ctrl+C or SIGTERM stops new calls, lets the in-flight ones finish, prints the summary of what completed with `stoppedEarly.reason` `interrupted`, and exits `130` (envelope `code` `interrupted`) without checking any threshold. A second Ctrl+C exits `130` immediately.

A load run does not prompt for OAuth step-up. A tool that needs scopes the session lacks fails every call, and the challenge shows in `errorMessages`. Run one plain `tools/call` of the tool first to grant the scopes, then load it.

## Thresholds

Set a threshold to gate a CI job on the run without parsing the summary:

```bash theme={null}
# fail the job if more than 1% of calls fail, or p99 is above 250 ms
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --tool-arg query=mcp --load --load-requests 1000 \
  --load-max-error-rate 0.01 --load-max-p99 250
```

| Flag | Exits `10` when | Envelope `code` |
| - | - | - |
| `--load-max-error-rate <fraction>` | The share of failed calls is above this value (`0` to `1`). | `load_error_rate_exceeded` |
| `--load-max-p50 <ms>` | The p50 latency of the successful calls is above this many milliseconds. | `load_p50_exceeded` |
| `--load-max-p95 <ms>` | The same, for p95. | `load_p95_exceeded` |
| `--load-max-p99 <ms>` | The same, for p99. | `load_p99_exceeded` |
| `--load-min-throughput <n>` | Fewer than this many calls per second succeeded (`okThroughput`). | `load_throughput_below` |

* The full summary prints first either way. A breach then exits `10` with an error envelope on stderr. When several are breached, the message lists them all and the `code` names the first in the table's order.
* A value equal to the threshold passes. The error-rate check uses the exact share of failed calls (`toolErrors` plus `errors`, over `requests`), not the rounded `errorRate`, so `--load-max-error-rate 0` fails on a single failure.
* The latency checks judge the successful calls, so a run where half the calls fail instantly can't pass on the speed of its failures. A run where no call succeeded has no latency to compare, and fails. `--load-min-throughput` likewise counts only successful calls.
* A [stepped run](#stepped-and-ramped-load) is judged stage by stage, and the message names the first stage that breached.

## Comparing against a baseline

Cut at 300 lines. The page has the rest.

docs/2026-07-28/tools/inspector/mcpdo Changed · +12 / -1 lines

## Load testing

from line 78
7878 
7979A connection runs **one call at a time**. Commands against it from other shells queue behind the call in flight, and while a call is parked on an [elicitation](#elicitation), new calls on that connection are refused until it is answered. A long call does not block other connections.
8080 
81`tools/call` also accepts the one-shot CLI's `--load` family (`--load`, `--load-concurrency`, `--load-connections`, `--load-duration`, `--load-requests`, `--load-rate`, `--load-max-error-rate`, `--load-max-p99`), with the same defaults and the same summary, run inside the daemon against the connection (see [CI gates](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/cli.md#ci-gates)). `--load-connections` opens its extra sessions with stored credentials only. Later commands on the connection wait until the run ends.
81`tools/call --load` load-tests a tool over the connection. See [Load testing](#load-testing).
8282 
8383## Tasks
8484 
from line 89
8989```
9090 
9191If the task reaches `input_required`, its question is handled like any other [elicitation](#elicitation).
92 
93## Load testing
94 
95`tools/call --load` is the one-shot CLI's load mode, run against an open connection, with the same flags, defaults, thresholds and summary fields.
96 
97```bash theme={null}
98# 20 calls in flight for 30 seconds
99mcpdo @my-server tools/call search query:=mcp --load --load-concurrency 20 --load-duration 30
100```
101 
102The run happens inside the daemon, so later commands on the same connection wait for it, and Ctrl+C cancels the in-flight calls and prints no summary. [Load testing](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/load-testing.md#on-an-mcpdo-connection) covers how a run behaves on a daemon connection, and the rest of that page covers every flag and field.
92103 
93104## Output
94105 

docs/2026-07-28/tools/inspector/web Changed · +38 / -3 lines

## Active sessions ### Load testing

from line 62
6262 
6363The monitoring sidebar pinned beside the Tools screen and dragged to its full width, with the tool call's request and response expanded in the Protocol stream.
6464 
65## Active sessions
66 
67The web backend holds each connection open as a session, and a session can outlive the tab that opened it. When a tab closes or reloads, the backend keeps the session for 60 seconds, so that a reload or an OAuth redirect can pick it back up, and then closes it, ending a stdio server process with it. **Active Sessions** lists every session the backend holds, from every tab, so you can find one that outlived its tab, or one whose server crashed, and end it without restarting the Inspector.
68 
69Open it with the **Active sessions** button in the header, between the disconnect button and **Client settings**.
70 
71![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/web-active-sessions-button.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=5291d737091f15eccad9ada04689ba75)
72 
73The Active sessions button, the network icon in the header between the disconnect and Client settings buttons.
74 
75Each row shows the server and its session ID, the transport, the status, when the session was created, when a tab was last attached to it (`now`, or `never`), and how many events are queued for a tab to collect.
76 
77| Status | Meaning |
78| - | - |
79| **This tab** | The session this tab is using. It also shows **Attached**. |
80| **Attached** | A tab is connected to the session now. |
81| **Detached** | No tab is attached. Events queue until a tab reattaches or the backend closes it. |
82| **Closed** | The session's transport has died, such as a stdio server process that exited or crashed. |
83 
84![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/web-active-sessions.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=8e635a422faaefb526729b731c15fe51)
85 
86Sessions from a closed tab, another open tab, a browser that never opened its stream, a crashed server, and this tab.
87 
88**Terminate** closes the session's connection, which ends its stdio server process, and drops it from the list. A tab still attached to it is told that the connection was terminated. The refresh button re-reads the list.
89 
90![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/web-active-sessions-terminated.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=04363e9b2e14a3fa92e01e5ecc89390b)
91 
92The same list after terminating the session the other open tab was using.
93 
94The list and the terminate action are backend routes, `GET /api/mcp/sessions` and `DELETE /api/mcp/sessions/<id>`, and like every other `/api` route they require the [session token](#the-session-token).
95 
6596## Servers
6697 
6798The Servers screen is the entry point. A server row carries its transport, its connection state, and a control that opens its per-server settings.
from line 130
99130 
100131On modern-era servers this screen also shows mirrored `Mcp-Param-*` headers, excluded tools, and distinct `-32602` error panels, all covered in [Protocol eras](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/protocol-eras.md#tools-mirrored-headers-and-excluded-tools).
101132 
102![](https://mintcdn.com/mcp/gk28X8wi_tbRYzej/images/inspector/web-tools.png?fit=max\&auto=format\&n=gk28X8wi_tbRYzej\&q=85\&s=7ef469a969f398ac0ec70cf019c133da)
133![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/web-tools.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=2a49f6d49cec4fba8d693bd87692ad9b)
103134 
104A tool call and its rendered result. The argument form collapses into the result panel once the call returns.
135A selected tool's input schema rendered as a form, with its required city and units arguments filled in, ready to execute or load test.
136 
137### Load testing
138 
139A tool's **Load test** button, beside **Execute Tool**, opens a panel that calls the tool, or a pasted scenario, repeatedly and concurrently over this tab's connection, then shows a latency and error-rate summary. See [Load testing](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/load-testing.md#in-the-web-client).
105140 
106141## Resources
107142 

docs/draft/tools/inspector Changed · +5 / -0 lines

from line 148
148148>
149149> Connect once, then run many commands against a named connection.
150150 
151> [card] [Load testing](https://modelcontextprotocol.io/docs/draft/tools/inspector/load-testing.md)
152>
153> Concurrent and sustained load from the web client, the CLI, or mcpdo, with
154> CI thresholds and baselines.
155 
151156> [card] [Security](https://modelcontextprotocol.io/docs/draft/tools/inspector/security.md)
152157>
153158> The threat model: the web backend's token, Docker, secret storage, stdio

docs/draft/tools/inspector/cli Changed · +16 / -3 lines

## Load testing a tool

from line 53
5353| - | - | - |
5454| `initialize` | None | Connect-only probe: `{serverInfo, protocolVersion, capabilities, instructions}`. |
5555| `tools/list` | None | `--strict` turns its schema portability check into a gate (see [CI gates](#ci-gates)). |
56| `tools/call` | `--tool-name`, plus optional `--tool-arg` / `--tool-args-json` | |
56| `tools/call` | `--tool-name`, plus optional `--tool-arg` / `--tool-args-json` | `--load` calls it repeatedly (see [Load testing](https://modelcontextprotocol.io/docs/draft/tools/inspector/load-testing.md)). |
5757| `resources/list` | None | |
5858| `resources/read` | `--uri` | |
5959| `resources/templates/list` | None | |
from line 118
118118> `--format`; `--format json` reshapes only the single-tool output of
119119> `tools/call --app-info`.
120120 
121## Load testing a tool
122 
123`--load` calls one tool, or a weighted mix of tools, resources and prompts, repeatedly and concurrently, and prints a latency and error-rate summary in place of a result. [Load testing](https://modelcontextprotocol.io/docs/draft/tools/inspector/load-testing.md) covers every flag, the summary's fields, thresholds for CI and the other run modes.
124 
125```bash theme={null}
126# 20 calls in flight for 30 seconds; fail the job if p99 is above 250 ms
127mcp-inspector --cli <server> --method tools/call --tool-name search \
128 --tool-arg query=mcp --load --load-concurrency 20 --load-duration 30 --load-max-p99 250
129```
130 
131A completed run exits `0` whatever its error rate, unless a threshold or baseline is set, which exits `10` on a breach. Ctrl+C prints the summary of what completed and exits `130`.
132 
121133## Exit codes and error envelopes
122134 
123135Every non-zero exit maps to a stable failure class, so a caller can branch on *why* without scraping prose:
from line 146
134146| `7` | `--verify` found a skill that violates SEP-2640 (conformance, digest, or size mismatch). |
135147| `8` | `--verify` couldn't check every skill within its read bounds. |
136148| `9` | `--verify --require-digests` found a skill that advertises no digests. |
137| `10` | A `--load` run breached a `--load-max-error-rate` or `--load-max-p99` threshold. The summary is printed first, and the envelope `code` names the threshold: `load_error_rate_exceeded` or `load_p99_exceeded`. |
149| `10` | A `--load` run breached a [threshold](https://modelcontextprotocol.io/docs/draft/tools/inspector/load-testing.md#thresholds) or its [baseline](https://modelcontextprotocol.io/docs/draft/tools/inspector/load-testing.md#comparing-against-a-baseline) budget. The summary is printed first, and the envelope `code` names the check, such as `load_p99_exceeded` or `load_regression`. |
138150| `11` | The server answered HTTP 429 (envelope `code` `rate_limited`). The envelope also carries `method`, plus `retryAfter` (the `Retry-After` header as sent) and `retryAfterMs` when the server sent one that parses. |
151| `130` | A `--load` run was interrupted by Ctrl+C or SIGTERM (envelope `code` `interrupted`). The summary of what completed is printed first. |
139152 
140153On any non-zero exit the CLI also writes a **single JSON line to stderr**:
141154 
from line 200
187200* `--strict` (with `tools/list`): reports tool-schema portability problems in full on stderr (path, issue, suggested fix) and exits `6` if any is error-severity. Without it, `tools/list` prints only a one-line count. Under `--format json` the findings are folded into the output as `schemaFindings`.
188201* `--verify` (with `skills/list` or `skills/get`): runs the SEP-2640 conformance and digest checks, writes one JSON report per skill on stdout, and exits `7` on a violation or `8` when the read bounds stopped it before every skill was checked. `--skill-catalog-max-skills` and `--skill-catalog-max-bytes` set those bounds.
189202* `--require-digests` (with `--verify`): exits `9` for a skill that advertises no digests, instead of reporting it as unverifiable and exiting `0`.
190* `--load-max-error-rate <fraction>` and `--load-max-p99 <ms>` (with `--load`): turn a load run into a gate. The run prints its summary, then exits `10` when the share of failed calls is above the fraction (`0` to `1`, so `0` fails on any failed call), when the p99 latency is above the given milliseconds, or when no call completed. `--load` (with `tools/call --tool-name`) calls the tool repeatedly and concurrently and prints a latency and error-rate summary instead of a result, bounded by `--load-duration <sec>` (default `10` when `--load-requests` is not set) and `--load-requests <n>`, with in-flight calls still finishing. `--load-concurrency <n>` (default `10`) caps the calls in flight, `--load-connections <n>` (default `1`, at most `--load-concurrency`, HTTP and SSE servers only) spreads them over independent sessions opened before timing starts, and `--load-rate <n>` (default unlimited) caps the calls started per second.
203* `--load-max-error-rate`, `--load-max-p50`, `--load-max-p95`, `--load-max-p99` and `--load-min-throughput` (with `--load`): print the load run's summary, then exit `10` when the run breaches the limit. `--load-baseline` with `--load-max-regression` does the same for a run worse than a saved one. See [Thresholds](https://modelcontextprotocol.io/docs/draft/tools/inspector/load-testing.md#thresholds) and [Comparing against a baseline](https://modelcontextprotocol.io/docs/draft/tools/inspector/load-testing.md#comparing-against-a-baseline).
191204 
192205```bash theme={null}
193206mcp-inspector --cli <server> --method tools/list --strict > /dev/null

docs/draft/tools/inspector/load-testing New page · 412 lines, new page

# Load testing ## In the web client ## From the command line ## The summary ## Watching a run ## Saving every call ## Varying the arguments ## Scenarios ## Stepped and ramped load ## Open loop ## When a run fails or stops ## Thresholds ## Comparing against a baseline ## Multiple sessions ## Session churn ## Notification fan-out ## Multiple generator processes ## On an mcpdo connection

A whole new page. There's nothing to diff it against, so here is what it says.

# Load testing

> Call a tool, or a weighted mix of tools, resources and prompts, repeatedly and concurrently from the web client, the CLI or mcpdo, and read the latency and error-rate summary

The Inspector can aim one of its own connections at a server and keep calling it, so you can see how the server behaves under concurrent or sustained traffic without rebuilding the connection's transport, headers and OAuth in a separate script. When the run ends, you get one latency and error-rate summary.

One engine runs behind three front ends, so the settings, their defaults and the summary fields mean the same thing in each:

| Client | How to start a run |
| - | - |
| [Web](https://modelcontextprotocol.io/docs/draft/tools/inspector/web.md) | The **Load test** button on a tool, on the Tools screen. |
| [CLI](https://modelcontextprotocol.io/docs/draft/tools/inspector/cli.md) | `--method tools/call --load`, which connects, runs and disconnects. |
| [mcpdo](https://modelcontextprotocol.io/docs/draft/tools/inspector/mcpdo.md) | `tools/call --load` against an open connection, run inside the daemon. |

## In the web client

Select a tool on the Tools screen and choose **Load test**, beside **Execute Tool**. Each call sends the arguments currently in the tool's form, so fill those in first. Placeholders such as `{{seq}}` in a value are filled in per call (see [Varying the arguments](#varying-the-arguments)).

![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/load-test-button.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=f5a43de3b4e2fe091e6c5a0491929731)

The Load test button beside Execute Tool. This form's message, load \{\{seq}}, gives each call a distinct value.

The panel loads either the selected tool or a pasted [scenario](#scenarios). Set the concurrency, the rate (empty for as fast as possible), the duration or request count, and a warm-up, or give comma-separated **Steps** to run [stepped load](#stepped-and-ramped-load) by concurrency or by rate. Then choose **Start**.

![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/load-test-form.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=bd6b4d040987eec16588bdd6cb95e771)

The form, set for 10 calls in flight at 40 calls per second for 6 seconds, after a 1-second warm-up.

While the run goes, a progress line shows the calls so far and the latest p50 and p99. **Stop** ends the run early.

![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/load-test-running.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=f078cfcc490ade4db845207d3bcdaf3a)

A run in progress.

When the run ends, the summary renders as tables: an overview of counts and rates, the latency percentiles of the successful and failed calls, and the warm-up, steps, stages and error messages when the run has them. The fields are the same ones the command line reports, described in [The summary](#the-summary).

![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/load-test-summary.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=1493229de8e0ae2ae06e87726f18bc33)

The summary of that run: every call succeeded, and the target rate of 40 calls per second was met with no dropped slots.

![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/load-test-scenario-stages.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=2e7be20ec8319f423ef95c3b4fbd53ce)

A two-step scenario stepped over concurrency 2, 4 and 8. The get\_temp step omits a required argument, so it fails every call, which shows the per-step rows, the per-stage rows and the error tally.

The run happens in the browser rather than on the backend, because the connection being inspected, with its transport, OAuth tokens, headers and negotiated era, lives in the tab. Every call therefore crosses the browser-to-backend hop, and the page records each call in the monitoring sidebar, so latencies include both. Close the sidebar for figures that measure the server rather than the page.

## From the command line

The same runs, from the CLI and from mcpdo:

```bash theme={null}
# 20 calls in flight for 30 seconds
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --tool-arg query=mcp --load --load-concurrency 20 --load-duration 30

# exactly 500 calls, started at no more than 50 per second
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --tool-arg query=mcp --load --load-requests 500 --load-rate 50

# the first run again, on an open mcpdo connection
mcpdo @my-server tools/call search query:=mcp --load --load-concurrency 20 --load-duration 30
```

| Flag | Meaning |
| - | - |
| `--load` | Load-test the tool instead of calling it once. Requires `--method tools/call` and `--tool-name <name>` (or a [scenario](#scenarios)). |
| `--load-concurrency <n>` | The most calls in flight at once (default `10`). |
| `--load-duration <sec>` | Stop *starting* calls after this many seconds. Calls already in flight still finish. Default `10` when `--load-requests` is not set. |
| `--load-requests <n>` | Stop after starting this many calls. With `--load-duration` too, whichever is reached first ends the run. |
| `--load-rate <n>` | Start at most this many calls per second across all workers, spaced evenly (default unlimited). |
| `--load-progress <sec>` | How often to print a progress line on stderr (default `5`). See [Watching a run](#watching-a-run). |
| `--load-interval <sec>` | Also report the run as a time series of buckets this long. |
| `--load-warmup <sec>` | Run this long first, at the same concurrency and rate, and leave those calls out of every figure. |

The other `--load-*` flags shape the traffic or judge the result, and each group is covered below:

| Topic | Flags |
| - | - |
| [Varying the arguments](#varying-the-arguments) | `--load-args-file`, `--load-args-random`, and placeholders in argument values |
| [Scenarios](#scenarios) | `--load-scenario` |
| [Stepped and ramped load](#stepped-and-ramped-load) | `--load-steps`, `--load-ramp`, `--load-step-by`, `--load-step-duration`, `--load-stop-on-breach` |
| [Open loop](#open-loop) | `--load-open-loop` |
| [Saving every call](#saving-every-call) | `--output` (CLI only) |
| [Thresholds](#thresholds) | `--load-max-error-rate`, `--load-max-p50`, `--load-max-p95`, `--load-max-p99`, `--load-min-throughput` |
| [Comparing against a baseline](#comparing-against-a-baseline) | `--load-baseline`, `--load-max-regression` |
| [Multiple sessions](#multiple-sessions) | `--load-connections` |
| [Session churn](#session-churn) | `--load-churn`, `--load-churn-calls` |
| [Notification fan-out](#notification-fan-out) | `--load-subscribe`, `--load-subscribers`, `--load-subscribe-wait` |
| [Multiple generator processes](#multiple-generator-processes) | `--load-workers` (CLI only) |

Each `--load-*` flag requires `--load`. In the CLI, `--load` is rejected with any method other than `tools/call`, and with `--app-info`, `--output-format`, `--list-stored-auth` and `--print-handoff`. Each of those mistakes, and each pair of `--load-*` flags that cannot be combined, exits `1` with the envelope `code` `load_flag_conflict`.

## The summary

The [web client](#in-the-web-client) shows the summary as tables. On the command line it goes to stdout in one of three shapes:

* **`--format text`, or no `--format` when stdout is a terminal:** a short, readable table, in colour unless `NO_COLOR` is set. mcpdo prints the same one.
* **`--format json`:** the summary wrapped in `{ "result": … }`.
* **No `--format` when stdout is a pipe or a file:** the bare summary as pretty-printed JSON, so scripts written against earlier releases keep working. Pass `--format json` to be explicit.

The JSON summary looks like this:

```json theme={null}
{
  "tool": "search",
  "concurrency": 20,
  "durationMs": 30000,
  "requests": 41210,
  "ok": 41187,
  "toolErrors": 0,
  "errors": 23,
  "errorRate": 0.0006,
  "elapsedMs": 30012.4,
  "throughput": 1373.12,
  "okThroughput": 1372.35,
  "latencyMs": {
    "min": 2.1,
    "mean": 14.5,
    "p50": 12.9,
    "p90": 22.4,
    "p95": 30.7,
    "p99": 61.3,
    "p999": 140.2,
    "max": 212.8
  },
  "errorLatencyMs": {
    "min": 30001.2,
    "mean": 30003.1,
    "p50": 30002.9,
    "p90": 30004.1,
    "p95": 30004.6,
    "p99": 30004.8,
    "p999": 30004.8,
    "max": 30004.8
  },
  "errorMessages": [{ "message": "Request timed out", "count": 23 }],
  "toolErrorMessages": []
}
```

* **`toolErrors`** counts results that carry `isError: true`, meaning the tool ran and reported a failure. **`errors`** counts calls that never produced a result, such as protocol errors, request timeouts or a dropped connection. `errorRate` is both together over `requests`, rounded to four places.
* **`errorMessages`** groups the thrown messages by frequency. It keeps the first ten distinct messages and counts any others under `(other)`. **`toolErrorMessages`** does the same for `isError` results, using the first text block of each, cut to 200 characters, so a run where every call returned `rate limited` says so.
* **Latency** is measured per call on the client, in milliseconds. `latencyMs` covers the successful calls only, and `errorLatencyMs` covers the failed ones, so failures that return instantly can't make a struggling server look fast. Either is `null` when it has no calls. `throughput` counts every completed call per second, and `okThroughput` counts only the successful ones.
* **Percentiles** are `p50`, `p90`, `p95`, `p99` and `p999` (the 99.9th), by nearest rank. Memory stays bounded however long the run: the first 10,000 latencies of each kind are kept exactly, so a short run's percentiles are exact, and later ones fold into a histogram whose percentiles are within 1% of the exact value. `min`, `max` and `mean` are always exact.
* **`plannedStarts`, `droppedSlots` and `achievedRate`** appear only with `--load-rate`. Starts follow an even `1/rate` grid. A slot missed because every worker was busy is dropped rather than made up later, so a stall is never followed by a burst. A server too slow for the target rate can then report healthy latency while most of the planned load never ran, so when fewer than 90% of `plannedStarts` were started, a warning goes to stderr (dropped by `--quiet`). Raise `--load-concurrency`, lower the rate, or switch to [open loop](#open-loop). Rates in the high hundreds per second and above are reached only approximately.
* **`stoppedEarly`** appears when the run ended before its bounds, with a `reason` and a `detail`. See [When a run fails or stops](#when-a-run-fails-or-stops).
* **Other blocks** appear only when the mode that fills them is on: `steps` for a scenario, `stages` for a stepped run, `intervals` and `warmup` for those flags, `openLoop`, `connections`, `churn`, `fanout` and `workers`. A default run's summary has none of them.

`--load-duration` stops new calls, but calls in flight are allowed to finish, so `elapsedMs` can exceed the window by up to one call. A run that reaches its `--load-duration` is measured over that whole window at least, so a `--load-rate 1` run over five seconds reports 1 call per second. Each call is still bounded by the server's request timeout (`requestTimeout` in the catalog or config file).

## Watching a run

* **Progress.** Every `--load-progress` seconds a line goes to stderr with the totals so far, plus the completion rate and the p50 and p99 of the successful calls over the last interval, such as `[load 12.0s] 1234 calls (1230 ok, 4 failed), 102.3/s, p50 12.1 / p99 40.2 ms`. It is prefixed `warm-up` during a warm-up and `stage N` in a stepped run. `--quiet` turns it off, and it never reaches stdout.
* **Time series.** `--load-interval <sec>` adds an `intervals` array: the run's calls bucketed by completion time, one entry per interval with empty ones included, so a GC pause or a slow leak in the middle of a run shows instead of averaging away. Each entry has `startMs` and `endMs`, then the same counts, rates, latencies and message tallies as the totals.
* **Warm-up.** `--load-warmup <sec>` runs that long first, over the same connections, and leaves those calls out of every figure. `--load-duration` and `--load-requests` bound the measured part only, and `warmup` reports what the warm-up ran. If the warm-up stops early, the run ends there and nothing is measured. It is refused with `--load-steps` and `--load-ramp`, where the first stage already plays that part.

## Saving every call

In the CLI, with `--load`, `--output <path>` writes one NDJSON line per measured call, for analysis the summary can't do: your own histogram, a scatter over time, or a join against server logs. The summary still goes to stdout.

```json theme={null}
{"seq":17,"worker":3,"startMs":412.5,"latencyMs":14.218,"outcome":"ok"}
{"seq":18,"worker":0,"startMs":415.02,"latencyMs":30001.4,"outcome":"error","message":"Request timed out"}
```

* `seq` is the run-wide call number and `worker` is the worker that made the call. `startMs` is measured from the start of the run, or of the stage in a stepped run.
* `outcome` is `ok`, `tool_error` (with the result's text as `message`) or `error` (with the thrown message). A scenario adds `step`, and a stepped run adds `stage`.
* Lines are in completion order. Warm-up calls are not written.
* `--output-format` is refused with `--load`. A file that can't be written exits `1` (`output_write_failed`) after the summary is printed.

## Varying the arguments

A server that caches results or dedupes identical requests looks far faster under one fixed argument than under real traffic. Two ways to vary each call's arguments can be used together:

```bash theme={null}
# a distinct id per call, and a random page from 1 to 50
mcp-inspector --cli <server> --method tools/call --tool-name lookup \
  --tool-arg id=user-{{seq}} --tool-arg page={{rand:1-50}} --load --load-requests 1000

# one argument object per line of args.ndjson, in turn
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --load --load-args-file args.ndjson --load-duration 30
```

**Placeholders** work in any string value of a call's arguments (`--tool-arg`, `--tool-args-json`, an args-file row, and a scenario step's `args` and `uri`), and only in a `--load` run:

| Placeholder | Becomes |
| - | - |
| `{{seq}}` | The call's number in start order, from `1`. |
| `{{worker}}` | The index of the worker making it, from `0`. |
| `{{uuid}}` | A fresh random UUID (v4). |
| `{{rand:<min>-<max>}}` | A random integer from `min` to `max`, inclusive. |

A value that is exactly one numeric placeholder, like `page={{rand:1-50}}`, is sent as a number, so an integer-typed argument receives an integer. A placeholder inside other text, like `user-{{seq}}`, yields a string. Anything else in double braces is sent as written, so an argument that is itself a template is untouched. A `{{rand:…}}` with reversed or out-of-range bounds exits `1` (`load_args_invalid`) before anything connects.

**`--load-args-file <file>`** is NDJSON, one JSON object per line. Each call takes the next row in turn (or a random one with `--load-args-random`), cycling, and merges it over the `--tool-arg` and `--tool-args-json` arguments, with the row winning on a shared key. Placeholders inside a row are substituted too. A file that can't be read, or a line that isn't a JSON object, exits `1` (`load_args_invalid`). It can't be combined with `--load-scenario`, whose steps carry their own `args`.

## Scenarios

Real traffic is rarely one tool with fixed arguments. `--load-scenario <file>` runs a weighted mix of `tools/call`, `resources/read` and `prompts/get` steps over the same connections and bounds:

```json theme={null}
{
  "steps": [
    {
      "name": "search",
      "method": "tools/call",
      "tool": "search",
      "args": { "query": "mcp" },
      "weight": 7
    },
    { "method": "resources/read", "uri": "docs://readme", "weight": 2 },
    {
      "method": "prompts/get",
      "prompt": "summarize",
      "args": { "style": "short" },
      "weight": 1
    }
  ]
}
```

```bash theme={null}
mcp-inspector --cli <server> --method tools/call \
  --load --load-scenario scenario.json --load-duration 30 --load-concurrency 20
```

* **The file** is that object or a bare array of steps. Each step has a `method` and what it calls (`tool`, `uri` or `prompt`), plus optional `args` (tools and prompts), `meta` (the request's `_meta`), `weight` (a positive number, default `1`) and `name`. Any other key is an error, so a typo such as `"argument"` fails the run instead of silently sending no arguments. Every problem with the file exits `1` (`load_scenario_invalid`) before anything connects.
* **The mix is exact, not random.** Steps are picked by smooth weighted round-robin, so weights `7:2:1` start exactly 7, 2 and 1 calls in every 10, interleaved, and two runs of the same scenario are comparable.
* **The summary** keeps its totals at the top level, so the thresholds judge the whole mix, and adds a `steps` array with each step's `name`, `method`, `target` and `weight` followed by the same counts, rates, latencies and messages as the totals, for that step alone.
* **Tools are checked up front; resources and prompts are not.** A missing tool exits `5` (`tool_not_found`) before the clock starts. A server may serve URIs or prompts it doesn't list, so a bad one shows up as that step's `errors`.
* `--load-scenario` replaces `--tool-name`, `--tool-arg`, `--tool-args-json` and `--tool-metadata`, so combining it with any of them is refused. `--method tools/call` is still required, since it selects the load mode.

## Stepped and ramped load

One concurrency or rate shows how a server behaves at one load level. To find where latency or errors start climbing, run consecutive stages at rising levels in one run, with one summary row per stage:

```bash theme={null}
# concurrency 10, 25, 50, then 100, 30 seconds each
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --tool-arg query=mcp --load --load-steps 10,25,50,100 --load-step-duration 30

# rate from 50/s to 500/s over two minutes in 10 s stairs, over 200 workers,
# stopping at the first stage whose p99 tops 250 ms
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --tool-arg query=mcp --load --load-ramp 50:500:120 --load-step-duration 10 \
  --load-step-by rate --load-concurrency 200 --load-max-p99 250 --load-stop-on-breach
```

* **`--load-steps <list>`** runs one stage per level. **`--load-ramp <from>:<to>:<sec>`** is a staircase of `sec / --load-step-duration` stages with levels spaced evenly from `from` to `to`, both included. Stairs rather than a continuous ramp give every level enough time to measure and a row of its own.
* **`--load-step-by`** says what a level sets. `concurrency` (the default) is calls in flight, so `--load-concurrency` is refused. `rate` is calls started per second over a fixed pool of `--load-concurrency` workers, so `--load-rate` is refused.
* **Each stage runs for `--load-step-duration`** seconds (default `10`), so `--load-duration` and `--load-requests` are refused. Connections are opened once and serve every stage.
* **The summary** keeps its totals at the top level, across every stage, and adds a `stages` array with one full summary per stage that ran, each carrying `stage`, `stepBy` and `level`.
* **Any early stop ends the run.** With `--load-stop-on-breach`, which needs a [threshold](#thresholds), so does the first stage that breaches one, with `stoppedEarly.reason` `threshold_breached`. Without it every stage runs, and the run still exits `10` if any stage breached.

## Open loop

By default `--load-rate` is closed-loop: a slot that no worker is free to take is dropped, so a server too slow for the rate is sent fewer requests and its latency looks healthier than its users would see. `--load-open-loop` keeps the rate grid as the arrival schedule instead:

* **No slot is dropped while the run lasts.** A slot that comes due while every worker is busy waits, and starts as soon as one frees.
* **Each call is timed from its scheduled start**, so the wait for a worker counts in its latency, and queueing behind a slow server shows in `latencyMs`.
* `--load-concurrency` still caps the calls in flight. Slots still waiting when the window closes are reported in `droppedSlots`, and the summary carries `"openLoop": true`.
* It needs `--load-rate`, or `--load-step-by rate`, whose stages then all run open loop.

## When a run fails or stops

The tool is looked up once before the clock starts, so a missing tool exits `5` instead of reporting a 100% error rate. Otherwise a completed run exits `0` whatever its error rate, because the summary is the result, unless a [threshold](#thresholds) is set.

A server that dies mid-run would otherwise turn the rest of the window into thousands of instant failures, so the run stops early once 50 calls in a row have thrown, or calls have done nothing but throw for a full second. Only thrown calls count: a tool error is the server answering. The summary covers what completed and carries `"stoppedEarly": { "reason": "consecutive_errors" }`, with a warning on stderr. The exit code is unchanged.

The first Ctrl+C or SIGTERM stops new calls, lets the in-flight ones finish, prints the summary of what completed with `stoppedEarly.reason` `interrupted`, and exits `130` (envelope `code` `interrupted`) without checking any threshold. A second Ctrl+C exits `130` immediately.

A load run does not prompt for OAuth step-up. A tool that needs scopes the session lacks fails every call, and the challenge shows in `errorMessages`. Run one plain `tools/call` of the tool first to grant the scopes, then load it.

## Thresholds

Set a threshold to gate a CI job on the run without parsing the summary:

```bash theme={null}
# fail the job if more than 1% of calls fail, or p99 is above 250 ms
mcp-inspector --cli <server> --method tools/call --tool-name search \
  --tool-arg query=mcp --load --load-requests 1000 \
  --load-max-error-rate 0.01 --load-max-p99 250
```

| Flag | Exits `10` when | Envelope `code` |
| - | - | - |
| `--load-max-error-rate <fraction>` | The share of failed calls is above this value (`0` to `1`). | `load_error_rate_exceeded` |
| `--load-max-p50 <ms>` | The p50 latency of the successful calls is above this many milliseconds. | `load_p50_exceeded` |
| `--load-max-p95 <ms>` | The same, for p95. | `load_p95_exceeded` |
| `--load-max-p99 <ms>` | The same, for p99. | `load_p99_exceeded` |
| `--load-min-throughput <n>` | Fewer than this many calls per second succeeded (`okThroughput`). | `load_throughput_below` |

* The full summary prints first either way. A breach then exits `10` with an error envelope on stderr. When several are breached, the message lists them all and the `code` names the first in the table's order.
* A value equal to the threshold passes. The error-rate check uses the exact share of failed calls (`toolErrors` plus `errors`, over `requests`), not the rounded `errorRate`, so `--load-max-error-rate 0` fails on a single failure.
* The latency checks judge the successful calls, so a run where half the calls fail instantly can't pass on the speed of its failures. A run where no call succeeded has no latency to compare, and fails. `--load-min-throughput` likewise counts only successful calls.
* A [stepped run](#stepped-and-ramped-load) is judged stage by stage, and the message names the first stage that breached.

## Comparing against a baseline

Cut at 300 lines. The page has the rest.

docs/draft/tools/inspector/mcpdo Changed · +12 / -1 lines

## Load testing

from line 78
7878 
7979A connection runs **one call at a time**. Commands against it from other shells queue behind the call in flight, and while a call is parked on an [elicitation](#elicitation), new calls on that connection are refused until it is answered. A long call does not block other connections.
8080 
81`tools/call` also accepts the one-shot CLI's `--load` family (`--load`, `--load-concurrency`, `--load-connections`, `--load-duration`, `--load-requests`, `--load-rate`, `--load-max-error-rate`, `--load-max-p99`), with the same defaults and the same summary, run inside the daemon against the connection (see [CI gates](https://modelcontextprotocol.io/docs/draft/tools/inspector/cli.md#ci-gates)). `--load-connections` opens its extra sessions with stored credentials only. Later commands on the connection wait until the run ends.
81`tools/call --load` load-tests a tool over the connection. See [Load testing](#load-testing).
8282 
8383## Tasks
8484 
from line 89
8989```
9090 
9191If the task reaches `input_required`, its question is handled like any other [elicitation](#elicitation).
92 
93## Load testing
94 
95`tools/call --load` is the one-shot CLI's load mode, run against an open connection, with the same flags, defaults, thresholds and summary fields.
96 
97```bash theme={null}
98# 20 calls in flight for 30 seconds
99mcpdo @my-server tools/call search query:=mcp --load --load-concurrency 20 --load-duration 30
100```
101 
102The run happens inside the daemon, so later commands on the same connection wait for it, and Ctrl+C cancels the in-flight calls and prints no summary. [Load testing](https://modelcontextprotocol.io/docs/draft/tools/inspector/load-testing.md#on-an-mcpdo-connection) covers how a run behaves on a daemon connection, and the rest of that page covers every flag and field.
92103 
93104## Output
94105 

docs/draft/tools/inspector/web Changed · +38 / -3 lines

## Active sessions ### Load testing

from line 62
6262 
6363The monitoring sidebar pinned beside the Tools screen and dragged to its full width, with the tool call's request and response expanded in the Protocol stream.
6464 
65## Active sessions
66 
67The web backend holds each connection open as a session, and a session can outlive the tab that opened it. When a tab closes or reloads, the backend keeps the session for 60 seconds, so that a reload or an OAuth redirect can pick it back up, and then closes it, ending a stdio server process with it. **Active Sessions** lists every session the backend holds, from every tab, so you can find one that outlived its tab, or one whose server crashed, and end it without restarting the Inspector.
68 
69Open it with the **Active sessions** button in the header, between the disconnect button and **Client settings**.
70 
71![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/web-active-sessions-button.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=5291d737091f15eccad9ada04689ba75)
72 
73The Active sessions button, the network icon in the header between the disconnect and Client settings buttons.
74 
75Each row shows the server and its session ID, the transport, the status, when the session was created, when a tab was last attached to it (`now`, or `never`), and how many events are queued for a tab to collect.
76 
77| Status | Meaning |
78| - | - |
79| **This tab** | The session this tab is using. It also shows **Attached**. |
80| **Attached** | A tab is connected to the session now. |
81| **Detached** | No tab is attached. Events queue until a tab reattaches or the backend closes it. |
82| **Closed** | The session's transport has died, such as a stdio server process that exited or crashed. |
83 
84![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/web-active-sessions.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=8e635a422faaefb526729b731c15fe51)
85 
86Sessions from a closed tab, another open tab, a browser that never opened its stream, a crashed server, and this tab.
87 
88**Terminate** closes the session's connection, which ends its stdio server process, and drops it from the list. A tab still attached to it is told that the connection was terminated. The refresh button re-reads the list.
89 
90![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/web-active-sessions-terminated.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=04363e9b2e14a3fa92e01e5ecc89390b)
91 
92The same list after terminating the session the other open tab was using.
93 
94The list and the terminate action are backend routes, `GET /api/mcp/sessions` and `DELETE /api/mcp/sessions/<id>`, and like every other `/api` route they require the [session token](#the-session-token).
95 
6596## Servers
6697 
6798The Servers screen is the entry point. A server row carries its transport, its connection state, and a control that opens its per-server settings.
from line 130
99130 
100131On modern-era servers this screen also shows mirrored `Mcp-Param-*` headers, excluded tools, and distinct `-32602` error panels, all covered in [Protocol eras](https://modelcontextprotocol.io/docs/draft/tools/inspector/protocol-eras.md#tools-mirrored-headers-and-excluded-tools).
101132 
102![](https://mintcdn.com/mcp/gk28X8wi_tbRYzej/images/inspector/web-tools.png?fit=max\&auto=format\&n=gk28X8wi_tbRYzej\&q=85\&s=7ef469a969f398ac0ec70cf019c133da)
133![](https://mintcdn.com/mcp/wLu3KAa2YGoA7yJe/images/inspector/web-tools.png?fit=max\&auto=format\&n=wLu3KAa2YGoA7yJe\&q=85\&s=2a49f6d49cec4fba8d693bd87692ad9b)
103134 
104A tool call and its rendered result. The argument form collapses into the result panel once the call returns.
135A selected tool's input schema rendered as a form, with its required city and units arguments filled in, ready to execute or load test.
136 
137### Load testing
138 
139A tool's **Load test** button, beside **Execute Tool**, opens a panel that calls the tool, or a pasted scenario, repeatedly and concurrently over this tab's connection, then shows a latency and error-rate summary. See [Load testing](https://modelcontextprotocol.io/docs/draft/tools/inspector/load-testing.md#in-the-web-client).
105140 
106141## Resources
107142 

docs/2026-07-28/tools/inspector/configuration Changed · +1 / -1 lines

from line 140
140140| - | - |
141141| **What to invoke** | `--method`, `--tool-name`, `--tool-arg`, `--tool-args-json`, `--uri`, `--cursor`, `--prompt-name`, `--prompt-args`, `--log-level`, `--metadata`, `--tool-metadata`, `--rename` |
142142| **How to run it** | `--connect-timeout`, `--format`, `-q` / `--quiet`, `--output`, `--output-format`, `--app-info`, `--advertise-apps`, `--strict`, `--verify`, `--require-digests`, `--completion <shell>` (`bash`, `zsh`, or `fish`) |
143| **Load test** | `--load`, `--load-concurrency`, `--load-connections`, `--load-duration`, `--load-requests`, `--load-rate`, `--load-max-error-rate`, `--load-max-p99` (see [CI gates](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/cli.md#ci-gates)) |
143| **Load test** | `--load` and the `--load-*` flags that shape and judge a run, such as `--load-concurrency`, `--load-duration`, `--load-rate`, `--load-scenario` and `--load-max-p99` (see [Load testing](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/load-testing.md)) |
144144| **Auth** | `--use-stored-auth`, `--stored-auth-only`, `--relogin`, `--no-revoke`, `--wait-for-auth`, `--list-stored-auth`, `--print-handoff` |
145145 
146146## Environment variables

docs/draft/tools/inspector/configuration Changed · +1 / -1 lines

from line 140
140140| - | - |
141141| **What to invoke** | `--method`, `--tool-name`, `--tool-arg`, `--tool-args-json`, `--uri`, `--cursor`, `--prompt-name`, `--prompt-args`, `--log-level`, `--metadata`, `--tool-metadata`, `--rename` |
142142| **How to run it** | `--connect-timeout`, `--format`, `-q` / `--quiet`, `--output`, `--output-format`, `--app-info`, `--advertise-apps`, `--strict`, `--verify`, `--require-digests`, `--completion <shell>` (`bash`, `zsh`, or `fish`) |
143| **Load test** | `--load`, `--load-concurrency`, `--load-connections`, `--load-duration`, `--load-requests`, `--load-rate`, `--load-max-error-rate`, `--load-max-p99` (see [CI gates](https://modelcontextprotocol.io/docs/draft/tools/inspector/cli.md#ci-gates)) |
143| **Load test** | `--load` and the `--load-*` flags that shape and judge a run, such as `--load-concurrency`, `--load-duration`, `--load-rate`, `--load-scenario` and `--load-max-p99` (see [Load testing](https://modelcontextprotocol.io/docs/draft/tools/inspector/load-testing.md)) |
144144| **Auth** | `--use-stored-auth`, `--stored-auth-only`, `--relogin`, `--no-revoke`, `--wait-for-auth`, `--list-stored-auth`, `--print-handoff` |
145145 
146146## Environment variables
Feedback