MCP Inspector — Debug and Test MCP Servers
Official debugging tool for MCP servers. MCP Inspector provides a web UI to connect, test tools, inspect messages, and validate responses from any MCP server interactively.
What it is
MCP Inspector is the official debugging tool for Model Context Protocol (MCP) servers. It provides a web UI where you can connect to any MCP server, discover its tools, call them with test inputs, inspect request/response messages, and validate that responses conform to the MCP specification. Think of it as Postman for MCP servers.
Developers building or debugging MCP servers benefit from the Inspector. It removes the need to wire up a full AI agent client just to test whether your server's tools work correctly.
How it saves time or tokens
Without the Inspector, testing an MCP server requires connecting a full AI agent (like Claude Code), writing a prompt that triggers the tool, and hoping the agent calls it correctly. The Inspector lets you call tools directly with specific inputs, see raw responses, and iterate on fixes in seconds. This eliminates the token cost of using an AI agent as a test harness.
How to use
- Run the Inspector with npx
- Connect it to your MCP server
- Browse tools, call them with test inputs, and inspect responses
Example
# Launch MCP Inspector
npx @modelcontextprotocol/inspector
# Opens web UI at http://localhost:5173
# Connect to a specific MCP server
npx @modelcontextprotocol/inspector npx -y @modelcontextprotocol/server-sqlite /path/to/db.sqlite
# In the web UI:
# 1. Click 'Connect' to establish connection
# 2. Browse available tools in the left panel
# 3. Click a tool, fill in parameters
# 4. Click 'Call' to execute and see the response
Related on TokRepo
- MCP integrations — Browse MCP server configurations
- AI tools for testing — Explore testing and debugging tools
Common pitfalls
- The Inspector connects via stdio by default; servers using SSE transport need the
--transport sseflag - Some MCP servers require environment variables (API keys); pass them before the server command
- The Inspector shows raw MCP protocol messages; familiarity with the MCP spec helps interpret responses
Frequently Asked Questions
No. Run it directly with npx: `npx @modelcontextprotocol/inspector`. It downloads and runs without global installation. Node.js 18+ is required.
Any MCP server that follows the protocol specification. This includes official servers (filesystem, SQLite, GitHub) and custom servers you build. The Inspector discovers tools automatically via the MCP handshake.
Yes. For servers using SSE transport, point the Inspector at the remote URL. For stdio servers, you need to run the Inspector on the same machine or use SSH tunneling.
Yes. The Inspector displays the full JSON-RPC messages exchanged between the client and server. This is invaluable for debugging protocol-level issues like malformed responses or missing required fields.
The Inspector is designed as an interactive debugging tool. For automated MCP server testing in CI, use the MCP protocol directly via a test script or the official SDK's client library.
Citations (3)
- MCP Inspector GitHub— Official MCP debugging tool with web UI
- MCP Specification— Model Context Protocol specification
- MCP Documentation— MCP server testing and validation
Related on TokRepo
Source & Thanks
Part of the official Model Context Protocol SDK by Anthropic.
modelcontextprotocol/inspector — Official MCP debugging tool