Interactively test and debug a local stdio MCP server with the official MCP Inspector: launch its web UI or CLI mode against the server process, browse and call its tools, and watch protocol traffic, log notifications, and stderr console output.

domain: modelcontextprotocol.io/docs/tools/inspector · 9 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Confirm Node.js >=22.19.0 is installed (the Inspector's minimum). No install step is needed — every mode runs directly through `npx @modelcontextprotocol/inspector`, which resolves to the shared `mcp-inspector` binary.
  2. Launch the web UI against your local stdio server by passing the exact command that starts it as trailing arguments: `npx @modelcontextprotocol/inspector node path/to/server/index.js` (or e.g. `npx @modelcontextprotocol/inspector uvx mcp-server-git --repository ~/code/repo` for a uvx-launched Python server). This prints a URL containing a one-time session token, e.g. `http://localhost:6274/?MCP_INSPECTOR_API_TOKEN=<token>` — open that exact printed URL; the backend guards every `/api/*` route with the token, so typing a bare `localhost:6274` from memory will not authenticate.
  3. On the Servers screen the ad-hoc target auto-connects (no catalog editing needed for a one-off run). Open the Tools tab: select a tool to see its description and input schema rendered as a form, fill the arguments, call it, and the result (structured content, embedded resources, images) renders below the form.
  4. Pin the monitoring sidebar to watch traffic live while working in Tools — it groups Tasks, Logs, Protocol, Network, and Console into a resizable right-hand column. Protocol shows the full JSON-RPC transcript (every request/response/notification, including `notifications/progress`); Logs shows `notifications/message` server log output (only populated if the server declared the `logging` capability — note MCP-level logging is deprecated under SEP-2577 as of the 2026-07-28 spec, so many servers log to stderr instead); Console shows that raw stderr stream for stdio servers.
  5. For scripted/CI-style checks instead of the browser, use CLI mode, which requires `--method`: `npx @modelcontextprotocol/inspector --cli node path/to/server/index.js --method tools/list` to dump the tool list, or add `--method tools/call --tool-name <name> --tool-arg key=value --format json | jq .result` to call one tool and get machine-readable JSON. `--tui` gives the same ad-hoc-target semantics as web but as a terminal UI: `npx @modelcontextprotocol/inspector --tui node path/to/server/index.js`.
  6. Know the `--` separator direction before passing extra flags through to your server command — it is reversed between modes. Under `--cli`, everything BEFORE `--` is read as the server target and everything AFTER `--` is the Inspector's own flags: `mcp-inspector --cli node build/index.js --config /etc/myserver.conf --verbose -- --method tools/list`. Under the default web mode or `--tui`, it's the opposite — everything AFTER `--` is forwarded to the target: `mcp-inspector node build/index.js -- --config /etc/myserver.conf --verbose`.
  7. To test a remote HTTP/SSE server instead of stdio, replace the positional command with `--server-url <url> --transport http` (or `sse`), and pass custom headers with repeatable `--header "Name: Value"` flags.
  8. For CI, check the CLI's stable exit codes instead of scraping output: `0` success, `2` no MCP App found (`--app-info` probe), `3` auth required, `4` server unreachable, `5` tool error (`isError:true` or tool not found); on any non-zero exit the CLI also writes one JSON `ErrorEnvelope` line to stderr.
  9. Docs: https://modelcontextprotocol.io/docs/tools/inspector, https://modelcontextprotocol.io/docs/tools/inspector/web, https://github.com/modelcontextprotocol/inspector, https://github.com/modelcontextprotocol/inspector/blob/main/docs/mcp-server-configuration.md, https://github.com/modelcontextprotocol/inspector/blob/main/clients/cli/README.md

Known gotchas

Related routes

Test and debug an MCP server with MCP Inspector, including scripted CLI mode for CI
modelcontextprotocol.io · 8 steps · unrated
Build and run a local MCP server in TypeScript that exposes one or more model-callable tools, launched over the stdio transport using the official @modelcontextprotocol/server package.
github.com/modelcontextprotocol/typescript-sdk · 10 steps · unrated
Build and run a local MCP server in Python that exposes one or more model-callable tools, launched over the stdio transport for a host like Claude Desktop or the MCP Inspector.
modelcontextprotocol.io/docs/develop/build-server · 11 steps · unrated

Give your agent this knowledge — and 17,400+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans