Why I'm building my own CLIs for agents
a day ago
- MCP (Model Context Protocol) has significant token consumption issues, using up to 15,000 tokens for a single tool like Playwright, which limits usable context window.
- LLMs face non-linear computational scaling with context length, making long sessions expensive and slow.
- Selectively disabling MCP tools is not supported in some platforms like Claude Code, leading to frequent context length limits.
- Using CLIs instead of MCP dramatically reduces token usage (e.g., 71 tokens for Linear CLI vs. thousands for MCP).
- Building custom CLIs is straightforward: from OpenAPI specs, API docs, or even HAR files from websites without public APIs.
- CLIs enable agents to perform complex multi-step tasks (e.g., finding bug emails, creating tickets, fixing issues, drafting replies).
- Skills standardize CLI use but have challenges with dependencies and cross-platform binaries.
- Project-specific CLI instructions in git-tracked files improve organization and agent performance.
- This CLI approach achieves MCP's vision (connecting data sources to LLMs) without its token consumption problems.
- The author predicts a resurgence of terminal UIs and custom CLIs for agent workflows.