MCP Inspector
$ mcp-inspector Official Med RiskThe official Model Context Protocol Inspector ships both a web debugger and a scriptable --cli mode. Agents and CI pipelines can invoke npx @modelcontextprotocol/inspector --cli with --method tools/list or tools/call over stdio, http, or sse and get JSON back.
npm install -g @modelcontextprotocol/inspector mcp-inspector --cli lets coding agents smoke-test and debug any MCP server directly from the terminal without registering it in their own host config.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
--cli mode outputs clean JSON for tools/list, tools/call, and resources/read, though omitting --cli opens a web UI.
--climode with--method,--tool-name,--tool-arg, and--format json
Supports read-only discovery (tools/list), though tools/call executes whatever side effects the target MCP server exposes.
- Separates
tools/listinspection fromtools/callexecution
Cross-platform Node.js tool executable immediately via npx @modelcontextprotocol/inspector.
- Published on npm as
@modelcontextprotocol/inspector
Canonical reference harness for testing MCP stdio/SSE/Streamable HTTP servers during development.
- Official MCP protocol compliance and debugging harness
Official modelcontextprotocol/inspector repository maintained by the MCP organization.
- Official
modelcontextprotocol/inspectorrepo
Documented at modelcontextprotocol.io/docs/tools/inspector including CLI mode examples.
- Official docs at modelcontextprotocol.io/docs/tools/inspector
Security, Auth & Guardrails
Reads MCP server JSON config via --config <path> or custom --header / env vars passed to target servers.
100% free and MIT/Apache-2.0 open-source.
# MCP Inspector Agent Rules - ALWAYS pass `--cli` so `mcp-inspector` does not launch a blocking local web UI server. - Test `tools/list` and `resources/list` before invoking `tools/call` on unfamiliar MCP servers. - Pass secrets via `--config` or environment variables rather than inline shell flags.
Agent-Ready Command Recipes
Safe Read-Only Queries
npx @modelcontextprotocol/inspector --cli node dist/index.js --method tools/list
Connects to a local MCP server in headless CLI mode and outputs its JSON tool catalog.
npx @modelcontextprotocol/inspector --cli --transport http --server-url https://example.com/mcp --method resources/list
Queries available resources on an HTTP MCP server without launching the browser UI.
Controlled Writes & Previews
npx @modelcontextprotocol/inspector --cli node dist/index.js --method tools/call --tool-name get_status --tool-arg id=123
Executes one MCP tool call with explicit arguments and prints the JSON response.
Strengths for Agents
- +
--climode makes automated MCP server smoke testing in CI/agent loops effortless. - + Supports
stdio,sse, and Streamablehttptransports natively. - + Canonical reference implementation for MCP protocol debugging.
Caveats & Pitfalls
- ! Forgetting
--clistarts a persistent Express/Vite web UI server that blocks the terminal. - !
npxcold download can be slower than a pre-installed global CLI.