Why AI-Built Apps Break · For engineers
MCP or a plain CLI? When an AI agent needs a protocol
GitHub's MCP server can add about 18,000 tokens at session start; gh's help pages, about 3,900 when used. When MCP is still the right choice.
Short answer Use a plain CLI when the agent has a shell and a mature CLI exists: it costs no context until used and composes with pipes. Use MCP when clients have no shell, users need their own logins, or the vendor must control access. Check whether your client defers tool definitions.
At the end of September, Earendil, the company behind the Pi coding agent, which had said publicly that Pi does not support MCP, put MCP into Pi's coreSource 1. Two days later, a Hacker News thread reported that Figma restricts MCP access to whitelisted clients, excluding PiSource 2; Figma's documentation says only clients listed in its MCP catalog can connectSource 3.
Both stories are about the same question every team building with agents now meets: should the agent reach a tool through the Model Context Protocol, or just run the tool's command-line interface? The answer depends on two costs, what the model has to read and who controls the connection, and the first one can be measured.
What it costs in context
We started GitHub's official MCP server, asked it for its tool list, and counted the tokens a model would read: each tool's name, description and input schema. We left out the icons the server also sends, which clients do not normally pass to the model. Then we counted the help pages an agent would read to open a pull request with the gh command instead.
| What | Tokens | When the model reads it |
|---|---|---|
| GitHub MCP server v1.13.0, default toolsets: 46 tools | about 18,100 | At session start, unless the client loads tools only on demand |
| The same server with every toolset: 91 tools | about 36,900 | At session start, unless the client loads tools only on demand |
| `gh --help`, `gh pr --help` and `gh pr create --help` | about 3,900 | Only when the agent runs them |
This is not a like-for-like test. The MCP figure is the whole tool list; the gh figure is three help pages for one job, and models often know gh without reading them. Counts also vary by model and tokenizer; these are Claude Sonnet tokens.
The client decides most of that cost. Claude Code defers MCP tool definitions in most setups: only tool names and server instructions load at session start, and the full definitions load when neededSource 4. Not every client works that way. Pi's makers write that many MCP servers are still built for clients that just dump tools into the contextSource 1. Before you add a server, check which kind your client is.
Where a plain CLI wins
When the agent has a shell and the tool has a mature CLI that models already know, such as git, gh, psql or a cloud provider's CLI, the CLI is hard to beat. It costs nothing until it is used, and its output can be piped into the next command. The Pi team puts it this way: CLIs are so functional because "the agent and model just wire stuff together with efficient bashisms"Source 1, while the biggest issue with MCP continues to be that it is hard to composeSource 1.
Where MCP wins
No shell. Chat apps, hosted agents and many assistants cannot install or run a CLI. A remote MCP server is how they reach your product.
Access per user. A CLI usually runs with whatever credentials sit on that machine. Over HTTP, MCP has an authorization flow, and a server must only accept tokens valid for its own resourcesSource 5, so a token issued for one server is not accepted by another. Our post on agent identity covers why that matters when an agent acts for a user.
Control for the vendor. Figma's catalog is the other side of the same coin: the vendor decides which clients may connectSource 3. That is reassuring if you are Figma's customer and frustrating if you build a new agent.
A path to better tools. Pi's makers now describe MCP as something that should be much closer to OpenAPI with intelligent tool discoverySource 1, and add that tools should return structured data and be discoverable by their documentation and description.
A rule of thumb
- Your agent runs in a terminal and a mature CLI exists: start with the CLI, with a token scoped to the job.
- Your users connect from chat apps or hosted agents, or need their own logins: ship a remote MCP server with authorization.
- You ship an MCP server: keep the tool list small and split it into toolsets (groups of tools you switch on or off), as GitHub's server does (46 tools by default, 91 with everything on). Write descriptions, not manuals.
- You use MCP servers: check whether your client defers tool definitions. If it does not, turn on only the toolsets you need.
The choice is less "protocol or no protocol" than "who runs the tool, and with whose credentials". Decide that first, and the transport follows.
Next step
Get new posts as they come out
Every new post, in plain English and in depth. Follow the RSS feed.
Sources
- "You Said No MCP!" (Earendil, 29 September 2026). Retrieved . ↩ ↩ ↩ ↩ ↩
- Figma restricts MCP access to whitelisted clients, excluding Pi (Hacker News, 1 October 2026). Retrieved . ↩
- Figma MCP server (Figma developer documentation). Retrieved . ↩ ↩
- Connect Claude Code to tools via MCP (Claude Code documentation). Retrieved . ↩
- Authorization (Model Context Protocol specification, 2026-07-28). Retrieved . ↩