Test your tools before Claude does
You have two tools defined on your MCP server. Before you wire them into the chatbot, you want to know they actually work — argument parsing, validation, and all. Writing a separate test harness for that is overkill. The Python SDK ships one for you.
The MCP Inspector is a browser-based debugger for your MCP server. You run it against a server file, it spins up a local UI, and you get a live environment where you can list tools, invoke them with arbitrary arguments, and watch the results come back. No integration, no Claude loop — just you and the server.
Starting the inspector
Make sure your Python environment is activated — check the project's README for the exact command if you are not sure. Then run:
mcp dev mcp_server.py
This launches a development server and prints a local URL, typically something like http://127.0.0.1:6274. Open that URL in your browser.
Working with the interface
The Inspector UI is actively evolving, so exact positions may shift between versions. The core elements stay stable:
- A Connect button that starts the MCP server process and opens the session.
- Navigation tabs for Resources, Tools, and Prompts — the three MCP primitives you will meet over the course.
- A tools panel that lists your server's tools and lets you invoke them.
Click Connect first. The status should flip from Disconnected to Connected, meaning the Inspector has launched your mcp_server.py and is talking to it.
Testing a tool
Navigate to the Tools tab and click List Tools. You should see read_doc_contents and edit_document — the two tools you defined in the previous lesson, with the names and descriptions you wrote on the decorators.
Select read_doc_contents. The right panel shows the tool's details and an input field for each parameter. Walk through a read:
- Enter
deposition.mdas thedoc_id. - Click Run Tool.
- Check the results panel for the success status and the returned document text.
If the document content comes back, your tool is wired correctly. Now try an error case: enter nonexistent.md and run again. You should see a failure result that traces back to the ValueError you raised — confirming that your validation path works too.
Testing tool interactions
The Inspector keeps server state alive across tool calls, which means you can test interactions between tools without restarting anything. A good smoke test for the edit flow:
- Run
read_doc_contentswithplan.mdand note the current content. - Run
edit_documentwithplan.md, anold_strtaken from that content, and anew_strof your choice. - Run
read_doc_contentsonplan.mdagain and verify the edit landed.
Because the in-memory docs dictionary persists for the lifetime of the inspector session, you are seeing the same state the chatbot would see at runtime.
Why this belongs in your workflow
Once you have the Inspector in muscle memory, it becomes the default place you prove a tool works. You get:
- Fast iteration — edit a tool, rerun
mcp dev, and test without booting the full chatbot. - Edge case coverage — hand-craft exactly the arguments you want, including the broken ones.
- State verification — chain tool calls and confirm the server's state changes match your expectations.
- Real-time debugging — see errors the moment they occur, with full context from the request.
It is the shortest feedback loop you have while building MCP servers. Use it for everything.
Key Takeaways
- 1The MCP Inspector is a browser-based debugger that lets you test MCP servers in isolation before wiring them into a full application.
- 2Running mcp dev against a server file launches the Inspector at a local URL where you can connect, list tools, and invoke them with arbitrary arguments.
- 3The Inspector maintains server state between tool calls, so you can test sequences of interactions like edit-then-read without restarting.
- 4Adding the Inspector to your workflow shortens the feedback loop for MCP server development and catches validation errors before they reach production code.