MCP Inspector

MCP

Definition

An official Anthropic debugging tool for MCP server development. Provides a UI to connect to any MCP server, list its tools/resources/prompts, execute calls, and inspect responses. Essential for testing MCP server implementations during development.

Example Usage

Run 'npx @modelcontextprotocol/inspector' to connect to your MCP server and test each tool interactively before deploying.

In Depth

The MCP Inspector is an official, interactive debugging tool for MCP server development. It provides a browser-based UI that connects to any MCP server — via either stdio or StreamableHTTP transport — and lets you explore and exercise the server's capabilities without writing a single line of client code.

What Inspector Provides

Once connected to a server, Inspector displays four key panels:

  • Tools list: all tools the server exposes, with their full JSON Schema definitions. You can select a tool, fill in arguments through a generated form, execute it, and inspect the raw response.
  • Resources list: all resources the server declares, with the ability to fetch and view their contents.
  • Prompts list: all prompt templates, with argument forms for parameterized invocations.
  • Notifications/Logs: streaming server log messages and JSON-RPC message traces for low-level debugging.

Running Inspector

The most common invocation is:

npx @modelcontextprotocol/inspector

This starts a local web server (default port 5173) and opens the UI. You then paste in your server's command (for stdio) or URL (for HTTP) and connect. For stdio servers, Inspector handles the subprocess lifecycle — you do not need to start the server separately.

Inspector vs Alternative Debugging Methods

ApproachInteractivitySetupBest for
MCP InspectorHigh (GUI forms)npx one-linerIterative dev, first-time exploration
Claude Code with .mcp.jsonMedium (chat-driven)Repo config requiredIntegration testing in real context
Direct JSON-RPC via curlLow (manual JSON)NoneScripted CI assertions
Unit tests (SDK mock)Low (code)Test harness setupRegression prevention

Inspector sits at the top of the debugging pyramid: it is the fastest way to verify that a server's tool definitions are correct, that inputs are validated as expected, and that outputs match what the model will receive. It does not simulate the model's tool-selection reasoning — for that, you need to test with an actual Claude client.

See Tool Distribution & Least Privilege for guidelines on which tools a server should expose and how Inspector helps audit that surface area.

How It Compares

MethodTests primitive listingTests tool executionTests model tool selectionNeeds running Claude
MCP InspectorYesYesNoNo
Claude Code integrationYesYesYesYes
Unit test with mock clientYesYesNoNo
Manual JSON-RPCYesYesNoNo

How It's Tested & Common Confusions

Exam angles for MCP Inspector:

  • Purpose questions: "Which tool would you use to interactively test an MCP server's tools before deploying it?" → MCP Inspector.
  • What Inspector cannot do: it does not simulate the model's reasoning about which tool to call — it only lets you call tools directly. Exam distractors often imply Inspector validates model behavior.
  • Transport support: Inspector supports both stdio and StreamableHTTP. Questions might ask whether Inspector can test a remote server — yes, via HTTP transport.
  • Primitives coverage: Inspector surfaces all three primitives (Tools, Resources, Prompts), not just Tools. A question that asks which primitive Inspector cannot inspect is a trap — it inspects all three.

Frequently Asked Questions

Does MCP Inspector require the MCP server to be running before connecting?

For HTTP transport, yes — the server must be running and reachable at the URL you provide. For stdio transport, Inspector launches the server process itself using the command you supply, so you only need the server binary or script to be present — Inspector manages the subprocess.

Can MCP Inspector be used in CI pipelines?

Inspector is primarily an interactive GUI tool and is not designed for automated CI pipelines. For CI validation of MCP servers, use the MCP SDK's testing utilities or write JSON-RPC assertions with curl/httpie against a test instance of your server.