By Olga Safonova
Published: 2026-05-07
URL: https://olgasafonova.substack.com/p/three-layers-not-two-camps
I watched a community thread devolve into MCP vs CLI. Long, sharp, technical. Almost nobody who builds both.
I build MCP servers. I also enhance and use CLIs. And I write skills that wire them together. They solve different problems. This piece is about when each layer is the right call, with real examples from a setup that runs all three daily.
The thread that started this
Someone asked: “Why do some people feel so strongly against MCPs?”
The answers were sharp and specific. Token pre-loading: every MCP tool description sits in the agent’s working memory whether you call the tool or not, eating into the context window. No piping: there’s no native way to feed one MCP tool’s output into another the way you can with shell commands. Auth passthrough: if the agent has to construct API requests for you, your credentials risk passing through the model’s context. Multi-agent portability: an MCP server has to be configured in every agent that uses it. Dropped connections: networked MCP servers cut off mid-call.
These are real engineering problems with solvable designs. The thread framed MCP and CLI as competing philosophies. They’re different layers of the same stack, and both layers serve a third one most people forget about: the agent’s instruction sheet.

The three layers, briefly
Before the catalogue, the picture you need:
- MCP servers are tool surfaces with structure. The agent discovers what’s available from a typed list and calls each tool through a defined schema.
- CLIs (command-line interfaces) are tool surfaces with shell ergonomics. The agent invokes a command, reads the text output, optionally pipes it into the next command.
- Skills are short markdown documents the agent reads to know which surface to use, when, and how to call it well.
The agent is the only thing doing the calling. Skills don’t call MCP servers. MCP servers don’t manage CLIs. Each layer is independent. The three meet at the agent.
Layer 1: MCP servers
MCP servers are the structured interface layer. They expose typed tools with input schemas, descriptions, and discovery. The agent doesn’t need to know your API exists before it finds the right tool.
I run nine MCP servers in my personal portfolio. Eight in Go, one in TypeScript. (There’s a tenth I built for work that I’m not catalogue-ing here, but a few skills that depend on it show up later.) Each wraps a domain that benefits from structure:
- miro-mcp-server. 92 tools: 91 for canvas operations (stickies, shapes, frames, connectors, tags, groups, mindmaps, exports) and one
miro\tool\searchmeta-tool that lets the agent search the rest by keyword. Many tools work here because Miro is a small world: every board object is one kind of item or another, and each kind supports the same four basic actions (create, read, change, delete). The meta-tool exists because loading 92 tool descriptions costs about 15K tokens of context, so clients can opt into a 15-tool essentials profile and reach the rest on demand through search.
- mediawiki-mcp-server. 42 tools for wiki authoring, search, link checking, and markdown conversion. The agent can read a page, edit it, check whether outbound links still resolve, find orphan pages, or convert markdown into wikitext before saving.
- tilbudstrolden-mcp. 18 TypeScript tools for cross-Nordic grocery shopping across Denmark, Norway, Sweden, and Finland. Search deals, compare unit prices, plan weekly meals around what’s on sale, build shopping lists grouped by store. The name is Danish for “the troll of deals,” but the troll roams Nordic-wide.
- ridge. 19 tools that reverse-engineer architecture from a directory tree. Point it at a Go, TypeScript, or Python codebase and it walks the source to build a structured graph of services, packages, databases, queues, caches, endpoints, and the relationships between them, with confidence scores on every edge. The same graph model works for markdown trees (Obsidian vaults, doc directories), where wiki-links and relative
.mdlinks become edges. Beyond the scan, ridge generates diagrams in nine formats (including a self-contained D3 force-directed HTML page), validates architecture rules (circular dependencies, layering violations, boundary crossings), and detects drift between any two git refs. Thearch\drift\explaintool returns a paste-ready PR paragraph through pure templating, no LLM round-trip needed. Architecture diagrams normally go stale the day you commit them; ridge rebuilds them from source on demand.
- nordic-registry-mcp-server. 23 tools across the four Nordic government business registries (Norway’s Brønnøysundregistrene, Denmark’s CVR, Finland’s PRH, Sweden’s Bolagsverket) in one binary. Look up a company by name or organisation number, fetch board members and signing authority, list branch offices, monitor for changes since a given date.
- gleif-mcp-server. 12 tools for looking up Legal Entity Identifiers. An agent searching for “Apple Inc LEI” calls
search\_entityand gets a typed response, without ever needing to know the GLEIF API exists.
- productplan-mcp-server. 47 tools for product roadmap management. Read and update plans, bars, milestones, releases, and tags through typed schemas, so an agent drafting roadmap edits can’t malform the request.
- ratatoskr (currently private). 15 tools for searching a product help center from inside the editor: browse sections, search topics, read pages, view screenshots, extract PDFs, compare translations, audit links. Named after the Norse squirrel that runs up and down Yggdrasil carrying messages between the eagle in the crown and the dragon at the roots.
- diagram-insight-mcp (currently private). 10 tools for diagram comprehension through a vision-language model. Feed it an architecture, sequence, or flowchart diagram and the agent gets back a structured description of what the picture is saying.
That’s where the structure earns its keep: bounded domains where typed schemas catch malformed requests before they hit the API.
When MCP wins: the agent benefits from discovering what’s possible. The domain has a finite set of operations. Input validation matters (financial data, regulatory lookups, structured board manipulation). Auth is handled inside the server’s compiled code so credentials never travel through the model’s context.
That last point is worth pausing on. The thread raised auth passthrough as a criticism of MCP, but it’s actually the opposite. MCP servers handle authentication in code: the OAuth flow, the API key injection, the token refresh all happen server-side.
The agent just calls search\_entity and gets results. Compare that to a skill that tells the agent to construct raw HTTP requests with credentials in the prompt. Those credentials flow through inference and any observability the provider runs on the model.
Layer 2: CLIs
Some APIs are too big to wrap in MCP. Wrap a service that exposes hundreds of methods as MCP tools and the tool list alone crowds the agent’s context window before any actual work begins. CLIs are the cleaner answer for that case: one binary, one calling pattern, no per-method context cost.
I use two CLIs daily, both supported by skills and rules that explain how to call them.
gws is a CLI that covers everything in Google Workspace: Gmail, Calendar, Drive, Docs, Sheets, Slides, Tasks. Each of those services has dozens to hundreds of methods. Imagine listing every one as a separate MCP tool. The agent’s context window would be half-full of tool descriptions before it did anything useful.
Instead, gws handles login (browser-based OAuth, credentials stored in ~/.config/gws/), and the agent calls it through Bash:
gws calendar:v3 events list --params '{ "calendarId": "primary", "timeMin": "2026-04-05T00:00:00+02:00", "timeMax": "2026-04-05T23:59:59+02:00", "singleEvents": true }' --format json
The agent doesn’t need a tool schema for every Google API method. It needs to know the pattern: gws [service] [method] --params '{...}'. That pattern is taught through a rule file (more on this in Layer 3), not an MCP tool list.
li-cli is my Rust CLI for LinkedIn. It lets me run LinkedIn from the terminal without opening a browser: read and reply to messages, browse the feed, react and comment on posts, send and accept connection invitations, search for people, jobs, and posts, audit my own profile for staleness, and answer the daily “who do I know at this company?” question with one command. There are 44 subcommands across 11 domains, including the day-to-day ones (Profile, Feed, Messages, Connections, Search, Company, Events, Notifications) and a few composite commands like inbox for the morning check and who for network overlap.
It’s a fork of linkedin-rs by Mark Ruvald Pedersen, who built the core client, login flow, and protocol handling. I built the daily-driver shell on top of that: the additional commands, the inbox composite, the network-overlap queries, JSON output for piping into other tools, and shell completions.
LinkedIn’s public API is built on Rest.li, an open-source REST framework LinkedIn built and uses internally. Rest.li sits on top of HTTP but layers on custom conventions: required headers like X-RestLi-Protocol-Version, response wrapping (entities returned inside a CollectionResponse envelope), and projection rules for limiting fields. LinkedIn ships official Python and JavaScript clients that handle this; generic HTTP clients have to handle it manually.
The Rust binary takes care of all of it. Login is a browser cookie (li\_at) stored locally. The agent calls li feed list --count 20 and gets posts. It never sees the cookie, never constructs the protocol headers, never touches the transport layer.
li inbox # morning check: messages, invitations, notifications li feed list --count 20 # browse the feed li who Anthropic # who do I know there? li search posts "AI engineering" # search posts by topic li messages reply <id> "thanks!" # reply from terminal li profile audit # check my own profile for staleness
When CLI wins: the API has too many methods to wrap each one as its own MCP tool (Google Workspace). The API uses a non-standard protocol that’s a pain to call directly (Rest.li). Login uses session cookies or browser cookies that shouldn’t travel through the model’s context. You want to chain commands together with shell pipes (li feed list --json | jq '.[] | select(.reactions > 50)' reads as “list my feed, then keep only posts with more than 50 reactions”).
And one CLI installed on your machine works with every AI agent you have at once, no extra configuration per agent.
Layer 3: Skills (and rules)
Skills are short markdown documents the agent reads when relevant. They explain how to use a CLI or MCP server, give context about which tool to pick, and encode recurring workflows. Rules are the same idea at a different scope: they live alongside skills but load globally, attaching themselves whenever a matching context appears.
My skills divide into three rough groups, with rules sitting alongside as a fourth.
Rules that document CLI patterns. A gws-cli.md rule documents every Google Workspace service pattern, login setup, timezone handling (always Europe/Copenhagen, always include UTC offset), and the gotcha that Calendar’s table format silently drops events.
The rule isn’t a skill; it’s a context document that loads automatically when the agent is doing calendar or Gmail work. Skills like today (daily standup prep) and dropcheck (catching dropped balls in Gmail and Calendar) read this rule to know how to call gws correctly.
Skills that wrap CLIs for specific outcomes. linkedin-sift is the discovery layer for my LinkedIn feed: it calls li to pull recent posts, filters out noise, and surfaces a shortlist of items worth deeper review. skillcheck-engage finds LinkedIn posts about MCP and Claude skills, drafts replies, and posts after my approval. Both rely on li for read access.
Skills that span both layers. These show why the three-layer model matters:
siftis a content evaluation pipeline that handles several input types. For URLs, it extracts clean article content through a fallback chain: a reader API first, thentrafilatura(a Python tool that strips ads and navigation off a webpage and returns just the article text), thencurlas a last resort. For YouTube videos, it pulls transcripts viayt-dlp(a command-line tool that downloads subtitles and metadata from video sites). For GitHub repos, it uses theghCLI. For my open Chrome tabs, it discovers each tab via AppleScript and then reads the page contents through theclaude-in-chromeMCP server (a Chrome extension that exposes browser actions to Claude through MCP); pages in Chrome are already JS-rendered, so extraction works on sites wherecurlandtrafilaturacome back empty (LinkedIn Pulse, Medium, most single-page apps). It evaluates everything against seven lenses and routes the keepers to my Obsidian vault. The agent reads the skill, then picks the right tool for the input shape.
lmwtfyanswers colleague questions about a product I work on. It searches GitHub source code (via theghCLI), the customer-facing 360 Online help center (via Ratatoskr, an MCP server I built that wraps the help-center search), Azure DevOps (Azure DevOps MCP server), and the internal wiki (mediawiki MCP server). Four data sources, two transport layers, one skill telling the agent how to weave them together.
todayruns daily standup prep: checks Azure DevOps (MCP), GitHub activity (ghCLI), Google Calendar (gwsCLI), and Obsidian notes (file reads). Four systems, three layers, one prompt.
Skills that show up in customer work. I work in product management for a records management platform. A handful of skills do the heavy lifting on that side of my desk:
release-prepgenerates release notes from Azure DevOps work items.
bid-inteldrafts bid and tender responses by searching the wiki, GitHub source, and existing intel folders.
enhanced-edoc-updategenerates the weekly stakeholder progress report from Azure DevOps and GitHub activity.
Each of these calls the same kinds of tools the personal-knowledge skills do. The pattern repeats: the agent reads the skill, then calls into MCP servers and CLIs as the work requires.
Where each layer reaches
The decision matrix gets sharper if you pull back and ask which agent surfaces support which layer in the first place. Three tiers, each with different reach.
The chat web apps are the narrowest. Claude on the web and ChatGPT on the web can load MCP servers and read skill files. They can’t shell out to a CLI, and they can’t call arbitrary APIs. ChatGPT has one partial exception: Custom GPT Actions, a mechanism that lets a Custom GPT call your API if you describe it in an OpenAPI spec. The newer ChatGPT Apps SDK uses MCP rather than Actions.
Cloud-based development agents sit in the middle. Anthropic’s Cowork and OpenAI’s Codex (cloud) both run as managed cloud sandboxes that you talk to from a browser. They support CLIs, MCP servers, and skills out of the box. They support direct API calls too, but with restrictions: both sandboxes block outbound network traffic by default, so you have to whitelist specific domains and configure access before either can reach an external service.
The local developer tools have full reach. Codex CLI, Claude Code, and Cursor support all four delivery methods without restriction. CLIs run because the agent has a shell. APIs work because there’s no network sandbox. MCP and skills work because every modern agent loads them.
Two patterns are worth pulling out of that.
MCP and skills work everywhere. Every surface I just walked through can load an MCP server or read a skill file. Nothing else has that reach.
Chat surfaces have less reach than developer surfaces. The web chat apps, which are also the surfaces with the most users, have the narrowest set of options. The debate I see online treats MCP-vs-CLI as if every agent could pick freely. Most can’t.
If you’re a builder shipping a product to AI agents:
- Ship only an API and you’re invisible to chat users.
- Ship only a CLI and you’re invisible to web-based agents.
- Ship an MCP server and every surface can reach you.
When to pick which
Once you’re inside an agent surface that supports all three layers, the question becomes which layer fits which job. Here’s the heuristic I land on after building all three:
Below ~20 operations: MCP. The agent benefits from discovering what’s available. Diagram-insight has 10 tools. Ratatoskr has 15. Tool descriptions fit comfortably in context, and schemas catch malformed requests early.
Above ~50 operations: CLI plus a rule or skill. Token efficiency dominates. Google Workspace has hundreds of methods. LinkedIn has dozens of endpoints across nine domains. Enumerate those as MCP tools and you’ve spent your context budget before doing any work.
The gray zone (20-50): depends. TilbudsTrolden has 18 tools. Could be a CLI. But meal planning workflows need the agent to discover tools (”what can I do with recipes?”), and the input schemas for plan\and\shop are complex enough that free-form CLI args would produce errors. MCP wins here despite the tool count.
Three additional dimensions push the boundary in either direction:
- Who’s the consumer. Chat users with conversational, sporadic traffic want MCP: small responses, stateful turns, dynamic discovery. Backend services with high-volume programmatic traffic want a direct API. Power users running scripts or CI pipelines want a CLI.
- Auth complexity. A simple API key works in any layer. OAuth flows, browser cookies, and session tokens are easier to handle safely in a CLI (credentials stay in the binary or local config) or in MCP server code than in a skill that asks the agent to construct requests.
- Multi-agent reuse. A CLI installed once serves every agent on the machine. An MCP server has to be configured in each agent. Skills also carry across agents if you share your config repo.
Token cost is the single dimension most people underweight. MCP carries roughly a 4-32x overhead on tool listings and metadata compared to a direct API call. That’s not an argument against MCP; it’s an argument for not loading every server in every context.
What the thread got right
Token pre-loading is real. My nine MCP servers expose 278 tools combined. That’s a lot of tool descriptions sitting in context before any work happens. I make intentional choices about which servers to load in which context, and the Miro server’s miro\tool\search profile (15 essentials plus the meta search) shows what server-side mitigation can look like.
Composability is a real gap. When I want “find all Miro stickies in frame X, then create connectors between them,” the agent makes multiple round trips where a single piped command would suffice. Anthropic and others are working on solutions, but they’re not mature.
Connection instability is real for networked MCP servers. Less so for local ones, which run as processes on your machine talking to the agent through standard input/output. They don’t go over the network, so they don’t disconnect. Most of my Go servers run locally, and I can’t remember the last time one crashed.
Two things have changed since the thread that I’d weight against the criticisms.
Governance moved off Anthropic. On 9 December 2025, Anthropic donated MCP to the Agentic AI Foundation, a directed fund under the Linux Foundation. Two other projects joined as co-founders: OpenAI’s AGENTS.md (a vendor-neutral file format that lives at the root of a code repo and tells AI coding agents how to work in that codebase, similar in spirit to Anthropic’s CLAUDE.md) and Block’s goose, an open-source AI coding agent framework. Single-vendor risk was the most common reason enterprise architects hesitated to bet on MCP; the foundation arrangement removes it.
The cross-vendor commitment matters too. Anthropic, OpenAI, and Block all betting on the same neutral home is a stronger signal than any single donation would have been. (announcement, Linux Foundation press release)
Adoption has compounded. As of early May 2026, the @modelcontextprotocol/sdk TypeScript SDK pulls roughly 143 million monthly downloads on npm, and the mcp Python package pulls another 244 million on PyPI: close to 400 million combined across the two official SDKs. (You can verify either number live: npm at api.npmjs.org/downloads/point/last-month/@modelcontextprotocol/sdk, PyPI via pypistats.org/api/packages/mcp/recent.) The criticisms in the thread are still valid; the question is whether they’re worth weighing against the alternatives, and the alternatives keep losing surface area.
What the thread missed
Nobody distinguished local from networked MCP servers. The “MCPs disconnect all the time” complaint applies to networked servers, not local ones.
Nobody pointed out the upside of input schemas. CLI arguments are just text strings the agent has to guess at. MCP tool schemas spell out which fields are required, what types they take, and which values are valid. For complex inputs (a Miro board with specific frame layout and tagged stickies), schemas catch errors before the call runs.
Nobody framed skills as a distinct layer. The thread treated it as MCP vs CLI: structured discovery vs lean invocation. Skills are the third piece. Without skills, a CLI is a binary the agent has to guess at. Without CLIs, an MCP server for a 200-method API eats your context window. Without either, an agent in a chat surface can’t reach your product at all.
Nobody mentioned security. Three things deserve more conversation than they get:
- Prompt injection through tool descriptions and tool outputs. Anything an MCP server returns can carry instructions the agent might follow. The defenses are still maturing.
- Knowing what you’re actually running. When you
npxorgo installan MCP server, there’s no built-in way to confirm that the binary you got matches the source code the README points to. Someone could publish a package, tag itv1.0, and quietly swap the contents, and you’d have no easy way to tell. The registry layer that would solve this is half-built.
- Token discipline. “MCP eats tokens” is a meme. It’s also true. The fix isn’t fewer servers; it’s the right servers in the right context.
And nobody talked about building both. That’s the part I find strange. Some domains want to be discovered (MCP). Some want to be invoked (CLI). Most want to be explained (skills). The stack is three layers deep. The interesting work happens at the seams.