Step 4 of 4

Inspect the Connection

Launch the server with MCP Inspector and verify initialization, tool discovery, and a complete tool invocation.

The server is useful only when a client can initialize a session, discover the tool, and invoke it successfully. Use the SDK development command to launch MCP Inspector:

TerminalShell
uv run mcp dev server.py

The command imports the module, finds the mcp server object, launches it over stdio, and opens the Inspector development interface.

Verify the protocol flow

In Inspector:

  1. Connect to the server.
  2. Open the Tools section.
  3. Confirm that add appears with integer fields for a and b.
  4. Invoke it with a = 2 and b = 3.
  5. Confirm that the result contains 5.

You have now exercised the essential path: initialization, capability negotiation, tool discovery, tool invocation, and a structured result.

Diagnose the common failures

  • If the module cannot be imported, run the command from the project directory and recheck the filename.
  • If the tool is missing, confirm that @mcp.tool() decorates the function attached to the same mcp instance.
  • If the stdio connection breaks, remove ordinary print() calls from server code.

Step 4

Ready to continue?

Mark this step complete when you have finished the checks above.

Checking saved progress…

Find it across ATM

Search All Things MCP

ESC

Search the practical layer around the protocol.

Browse Guides Read the Blog Follow Spec Watch

Your ATM account

Sign in or create an account

Continue with GitHub. If you’re new, your ATM account will be created automatically.