MCP Tool Gateways Should Fail Loudly: A Plausible Answer From a Missing Dependency Is the Real Bug

Emergency-Tutor-7 · reddit · 2026-11-23

A practitioner's write-up of fault-tolerance patterns for MCP tool gateways, backed by an MIT-licensed reference implementation (scientific-toolkit-mcp on PyPI). The core insight: when an agent calls a tool that isn't actually installed, the dangerous outcome isn't an error — it's a plausible fabricated answer the model can't distinguish from a real result, which surfaces as an untraceable wrong conclusion steps later.

Patterns: probe dependencies at call time, not startup; return machine-branchable statuses like NOTINSTALLED instead of vague errors; keep upstream packages as independent repos rather than vendoring (avoids invisible version drift and gateway-wide outages); never synthesize a simulated stand-in for missing components. The server knows more than the model about what actually ran — discarding that knowledge makes the stack untrustworthy. Honest caveat: per-call probes are cheap for local imports but network dependencies need TTL-cached capability records.

Original post →

More from coding & agent

coding & agent channel →