Apideck CLI – An AI-agent interface with much lower context consumption than MCP
TL;DR Highlight
Swapping MCP tool schemas for an ~80-token CLI prompt cut context use sharply
Who Should Read
An agent developer whose several MCP servers eat the context window with tool definitions alone
Core Mechanics
- MCP tool definitions eat context first
- Connecting GitHub, Slack and Sentry (about 40 tools) puts 55,000 tokens in context before any user message.
- That is over a quarter of Claude's 200k limit.
- Each tool costs 550-1,400 tokens for its name, description and JSON schema.
- One team burned 143k of 200k on definitions
- Three MCP servers used 143,000 of 200,000 tokens (72%).
- Only 57,000 tokens were left for conversation, documents and reasoning.
- Scalekit: MCP used 4-32x more tokens than CLI
- Based on 75 head-to-head runs with the same model (Claude Sonnet 4) and tasks.
- Checking a repo's language took 1,365 tokens via CLI and 44,026 via MCP.
- The cause is 43 tool definitions injected into every conversation.
- An ~80-token prompt plus --help discloses gradually
- The system prompt holds only a few lines of apideck usage.
- Each --list or --help call costs 50-200 tokens, only when the agent needs it.
- An accounting query took about 400 tokens across three --help calls.
- Permissions live in the binary, not the prompt
- By HTTP method: GET auto-approved, POST/PUT/PATCH prompt for confirmation, DELETE blocked by default.
- DELETE needs --force and writes need --yes.
- permissions.yaml can override policy per operation.
- CLI can lose on multi-step writes
- In Sideko's 12 Stripe tasks, Code Mode MCP used 58% fewer tokens than raw MCP and 56% fewer than CLI.
- Creating an invoice took 19 LLM round trips with CLI, 12 with raw MCP, 4 with Code Mode.
- The post lists where CLI is weaker
- MCP is better for per-user OAuth and audit trails when agents act for other people's users.
- CLI is weak at streaming and bidirectional communication, and binaries add distribution friction.
Community Reactions
- An MCP core maintainer pushed back in comments
- They say modern MCP clients use tool search, so the context argument is outdated.
- They find installing a CLI with access to everything on the box terrifying.
- Opinion that Claude Code and Codex already have tool search
- A commenter called the post's information outdated because tool search has existed for months.
- Another suggested skills, which also load in tiers.
- Experience that secret isolation favors MCP
- A commenter noted a CLI's env variables or credential file are readable by the agent.
- Their attempts to fix this with a separate user or a socket server started to look like MCP.
- Experience wrapping MCPs in a CLI works well
- One commenter gives the agent only Bash, a CLI wrapper for the MCPs and code writing, and says it works great.
- Another keeps an MCP server that only instructs the agent about the CLI, and Claude and GLM-5 handle it fine.
- Experience lazy-loading an 85-tool server
- The manifest was about 17k tokens.
- Toolset tiers and hiding tools until _connect shrank the listed surface.
How to Apply
- Measure your MCP tool-definition tokens
- Log the token count of the system prompt right before the agent's first request.
- Compute the share of total context and flag it if it exceeds 20%.
- Expose big APIs via --list/--help
- Wrap internal APIs with 50+ endpoints in a CLI.
- Put only 5-6 lines of usage in the system prompt and let the agent explore with --help.
- Hardcode write and delete permissions in the CLI
- Allow GET, require --yes for POST/PUT/PATCH, require --force for DELETE.
- Enforce it in the binary instead of writing prohibitions in the prompt.
- Split approaches by workload
- Keep MCP if the agent repeatedly calls the same 5-10 tools.
- Move multi-step tasks with loops or polling to code execution.
Try It
# Paste into Claude Code or ChatGPT. Simplified version of the article's method: design check for progressive-disclosure CLI
My service's APIs are listed below.
{{API endpoint list}}
Assume I wrap this API in a CLI for agents. Produce:
1. A system prompt under 100 tokens (structure: --list, <api> --list, <api> <resource> <verb> --help)
2. Example 3-level --help outputs with estimated tokens per level
3. Permission rules by HTTP method: GET allowed, POST/PUT/PATCH need --yes, DELETE needs --force
4. A token comparison against exposing the full API as MCP tool definitionsTerminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques