Never wire an untested server into a real host. Exercise it with the MCP Inspector, then connect it to Claude Desktop or Claude Code and verify end to end.
Why: the Inspector is a GUI that connects to your server and lets you list and call tools, read resources, and run prompts — so you catch schema and error bugs before any model is involved. When: run it after every change; it is your unit-test harness for MCP. Where: it launches your server the same way a host would, so what works here works in the host.
# Launch your server inside the Inspector (opens a local UI):
mcp dev server.py
# In the UI: connect, list tools/resources/prompts, then call each one with
# valid AND invalid inputs. Confirm errors come back as readable results.Why: the CLI can register your server into Claude Desktop’s config for you, so you skip hand-editing JSON. When: install once the Inspector is green; the host will launch the server on demand. Where: after installing, restart the host so it picks up the new server.
# Register the server with Claude Desktop:
mcp install server.py --name weather
# Or add it to Claude Code:
claude mcp add weather -- python /absolute/path/to/server.py
# Restart the host, then ask it something that needs your tool.Why: the real test is a model actually selecting and calling your tool through the host — descriptions that read fine to you may still confuse the model. When: prompt the host with a request that should trigger each tool and watch which one it picks. Where: if it calls the wrong tool or bad arguments, fix the description and schema, not the model.
In the host, try prompts that should exercise each primitive:
"What's the weather in Cairo?" -> should call get_forecast
"Open a ticket titled 'Login bug'" -> should call create_ticket
"Which cities do you support?" -> should read weather://cities
Wrong tool or wrong args? Sharpen the description — that's the model's only guide.