← Back to Dashboard
1. The MCP Inspector2. Integration Testing3. Common Issues & Fixes

The MCP Inspector

📚 Testing & Debugging10 min100 XP⌨ Hands-on lab

Your Best Friend for Debugging

The MCP Inspector is an official interactive debugging tool that connects to any MCP server and lets you explore its capabilities, call tools, read resources, and test prompts — all through a web UI.

Running the Inspector

# For a local stdio server:
npx @modelcontextprotocol/inspector node dist/index.js

# With environment variables:
npx @modelcontextprotocol/inspector \
  -e NOTES_DIR=./notes \
  -e API_KEY=sk-... \
  node dist/index.js

# For a remote SSE server:
npx @modelcontextprotocol/inspector \
  --transport sse \
  --url https://mcp.example.com/sse

What the Inspector Shows

TabWhat It DisplaysWhat You Can Do
ToolsAll registered tools with schemasCall any tool with custom arguments, see responses
ResourcesAll resources and templatesRead resources, browse templates
PromptsAll registered promptsExecute prompts with arguments, see generated messages
NotificationsServer-pushed eventsMonitor real-time notifications
LogsRaw JSON-RPC trafficInspect every protocol message

Inspector Workflow

  1. Launch — Start the inspector with your server command
  2. Verify capabilities — Check all tools, resources, and prompts loaded correctly
  3. Test happy path — Call each tool with valid arguments
  4. Test error path — Call tools with invalid/missing arguments
  5. Check protocol messages — Use the Logs tab to verify JSON-RPC format
🎯 Pro Tip: Add an inspect script to your package.json: "inspect": "npx @modelcontextprotocol/inspector tsx src/index.ts". This makes debugging a one-command operation during development.
⌨ HANDS-ON LABDebug a Server with the Inspector
⭐ +150 XP

A tool call is misbehaving. Fire up the MCP Inspector against your server, then use its CLI mode to list tools without touching the browser.

1Launch the Inspector UI against your local server (npx the inspector, pass your server launch command).
2Now use Inspector CLI mode to list the server's tools headlessly (--cli plus --method tools/list).
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 2 — type "hint" if stuck
🧪 Knowledge Check
Press 1-4 to select1 of 3
What is the MCP Inspector?
A code linter
An interactive debugging tool with a web UI that connects to MCP servers for testing tools, resources, and prompts
A performance profiler
A security scanner
The MCP Inspector Tutorial | Testing & Debugging — MCP Academy