Debug an MCP Server with the MCP Inspector
A tool on my MCP server failed with an error a model could do nothing with. The Inspector's command line mode showed me that error exactly as a model would get it.
Video #31 ยท AI agents and MCP
Steps in the video
Files
- package.json (7 lines)
- run.py (62 lines)
- server.py (20 lines)
- server_fixed.py (24 lines)
Tested with
Python 3.12.15 | mcp==2.3.0
What this does not show
Two small made-up tools over standard input and output. Only the Inspector's command line mode was run (Inspector 2.12.0 on Node 22.14.0, which is older than the documentation asks for), not the web page or the terminal interface. The two checks are my own and no language model was used.
Sources
Learning IT by Example.