MCP Inspector, one launcher and three clients
The MCP Inspector is the reference developer tool for testing and debugging MCP servers. One npm package gives a web client, a CLI client and a terminal UI behind one binary. This page runs the CLI against one hosted endpoint of McpStamp and shows the exit codes that we recorded on 2026-10-31.
Install and Node requirement
No install step is needed, because the Inspector runs through npx. It requires Node 22.19.0 or newer, and the npm package declares the engine range node >=22.19.0. On 2026-10-31 the npm latest tag was 2.13.0 (npm registry). The legacy v1 line gets security fixes only and is published to the v1-latest tag.
Start the web client
npx @modelcontextprotocol/inspector
Run node --version to check your version. The web client prints a URL with a per-launch API token and opens it in your browser. Set MCP_AUTO_OPEN_ENABLED=false to stop it opening.
Three clients, one launcher
The mcp-inspector binary is a launcher. It reads two flags of its own and forwards every other argument to one of its three clients (configuration docs). A flag that works in one client can be unknown to another. For example, --method is CLI-only.
| Client | Start it with | What it is for |
|---|---|---|
| Web | npx @modelcontextprotocol/inspector | A full graphical inspector in the browser. This is the default client. |
| CLI | npx @modelcontextprotocol/inspector --cli | A scriptable, machine-readable client for CI, shell pipelines and coding agents |
| TUI | npx @modelcontextprotocol/inspector --tui | An interactive terminal UI for when a browser is not available or wanted |
A recorded CLI session on a hosted endpoint
On 2026-10-31, from 08:16 to 08:17 UTC, we ran Inspector 2.13.0 on Node 22.23.3 against the hosted currency endpoint https://mcp.zovo.one/mcp/currency. We sent no token. Each command below is the exact command that we ran, and each label gives its exit code.
initialize (exit 0)
npx -y @modelcontextprotocol/inspector@2.13.0 --cli https://mcp.zovo.one/mcp/currency --transport http --method initialize --format json
The server answered with serverInfo mcp-currency version 0.22.6 and protocolVersion 2025-11-25. This is the full output.
stdout of initialize
{"result":{"serverInfo":{"name":"mcp-currency","version":"0.22.6"},"protocolVersion":"2025-11-25","capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true},"tools":{"listChanged":true}}}} tools/list (exit 0)
npx -y @modelcontextprotocol/inspector@2.13.0 --cli https://mcp.zovo.one/mcp/currency --transport http --method tools/list --format json
The list had 10 tools. One of them is convert, with the inputs amount, from, to and date. Its schema marks amount and from as required. The --strict run of the same list also exited 0, so the check found no error-severity tool-schema problem (that would be exit 6).
tools/list --strict (exit 0)
npx -y @modelcontextprotocol/inspector@2.13.0 --cli https://mcp.zovo.one/mcp/currency --transport http --method tools/list --strict --format json
A tool name that is not on the server exited 5 with tool_not_found, also with no token. The CLI wrote one JSON line to stderr.
wrong tool name (exit 5)
npx -y @modelcontextprotocol/inspector@2.13.0 --cli https://mcp.zovo.one/mcp/currency --transport http --method tools/call --tool-name no_such_tool --format json
stderr of the wrong tool name
{"error":{"code":"tool_not_found","message":"Tool 'no_such_tool' not found on server."}} The bare URL trap and exit code 3
A convert call on the bare URL, with no Authorization header, exited 3 with auth_required.
tools/call with no header (exit 3)
npx -y @modelcontextprotocol/inspector@2.13.0 --cli https://mcp.zovo.one/mcp/currency --transport http --method tools/call --tool-name convert --tool-arg amount=100 --tool-arg from=EUR --tool-arg to=GBP --format json
stderr of the call with no header
{"error":{"code":"auth_required","message":"Interactive OAuth requires a TTY on stdin or stderr (or MCP_AUTO_OPEN_ENABLED=true). For CI/non-interactive runs use --stored-auth-only."}} A plain curl POST of the same call, made at 08:17 UTC, got HTTP 401 with this challenge header. The JSON body of that answer says that the token is free and names the header form Authorization: Bearer <token>.
HTTP 401 challenge, no header
HTTP/2 401 www-authenticate: Bearer realm="mcp.zovo.one", error="invalid_token", resource_metadata="https://mcp.zovo.one/.well-known/oauth-protected-resource"
The CLI docs explain the exit. By default the CLI runs a loopback OAuth flow that opens a browser and waits on a localhost callback. With no TTY on stdin or stderr, it fails fast with auth_required and does not wait (CLI docs). Our runs had no TTY. A header with a token that the server does not accept also exited 3. We sent Authorization: Bearer invalid, and both initialize and tools/call exited 3, although initialize with no header exited 0.
Call a tool with your own token
We did not run an authorized tool call for this page, because it needs a token, so this page shows no result of it. The configuration docs describe the flag --header "Name: Value" as "HTTP headers for an HTTP/SSE server. Repeatable." The MCP authorization specification of 2025-11-25 says that the client "MUST use the Authorization request header field" in the form Authorization: Bearer <access-token>. It also says "Access tokens MUST NOT be included in the URI query string" (authorization spec).
Get your own free token as the hosted endpoints guide shows. Then replace <token> in this command with your token, and keep the token out of files that you commit.
convert, needs your own token
npx -y @modelcontextprotocol/inspector@2.13.0 --cli https://mcp.zovo.one/mcp/currency --transport http --header "Authorization: Bearer <token>" --method tools/call --tool-name convert --tool-arg amount=100 --tool-arg from=EUR --tool-arg to=GBP --format json
The CLI docs say that the error line on stderr redacts query-string secrets in a URL. They also warn that servers/show does not scrub credentials in a server URL.
Protocol era for these servers
Inspector v2 treats the protocol era as a setting for each server. The docs say that legacy is "The default. Plain initialize, no probing at all." (protocol eras). The currency server negotiated 2025-11-25 on 2026-10-31. That version is before the 2026-07-28 revision, so the default era fits. The docs say that modern pins exactly 2026-07-28 with "No fallback, so a non-modern server fails loudly." Do not pick modern for a server that negotiates 2025-11-25.
CLI exit codes
The CLI docs say that every non-zero exit maps to a stable failure class, so a caller can branch on why without scraping prose (CLI docs). On 2026-10-31 the docs listed codes 0 to 11. This table shows seven of them.
| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | Usage or unexpected error (the catch-all). |
| 3 | Server requires authentication (HTTP 401/403, or an SDK authorization error). |
| 4 | Server unreachable (DNS, connection refused, timeout). |
| 5 | Tool error. The call returned isError: true, or the tool was not found. |
| 6 | --strict found an error-severity tool-schema portability problem. |
| 11 | The server answered HTTP 429 (envelope code rate_limited). |
On any non-zero exit the CLI also writes a single JSON line to stderr. Its error.code is a stable name, such as auth_required or tool_not_found.
Where secrets are stored
The Inspector keeps acquired OAuth tokens, OAuth client secrets and stdio env: values out of mcp.json, client.json and oauth.json. It puts them in a secret store. Each process picks one store, once, the first time it needs it (secret store docs).
- The OS keychain is the usual store. That is Keychain on macOS, Credential Manager on Windows and the Secret Service on Linux. The docs say that most desktop installs stop here.
- If the keychain probe fails, for example on Linux with no Secret Service or in an SSH session with no D-Bus session, the Inspector stores secrets in
~/.mcp-inspector/secrets.jsonwith mode 0600. The docs warn that this file is unencrypted unless you supply a key. A container with no volume on the secrets directory keeps them in memory instead. - Headers are not moved. The docs say that headers "are saved in
mcp.jsonexactly as written, so a header that carries a credential stays in the file." If you save a server with your token header inmcp.json, the token stays in that file as written.
Use it on a hosted endpoint
The currency endpoint answered the Inspector with --transport http. On the bare URL, initialize and tools/list worked with no token, and the 401 answer to the tool call says that a tool call needs a token. Read the hosted endpoints guide for the token request and the raw curl session, or pick an endpoint on any server page.
How this page was checked
We fetched each source below on 2026-10-31 and matched each quote on this page to the fetched text. On the same day, from 08:16 to 08:17 UTC, we ran Inspector 2.13.0 with Node 22.23.3 against https://mcp.zovo.one/mcp/currency with no token, and saved each command, exit code and output. We did not run the header-form tool call, because it needs a token.
- MCP Inspector overview, fetched 2026-10-31
- CLI client docs, fetched 2026-10-31
- Configuration and flags docs, fetched 2026-10-31
- Protocol eras docs, fetched 2026-10-31
- Inspector README on GitHub, fetched 2026-10-31
- MCP authorization specification 2025-11-25, fetched 2026-10-31
- npm registry record (version 2.13.0, engines node >=22.19.0), fetched 2026-10-31