Taking on 2–3 new engagements in 2026 — EST & PST hours

Start a Conversation

Developer tools

What is MCP Inspector?

MCP Inspector is the official debugging and testing tool for Model Context Protocol servers, built and maintained by the Anthropic MCP team. It is a React-based web UI that acts as a standalone MCP client — letting you browse tools, invoke them with custom inputs, inspect resources, and see raw JSON-RPC responses, all before touching Claude Desktop or Cursor.

9,483

GitHub stars

v0.21.2

Latest version

Anthropic

Maintained by

MIT

License

Why MCP Inspector Exists

Building an MCP server without Inspector is like building an API without Postman. When something goes wrong — a tool returns the wrong data, a resource isn't discovered, or the server crashes on connect — you need to see exactly what's happening at the protocol layer, not just guess from Claude's error messages.

MCP Inspector solves this by acting as a real MCP client that exposes every layer of the protocol: the initial handshake, capability negotiation, raw JSON-RPC requests and responses, server logs, and notification streams. Everything is visible and testable without an AI model in the loop.

Architecture: Two Processes

Inspector runs as two cooperating processes:

Inspector Client (MCPI)

Port 6274

React web UI running in your browser. This is what you interact with — tabs for Tools, Resources, Prompts, and Notifications.

MCP Proxy (MCPP)

Port 6277

Node.js bridge that translates between your browser and the MCP server transport (stdio, SSE, or Streamable HTTP).

The proxy is not a network proxy — it's a protocol bridge. It spawns your MCP server as a child process (for stdio) or connects to a running server (for SSE/HTTP), then exposes that connection to the browser UI over WebSocket.

Installation & Quick Start

No installation needed. Run with npx:

Open Inspector (no server)

npx @modelcontextprotocol/inspector

Connect to a Node.js server

npx @modelcontextprotocol/inspector node build/index.js

Pass environment variables

npx @modelcontextprotocol/inspector -e API_KEY=your-key node build/index.js

Connect to an npm-installed server

npx -y @modelcontextprotocol/inspector npx @modelcontextprotocol/server-filesystem ~/Desktop

Connect to a Python server

npx @modelcontextprotocol/inspector uv --directory path/to/server run package-name

Inspector opens automatically at http://localhost:6274. A session token is generated on startup and auto-filled in the URL for security.

The UI: Five Panels

Once connected, Inspector gives you five panels to explore your server:

Tools

Lists every tool your server exposes, with its full JSON schema. Select a tool, fill in parameters using the generated form, click Execute, and see the raw JSON-RPC response. This is where you spend 80% of your debugging time.

Resources

Lists all resources available from the server — their URIs, MIME types, and descriptions. Click any resource to inspect its content and verify what data is actually returned.

Prompts

Lists server-defined prompt templates. Fill in template arguments and preview the generated message exactly as it will be sent to a language model.

Notifications

Real-time stream of server log messages and JSON-RPC notifications. This is where stdout/stderr output appears, and where you'll see transport errors and lifecycle events.

Server Connection

Left sidebar showing transport type (stdio/SSE/HTTP), server command, environment variables, and auth token input. Change connection settings here without restarting.

CLI Mode: Scripting and CI/CD

Inspector's --cli flag disables the web UI and runs commands directly from the terminal — useful for automated tests and CI pipelines:

List all tools

npx @modelcontextprotocol/inspector --cli node build/index.js --method tools/list

Call a specific tool

npx @modelcontextprotocol/inspector --cli node build/index.js \
  --method tools/call \
  --tool-name search \
  --tool-arg query="hello world"

CLI mode exits with a non-zero code on error, making it composable with standard CI tooling.

Development Workflow: Inspector → Claude Desktop → Production

