CLI client changeddocs/draft/tools/inspector/cli
Nearest release: v2.1.295, published 5 hours after upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 8 Oct 2026 12:58 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 22 Oct 2026 20:37 UTC.
Upstream edited
Recorded here
Lines+7added
Lines−7removed
From line
12
where the diff opens
First seen
26 Aug 2026
this site's first read of the page
Recorded edits5to this page, all time
The whole hunk
from line 12, old and new numbered
/
from line 12
1212>
1313> Running several commands against the same server, or a flow that spans one
1414> session (tasks, subscriptions, elicitation)? The [mcpdo connection
15> client](/docs/draft/tools/inspector/mcpdo) connects once and keeps the
15> client](/docs/draft/tools/inspector/mcpdo.md) connects once and keeps the
1616> connection open between commands.
1717
1818The examples below use the installed `mcp-inspector` binary. Without a global install, prefix each command with `npx @modelcontextprotocol/inspector` instead, as above.
from line 32
3232mcp-inspector --cli --config ./mcp.json --server myserver --method tools/list
3333```
3434
35When the server comes from a file, its per-server settings (headers, timeouts, OAuth, [protocol era](/docs/draft/tools/inspector/protocol-eras), and roots) apply to the connection, resolved exactly as the TUI and web client resolve them. A `--header` flag overrides the file's headers for that run while leaving its timeouts and OAuth in place.
35When the server comes from a file, its per-server settings (headers, timeouts, OAuth, [protocol era](/docs/draft/tools/inspector/protocol-eras.md), and roots) apply to the connection, resolved exactly as the TUI and web client resolve them. A `--header` flag overrides the file's headers for that run while leaving its timeouts and OAuth in place.
3636
3737Later examples abbreviate whichever of these forms you use, along with its `--transport` or `--config`/`--server` flags, as `<server>`.
3838
from line 39
3939> [!NOTE]
4040>
4141> **The config file is the only durable way to give a run its
42> [roots](/specification/draft/client/roots):** there is no roots flag, and the
42> [roots](/specification/draft/client/roots.md):** there is no roots flag, and the
4343> CLI has no `roots/set` method. Roots configured for a server are advertised at
4444> connect, so a server that calls `roots/list` (as
4545> `@modelcontextprotocol/server-filesystem` does, to learn its allowed
4646> directories) gets them.
4747
48See [Configuration and flags](/docs/draft/tools/inspector/configuration) for `--catalog` vs. `--config`, the `--` separator, and the shared server-selection flags.
48See [Configuration and flags](/docs/draft/tools/inspector/configuration.md) for `--catalog` vs. `--config`, the `--` separator, and the shared server-selection flags.
4949
5050## Methods
5151
from line 97
9797
9898## Probing MCP Apps
9999
100`--app-info` reports whether a tool ships an [MCP App](/extensions/apps/overview) UI (its `ui://` resource, CSP, and permissions) **without calling the tool**, so a pipeline can decide whether it needs a browser before invoking anything:
100`--app-info` reports whether a tool ships an [MCP App](/extensions/apps/overview.md) UI (its `ui://` resource, CSP, and permissions) **without calling the tool**, so a pipeline can decide whether it needs a browser before invoking anything:
101101
102102```bash theme={null}
103103# One tool -> one JSON line
from line 163
163163
164164Without either, and with no TTY on stdin or stderr, the CLI fails fast with `auth_required` rather than hanging for fifteen minutes on a callback nobody will complete.
165165
166See [Authorization](/docs/draft/tools/inspector/authorization) for the full flow, the web-to-CLI handoff, and `--print-handoff`.
166See [Authorization](/docs/draft/tools/inspector/authorization.md) for the full flow, the web-to-CLI handoff, and `--print-handoff`.
167167
168168## Recipes
169169
from line 228
228228
229229### Editing the catalog
230230
231`servers/add`, `servers/edit`, and `servers/remove` write the catalog without connecting to anything. They go through the same code as the web client's server list, so `env` values and client secrets land in the [secret store](/docs/draft/tools/inspector/configuration#where-secrets-are-stored) exactly as they would from the UI, and a running web client picks up the change.
231`servers/add`, `servers/edit`, and `servers/remove` write the catalog without connecting to anything. They go through the same code as the web client's server list, so `env` values and client secrets land in the [secret store](/docs/draft/tools/inspector/configuration.md#where-secrets-are-stored) exactly as they would from the UI, and a running web client picks up the change.
232232
233233```bash theme={null}
234234# Add: the positional target or --server-url describes the entry, not a server to connect to
No line in this hunk matches that.