TL;DR: The article argues that AI workflows often work better through CLI than Model Context Protocol because CLI preserves validation, reduces token overhead, and avoids context-window degradation, according to Aembit. The practical lesson is that protocol choice is now an identity and governance decision, not just an integration preference.
NHIMG editorial — based on content published by Aembit: MCP versus CLI for AI tool access and the trade-offs for AI workflows
By the numbers:
- MCP sessions tend to degrade after around 15 steps as accumulated state fills the context window.
- The article says that CLI interactions stay flat because each call is stateless, and step 50 is as clean as step 1.
Questions worth separating out
Q: How should security teams choose between CLI and MCP for AI tool access?
A: Choose the narrowest interface that still meets the use case.
Q: Why does MCP create extra governance work compared with CLI?
A: MCP adds a protocol layer, session state, and tool schemas that the agent has to carry during execution.
Q: What breaks when AI workflows rely on large MCP tool schemas?
A: Long sessions become harder to manage because schema payloads and accumulated context consume tokens and reduce the model's ability to track earlier steps.
Practitioner guidance
- Default to CLI for agent tool access where validation matters Use CLI when the target system already exposes a trustworthy native API path and the workflow does not require shared session state.
- Treat MCP sessions as governed stateful boundaries If you do use MCP, define the session as an auditable non-human identity boundary with explicit scope, logging, and retention rules.
- Measure token and context overhead before standardising Compare token consumption, error rates, and completion quality across MCP and CLI for the same task class.
What's in the full article
Aembit's full analysis covers the operational detail this post intentionally leaves for the source:
- Benchmark comparisons for token usage and context growth across MCP and CLI task flows.
- Implementation notes on when MCP is the better fit for sandboxed clients or shared-session coordination.
- Examples of OpenAPI and workspace tooling patterns that show how teams can wrap CLI first, then add MCP selectively.
- Roadmap considerations for exposing the same capability to humans, scripts, and AI agents without fragmenting control.
👉 Read Aembit's analysis of MCP versus CLI for AI tool access →
CLI versus MCP for AI agents: what works best in practice?
Explore further
CLI-first agent access is becoming the practical baseline for governed tool use. The article shows that agents do not need a protocol layer simply because it is available. If the task can be expressed as a command, CLI often preserves the same validation path while reducing context overhead and integration friction. For identity programmes, that means the interface choice is now part of control design, not just developer ergonomics. The practitioner conclusion is to treat CLI as the default governance baseline unless shared state or sandbox constraints require otherwise.
A few things that frame the scale:
- 66% believe this risk is immediate, according to AI Agents: The New Attack Surface report.
- Only 52% of companies can track and audit the data their AI agents access, leaving 48% with a complete blind spot for compliance and breach investigation.
A question worth separating out:
Q: How should teams govern agent access when both CLI and MCP are available?
A: Govern them separately, because they expose different execution patterns. CLI is usually easier to inventory, validate, and retire, while MCP can preserve state across multiple actions and therefore needs tighter session controls. Access reviews should include interface type, exposed tools, and how state is retained or discarded.
👉 Read our full editorial: CLI versus MCP for AI tool access: what practitioners need to know