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 20 Oct 2026 20:07 UTC.
Upstream edited
Recorded here
Lines+25added
Lines−25removed
From line
8
where the diff opens
First seen
26 Aug 2026
this site's first read of the page
Recorded edits4to this page, all time
The whole hunk
from line 8, old and new numbered
/
from line 8
88npx @modelcontextprotocol/inspector --cli node build/index.js --method tools/list
99```
1010
11<Tip>
12 Running several commands against the same server, or a flow that spans one
13 session (tasks, subscriptions, elicitation)? The [mcpdo connection
14 client](/docs/draft/tools/inspector/mcpdo) connects once and keeps the
15 connection open between commands.
16</Tip>
11> [!TIP]
12>
13> Running several commands against the same server, or a flow that spans one
14> session (tasks, subscriptions, elicitation)? The [mcpdo connection
15> client](/docs/draft/tools/inspector/mcpdo) connects once and keeps the
16> 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.
1919
from line 36
3636
3737Later examples abbreviate whichever of these forms you use, along with its `--transport` or `--config`/`--server` flags, as `<server>`.
3838
39<Note>
40 **The config file is the only durable way to give a run its
41 [roots](/specification/draft/client/roots):** there is no roots flag, and the
42 CLI has no `roots/set` method. Roots configured for a server are advertised at
43 connect, so a server that calls `roots/list` (as
44 `@modelcontextprotocol/server-filesystem` does, to learn its allowed
45 directories) gets them.
46</Note>
39> [!NOTE]
40>
41> **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
43> CLI has no `roots/set` method. Roots configured for a server are advertised at
44> connect, so a server that calls `roots/list` (as
45> `@modelcontextprotocol/server-filesystem` does, to learn its allowed
46> directories) gets them.
4747
4848See [Configuration and flags](/docs/draft/tools/inspector/configuration) for `--catalog` vs. `--config`, the `--` separator, and the shared server-selection flags.
4949
from line 112
112112
113113The CLI can't render an App, so by default it doesn't advertise the MCP Apps extension at `initialize`. A server that exposes its App tools only to clients claiming App support will then look app-less (exit `2`). Add `--advertise-apps` to claim the extension for that run.
114114
115<Note>
116 `tools/list --app-info` always emits NDJSON (one line per tool) regardless of
117 `--format`; `--format json` reshapes only the single-tool output of
118 `tools/call --app-info`.
119</Note>
115> [!NOTE]
116>
117> `tools/list --app-info` always emits NDJSON (one line per tool) regardless of
118> `--format`; `--format json` reshapes only the single-tool output of
119> `tools/call --app-info`.
120120
121121## Exit codes and error envelopes
122122
from line 219
219219mcp-inspector --cli --catalog ~/.mcp-inspector/mcp.json --method servers/show --server my-server
220220```
221221
222<Warning>
223 `servers/show` redacts secret-bearing fields (`env` values, sensitive headers,
224 OAuth client secrets), but it does **not** scrub credentials embedded in a
225 server `url` (userinfo or query tokens) or in stdio `args`. Treat raw URL and
226 `detail` fields as sensitive before pasting them into an issue.
227</Warning>
222> [!WARNING]
223>
224> `servers/show` redacts secret-bearing fields (`env` values, sensitive headers,
225> OAuth client secrets), but it does **not** scrub credentials embedded in a
226> server `url` (userinfo or query tokens) or in stdio `args`. Treat raw URL and
227> `detail` fields as sensitive before pasting them into an issue.
228228
229229### Editing the catalog
230230
No line in this hunk matches that.