In this video, you will verify that your Dog Age Calculator works correctly by testing it with the MCP Inspector.
First, you need to ensure your MCP server is actually running. Open your terminal in the lesson_2 directory and run the server script.
uv run --with mcp tools_demo_server.py
Wait until you see the message Uvicorn running on http://127.0.0.1:8000. This confirms your server is active and listening for connections.
Now, keep that terminal running and open a new terminal window or tab. In this new window, launch the MCP Inspector.
npx @modelcontextprotocol/inspector
This starts the Inspector proxy and automatically opens a web interface in your default browser, usually at localhost:6274.
On the Inspector welcome screen, you need to tell it where your server is located. Since you are using the streamable-http transport, enter your server’s URL.
Type http://localhost:8000/mcp into the URL field and click Connect.
Once connected, you will see the status change.
Now, click on the Tools tab in the top navigation bar.
Click List Tools. The Inspector queries your server, and you should see the calculate_dog_in_human_year tool appear with the description you wrote in the Python docstring.
To test it, expand the tool definition. You will see an input field for dog_age. Enter a test value, for example, 3.
Click Run Tool.
The Inspector sends the request to your Python server, which performs the math and returns the result. Look at the Result section on the right. You should see a success message and the output showing result: 28.
This confirms your tool is working perfectly and is ready to be used by an AI application.