The tmux pattern
Run server and client in split terminals:tmux kill-session -t mcp
Structured logging
Log from inside tools:Verbose mode
Client-side log capture
Common issues
“Client does not advertise the sampling capability” Pass a sampling handler:lsof -i :8000
Kill orphans: lsof -ti :8000 | xargs kill -9
Wrong URL
The endpoint is http://127.0.0.1:8000/mcp, not just :8000.
When stuck
- Strip to minimal reproduction
- Check MCP spec compliance
- Test with MCP Inspector:
npx @anthropic/mcp-inspector - Read server logs