Configuration and flags changeddocs/2026-07-28/tools/inspector/configuration
Nearest release: v2.1.316, published 6 hours before 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 31 Oct 2026 07:38 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 31 Oct 2026 08:07 UTC.
Upstream edited
Recorded here
Lines+50added
Lines−8removed
From line
10
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits9to this page, all time
The whole hunk
from line 10, old and new numbered
/
from line 10
1010| - | - |
1111| `--web` / `--cli` / `--tui` | Selects the client, `--web` by default. Passing more than one fails with `Specify at most one of --web, --cli, or --tui.` Launcher flags must come first: parsing stops at the first argument the launcher does not own, and everything from that point on is forwarded to the client unchanged. |
1212| `-h` / `--help` | With no mode flag, prints the launcher's own help and exits. With a mode flag it is forwarded, so `mcp-inspector --cli --help` prints the CLI's help. |
13| `-V` / `--version` | Listed in the launcher's help, but the launcher does not act on it. The flag is forwarded to the selected client, which prints the Inspector version, so `mcp-inspector -V` prints it through the web client and `mcp-inspector --cli -V` through the CLI. |
1314
1415Everything below belongs to a client.
1516
from line 140
139140| - | - |
140141| **What to invoke** | `--method`, `--tool-name`, `--tool-arg`, `--tool-args-json`, `--uri`, `--cursor`, `--prompt-name`, `--prompt-args`, `--log-level`, `--metadata`, `--tool-metadata`, `--rename` |
141142| **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)) |
142144| **Auth** | `--use-stored-auth`, `--stored-auth-only`, `--relogin`, `--no-revoke`, `--wait-for-auth`, `--list-stored-auth`, `--print-handoff` |
143145
144146## Environment variables
from line 154
152154| `MCP_DEBUG` | Append the error stack to a top-level `--web` or `--tui` failure (a `--cli` failure always prints its [JSON error envelope](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/cli.md#exit-codes-and-error-envelopes) instead). Only when set to a meaningful value: `0`, `false`, and empty read as off. |
153155| `DEBUG` | Same, with the same meaningful-value rule, so a stray `DEBUG=0` doesn't turn stack traces on and `DEBUG` still works as the npm `debug` package's namespace filter. |
154156
157The TUI reads both variables itself, with the same rule, for its own top-level failure.
158
155159### CLI and TUI
156160
157Some of these are read by the web backend too, as the **Read by** column shows.
161Some of these are read by the web backend or by `mcpdo` too, as the **Read by** column shows.
158162
159163| Variable | Read by | Effect |
160164| - | - | - |
161| `MCP_CATALOG_PATH` | Web, CLI, TUI | Fallback for `--catalog`. The CLI honors it only when no ad-hoc target is given, so a shell that exports it can still run one-off ad-hoc invocations. The web client and TUI apply it regardless, so combining it with an ad-hoc target is rejected there. |
162| `MCP_CLIENT_CONFIG_PATH` | CLI, TUI | Fallback for `--client-config`. |
163| `MCP_OAUTH_CALLBACK_URL` | CLI, TUI | Fallback for `--callback-url`. |
164| `MCP_STORAGE_DIR` | Web, CLI, TUI | Storage directory. Relocates the OAuth state file (`<dir>/oauth.json`) and the secrets file (`<dir>/secrets.json`). |
165| `MCP_INSPECTOR_OAUTH_STATE_PATH` | CLI, TUI | Per-file override of the OAuth state path. Takes precedence over `MCP_STORAGE_DIR`. |
166| `MCP_AUTO_OPEN_ENABLED` | Web, CLI | Controls browser auto-open. `false` never opens one. In the CLI, `true` forces auto-open and lets interactive OAuth run without a TTY, and unset opens only on a TTY. In the web client, unset opens the UI at launch. The TUI does not read it. |
165| `MCP_CATALOG_PATH` | Web, CLI, TUI, mcpdo | Fallback for `--catalog`. The CLI honors it only when no ad-hoc target is given, so a shell that exports it can still run one-off ad-hoc invocations. The web client and TUI apply it regardless, so combining it with an ad-hoc target is rejected there. |
166| `MCP_CLIENT_CONFIG_PATH` | CLI, TUI, mcpdo | Fallback for `--client-config`. |
167| `MCP_OAUTH_CALLBACK_URL` | CLI, TUI, mcpdo | Fallback for `--callback-url`. |
168| `MCP_STORAGE_DIR` | Web, CLI, TUI, mcpdo | Storage directory. Relocates the OAuth state file (`<dir>/oauth.json`) and the secrets file (`<dir>/secrets.json`). |
169| `MCP_INSPECTOR_OAUTH_STATE_PATH` | CLI, TUI, mcpdo | Per-file override of the OAuth state path. Takes precedence over `MCP_STORAGE_DIR`. |
170| `MCP_AUTO_OPEN_ENABLED` | Web, CLI, mcpdo | Controls browser auto-open. `false` never opens one. In the CLI, `true` forces auto-open and lets interactive OAuth run without a TTY, and unset opens only on a TTY. In the web client, unset opens the UI at launch. The TUI does not read it. |
171| `MCP_INSPECTOR_LOG_DIR` | TUI | Directory of the TUI's `auth.log`. Defaults to `~/.mcp-inspector`. |
172| `LOG_LEVEL` | TUI | Level of that log, as a pino level name. Defaults to `info`. |
173| `NO_COLOR` | CLI, mcpdo | Any non-empty value disables ANSI styling in human-readable output: all of mcpdo's `--format text` output (the same as `--plain`), and the sign-in prompt the CLI writes to stderr. |
167174
168175### Web backend environment variables
169176
from line 182
175182| `CLIENT_PORT` | Web UI port. Defaults to `6274`. |
176183| `DANGEROUSLY_BIND_ALL_INTERFACES` | Required opt-in to bind a wildcard host (`0.0.0.0`, `::`, or any equivalent spelling). |
177184| `ALLOWED_ORIGINS` | Comma-separated origin allow-list. **Replaces** the default list rather than merging. |
185| `MCP_INSPECTOR_ALLOWED_HOSTS` | Comma-separated extra hostnames accepted in the `Host` header, for a reverse proxy that rewrites `Host`. `localhost` and `*.localhost`, IPv4 and bracketed IPv6 literals, the bind host (unless it is a wildcard), and the hostname of every `ALLOWED_ORIGINS` entry are always accepted. An entry starting with `.` (`.example.com`) admits that domain and its subdomains. An entry with a scheme, port, path, wildcard, or whitespace is dropped with a warning. The port is not compared. Any other `Host` gets a `403`. |
178186| `MCP_PROXY_AUTH_TOKEN` | Deprecated v1 name for `MCP_INSPECTOR_API_TOKEN`, used only when the new name is unset. |
179187| `MCP_SANDBOX_PORT` | MCP Apps sandbox port. Defaults to `6275`; `0` asks the OS for a free port. |
180188| `SERVER_PORT` | v1's proxy port, now only a fallback for the sandbox port when `MCP_SANDBOX_PORT` is unset or invalid. |
from line 190
182190| `MCP_SANDBOX_FULL_ADDRESS` | Public URL of the MCP Apps sandbox proxy, for running behind a reverse proxy. |
183191| `MCP_APP_ORIGIN_FULL_ADDRESS` | Public origin that `_meta.ui.domain` app documents are served from, for running behind a reverse proxy. |
184192| `MCP_LOG_FILE` | Append the backend's structured (JSON lines) log to this file. |
193| `INSPECTOR_TLS_KEY_PATH` | PEM private key for the web UI listener. Set together with `INSPECTOR_TLS_CERT_PATH` to serve the UI over `https`. Setting one without the other, an unreadable file, or a key and certificate that are not a usable pair is a startup error. The listener does not fall back to `http`. A blank value counts as unset. Only the UI listener is covered. The sandbox and app-origin listeners stay `http`. The CLI's `--print-handoff` emits an `https://` deep link when both are set. |
194| `INSPECTOR_TLS_CERT_PATH` | PEM certificate (or chain) for the key in `INSPECTOR_TLS_KEY_PATH`. |
185195| `MCP_AUTO_OPEN_ENABLED` | `false` stops the browser from opening at launch. See [CLI and TUI](#cli-and-tui). |
186196| `MCP_CATALOG_PATH`, `MCP_STORAGE_DIR` | As described under [CLI and TUI](#cli-and-tui). |
187197| `HTTPS_PROXY` / `HTTP_PROXY` / `NO_PROXY` | Standard proxy routing for outbound MCP connections. |
from line 302
292302}
293303```
294304
295Fields that equal their default are omitted when the Inspector writes the file back, keeping diffs minimal. `protocolEra` (see [Protocol eras](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/protocol-eras.md)) defaults to `legacy` and `modernLogLevel` to `debug`.
305Fields that equal their default are omitted when the Inspector writes the file back, keeping diffs minimal. `protocolEra` (see [Protocol eras](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/protocol-eras.md)) defaults to `legacy` and `modernLogLevel` to `debug`. `"type": "http"` is accepted as an alias of `"streamable-http"` and written back in the long form.
306
307The Inspector-specific fields and their defaults:
308
309| Field | Default | Meaning |
310| - | - | - |
311| `headers` | | HTTP headers for an SSE or Streamable HTTP server, as a flat object. |
312| `metadata` | | Default `_meta` object merged into every outgoing request. Values may be any JSON. |
313| `protocolEra` | `legacy` | `legacy`, `auto`, or `modern`. See [Protocol eras](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/protocol-eras.md). |
314| `elicitCapability` | `both` | Elicitation capability advertised to the server: `off`, `url`, `form`, or `both`. Read by `mcpdo` only. |
315| `modernLogLevel` | `debug` | Per-request log level stamped on modern connections, or `off`. Legacy connections ignore it. |
316| `connectionTimeout` | `30000` | Connect-time timeout in ms. `0` disables it. |
317| `requestTimeout` | | Per-request timeout in ms. |
318| `taskTtl` | `60000` | TTL in ms for tasks created with **Run as task**. |
319| `autoRefreshOnListChanged` | `false` | Refresh the tools, resources, and prompts lists on `list_changed` instead of only flagging the indicator. |
320| `paginatedLists` | `false` | Fetch the lists one page at a time instead of aggregating every page on load. |
321| `suppressNotificationStream` | `false` | Legacy-era Streamable HTTP only: do not open the standalone `GET` notification stream. |
322| `advertisedExtensions` | | Per-extension overrides of which extensions the Inspector advertises, keyed by extension id. |
323| `maxFetchRequests` | `1000` | HTTP requests kept in the Network log for this server. `0` means unlimited. |
324| `skillCatalogMaxSkills` | `256` | Most skills read in one skills verification run. A positive integer. |
325| `skillCatalogMaxBytes` | `67108864` | Most bytes read across all skills in one skills verification run (64 MiB). A positive integer. |
326| `roots` | | Roots advertised through the `roots` capability, each `{ "uri", "name" }`. |
327| `oauth.clientId` | | OAuth client ID for a static client. |
328| `oauth.clientSecret` | | OAuth client secret for a confidential client. |
329| `oauth.scopes` | | Scopes to request, as one string. |
330| `oauth.enterpriseManaged` | | `true` connects through the enterprise IdP (EMA) instead of standard OAuth. |
331| `oauth.onInsufficientScope` | `reauthorize` | Step-up policy for `403 insufficient_scope`: `reauthorize` or `throw`. |
332| `oauth.requestRefreshToken` | `true` | Whether the client declares the `refresh_token` grant when it registers. Only `false` is written. |
333| `oauth.scopeOnRefresh` | `false` | Whether a refresh-token request carries `scope`. Only `true` is written. |
334| `oauth.revokeOnClear` | `true` | Whether clearing this server's OAuth state also revokes the grant at the authorization server (RFC 7009). Only `false` is written. |
335| `oauth.authorizationParams` | | Extra query parameters for the authorization request. Reserved keys are dropped with a warning. |
336| `oauth.authorizationUrl` | | Overrides the `authorization_endpoint` the authorization server's metadata advertises. |
337| `oauth.tokenUrl` | | Overrides the `token_endpoint` the authorization server's metadata advertises. |
296338
297339You do not have to hand-write these; the web client can [import an existing client config](https://modelcontextprotocol.io/docs/2026-07-28/tools/inspector/recipes.md#importing-an-existing-client-config) from Claude Desktop, Cursor, Cline, or VS Code, or a registry `server.json`.
298340
No line in this hunk matches that.