The recommended workflow is a three-stage pipeline:

  1. 01

    Inspector — protocol correctness

    Verify every tool and resource works correctly at the protocol level. Check JSON schemas, test edge cases, read raw responses. No AI model involved — pure protocol.

  2. 02

    Claude Desktop — AI integration

    Add the server to your claude_desktop_config.json and test real conversational flows. Verify the AI uses your tools as intended and handles errors gracefully.

  3. 03

    Production — monitoring and stability

    Ship to your target environment. Use structured logging (stderr only, never stdout) for observability. Consider remote MCP hosting for scalability.

Debugging Common Errors

These are the errors MCP developers hit most often, and how to fix them:

Server connects but tools/list returns empty

Cause: Tool registration is conditional or async — tool setup code hasn't run before the server advertises capabilities.

Fix: Ensure all tools are registered synchronously before calling server.start(). Check the Notifications panel for errors during initialization.

console.log breaks the protocol

Cause: stdio transport uses stdout exclusively for JSON-RPC messages. Any other output to stdout corrupts the stream.

Fix: Replace all console.log() with console.error() in your server. For structured logging, write to stderr or a log file.

-32602 Invalid params on tool call

Cause: The parameters you passed don't match the tool's JSON schema — wrong type, missing required field, or extra field.

Fix: Check the tool's schema in the Tools tab. Inspector generates the input form from the schema, so use its default form to validate.

Server works in Inspector, fails in Claude Desktop

Cause: Environment variables aren't available in Claude Desktop's process context.

Fix: Declare all required environment variables in the env block of claude_desktop_config.json. Also verify the command is an absolute path or correctly npx-resolvable from Claude Desktop.

Connection timeout on startup

Cause: Server takes too long to initialize (longer than the 5-second default), or throws during startup.

Fix: Set MCP_SERVER_REQUEST_TIMEOUT in Inspector's Configuration panel. Check the Notifications panel for server-side errors during initialization.

Security: Authentication Is On by Default

Inspector generates a random session token on every startup and requires it in the URL. This prevents other processes on your machine from connecting to the proxy. The UI is bound to localhost only by default.

Never use DANGEROUSLY_OMIT_AUTH in shared environments

The DANGEROUSLY_OMIT_AUTH=true flag disables token authentication entirely. CVE-2025-49596 was an RCE vulnerability in older versions when auth was omitted. Update to v0.21.2+ and never expose Inspector to untrusted networks.

Frequently Asked Questions

What is MCP Inspector?+

MCP Inspector is the official debugging and testing tool for Model Context Protocol (MCP) servers, built by the Anthropic MCP team. It is a React-based web UI that acts as a standalone MCP client, letting you test servers in isolation — browse tools, invoke them with custom inputs, inspect resources, and see raw JSON-RPC responses — before integrating them into Claude Desktop or Cursor.

How do I install MCP Inspector?+

MCP Inspector requires no installation. Run it directly with: npx @modelcontextprotocol/inspector. It starts a web UI on port 6274 and a proxy bridge on port 6277. Point it at any MCP server with: npx @modelcontextprotocol/inspector node build/index.js

When should I use MCP Inspector instead of Claude Desktop?+

Use MCP Inspector during development and debugging: it lets you test individual tools, inspect JSON-RPC responses, verify protocol compliance, and run tools in CI via CLI mode. Use Claude Desktop when you need to test the complete AI interaction, validate real prompts, or do end-to-end integration testing.

Why does my MCP server work in Inspector but not Claude Desktop?+

The most common cause is environment variables — Claude Desktop needs them declared in its config file, not just in your shell. Also check: (1) your server writes logs to stderr not stdout, (2) the command path is absolute or npx-resolvable from Claude Desktop context, (3) your server handles the initialize handshake correctly.

What MCP clients does MCP Inspector support?+

MCP Inspector can connect to any MCP server using stdio transport (Node.js, Python, or binary), SSE transport (HTTP server-sent events), or Streamable HTTP transport. It is transport-agnostic — if your server speaks MCP, Inspector can connect to it.

Related Resources

View MCP Inspector on GitHub ↗