DS DevShelfHub Projects · AI tools
Tutorials / MCP / Inspector
MCP Intermediate · 7 min read Page 19 of 23

Debugging with MCP Inspector

By DevShelfHub

The official Inspector lets you exercise an MCP server outside of Claude — list tools, call them with JSON arguments, browse resources, get prompts, and watch the wire protocol live.

Series progress19 / 23

Run it

bash
npx @modelcontextprotocol/inspector \
  python /path/to/your_server.py

Inspector starts your server, attaches to stdio, and serves a UI at http://localhost:5173.

The five tabs

Tools

List, inspect schemas, call with JSON args, see results.

Resources

Browse, read contents, subscribe to changes.

Prompts

List, fill arguments, get rendered messages.

Server connection

Transport, capability matrix, current protocol version.

Notifications

Live feed of notifications/message, notifications/progress, list-changed events. Indispensable for verifying that your server emits what you think it does.

CLI & TUI Inspector

For automation and scripting:

npx @modelcontextprotocol/inspector --cli \
  --command python --args "/path/to/server.py" \
  tools/call get_forecast '{"lat": 37.7, "lng": -122.4}'

Claude Desktop logs

OSPath
macOS~/Library/Logs/Claude/mcp*.log
Windows%APPDATA%\Claude\logs
tail -F ~/Library/Logs/Claude/mcp*.log

Common failures

  • Server won't start — check absolute paths in claude_desktop_config.json and confirm the Python interpreter exists.
  • Tool not found — you forgot to declare tools in ServerCapabilities.
  • Invalid params — your arguments don't match inputSchema; tighten the schema or fix the call.
  • Hangs forever — you printed to stdout (which corrupts the message stream). Use stderr or the logging notification instead.

Quick summary

  • Inspector is the single most useful MCP dev tool — always test there first
  • CLI mode for scripts; TUI for terminal-heavy workflows
  • tail Claude Desktop logs for production issues
  • Never print to stdout in a stdio server — it corrupts the wire

MCP Inspector FAQ

What is the MCP Inspector?

The MCP Inspector is the official development tool for testing MCP servers. It provides a web UI, CLI, and TUI that connect directly to your server — listing tools, calling them with arguments, browsing resources, and showing the live JSON-RPC wire protocol.

How do I run the MCP Inspector?

Run npx @modelcontextprotocol/inspector to launch the web UI Inspector. Connect it to your server via stdio or HTTP. For a CLI-only option, use npx @modelcontextprotocol/inspector --cli to inspect via command line.

Can I use MCP Inspector with remote servers?

Yes. The Inspector supports HTTP-based transports. Enter your server's URL in the connection panel, and optionally add an authorization token if your server requires OAuth or bearer token authentication.

Where are Claude Desktop MCP server logs?

On macOS, Claude Desktop logs are at ~/Library/Logs/Claude/. Look for mcp-server-<name>.log files for server-specific logs and mcp.log for the general MCP connection log. These are invaluable when Inspector isn't available.

Should I use MCP Inspector before connecting to Claude Desktop?

Yes — always test with Inspector first. Inspector gives immediate feedback on tool definitions, input validation, and errors. Debugging in Claude Desktop is much harder because you can't see the raw protocol messages easily.

Quick jump:API Reference