MCP vs CLI: What Actually Survived in Production
A retrospective on MCP vs CLI for AI agents: token costs, lifecycle independence, containers, and a decision tree built from production failures.
A multi-part investigation into whether MCP (Model Context Protocol) or CLI tooling is cheaper for AI agents concludes that the original framing was flawed. Token benchmarks confirmed MCP calls cost roughly 170 tokens versus 460-3,100 for raw CLI calls, but the real driver of waste was schema injection: loading every tool's schema into every prompt regardless of actual use, which pushed a 93-tool monolith to 55,000 tokens per call.
The bigger lessons came from production failures rather than benchmarks. MCP servers turned out to have independent lifecycles - surviving even after a client plugin's process died - while container-based deployment eliminated the need for environment-specific setup scripts across WSL, Windows, and CI. A four-layer decision tree (plugin vs server, stdio vs SSE, focused vs monolithic tools, MCP vs CLI) emerged not from theory but from a 77-day pull request that documented every wrong architectural choice along the way.
The resulting strategy: use MCP for structured queries with typed schemas, CLI for zero-overhead actions, keep servers focused at 3-8 tools each, and default to containerized deployment. Several early choices - the 93-tool monolith, per-machine install scripts, an MCP-based git-push tool - were replaced once production behavior showed the actual cost was located elsewhere.
This matters for engineers building agentic systems: cost and architecture decisions belong at the front of the process, not as an afterthought, since getting the first-layer choice wrong compounds through every layer that follows.