Guide

The Agent Access Stack: APIs, CLI, MCP, Skills

APIs are the foundation. MCP and CLI wrap them. Skills extend them. Get the API wrong and nothing above it works — the layer order that decides whether your stack holds.

Where this framework comes from

Aakash Gupta analyzed how ten companies — Stripe, Cloudflare, GitHub, Shopify, Zapier, and others — actually ship for AI agents, and mapped the pattern across all of them (Aakash Gupta’s agent-distribution research). The credit for that analysis belongs to him; this piece builds on it and adds what’s held up in practice since. The finding: every company’s stack breaks down into the same layers, and the layers always sit in the same order.

The layer order

APIs are the foundation. MCP wraps your API. CLI wraps your API. Skills enhance your API. OpenAPI documents your API. Every layer above the API is either a wrapper or an enhancement — none of them replace it.

Get the API wrong and nothing above it works. Get it right and everything above it follows. Stripe is the example Aakash’s analysis points to: they didn’t retrofit their API for agents. They exposed what was already there, because the AI-ready API foundation was already solid.

The rule for choosing what to build

Ship a CLI first if it’s only you using the capability — cheap to build, easy to test, and if you’re the only consumer there’s no need for a shared, hosted contract. Wrap it in MCP once others, including other agents, need the same access. This is a practical sequencing rule, not a mandate to build every layer.

Nikolay Rodionov’s surface-matrix (from the MCP Developers Summit, April 2026) sharpens this further by mapping surface to use case: MCP alone suits simple flows and general audiences; skills alone suit reusable, private prompts for writers and developers; skills plus MCP suit complex workflows that touch external services; skills plus an API suit specific automation for people comfortable managing API keys; skills plus a CLI suit local, terminal-native workflows. Emmanuel’s own read on this matrix: “the big unlock recently has been ‘Skills+’ — pairing a skill with another layer rather than treating skills as standalone.”

The evidence that the stack matters in practice

Two data points, from different angles, both point the same direction:

  • In Smithery’s 756-run benchmark (Smithery, “MCP vs CLI is the wrong fight” (Mar 2026)), native MCP reached 92% success versus 76% for a raw API with specs and 53% for a blind API call — the ladder gets better as agents get more structure, and MCP is the top of that ladder for agent-native consumption.
  • A July 2026 re-audit of ten well-known CLIs against an agent-readiness checklist found only three — Stripe, GitHub’s gh, and kubectl — passed all nine critical gates. The most common failure, in four of the ten, was the absence of a machine-readable way for an agent to ask “am I authenticated, and as whom?” That’s a small, specific gap, and it’s the single most common reason a CLI can’t complete an agent’s loop unattended.

About this evidence: Smithery’s result is a 756-run benchmark across a specific harness and a small set of APIs. It is a strong signal for tool-calling agents, but results vary with API familiarity and agent design, so do not treat it as a universal law.

Neither data point argues for one layer over another in the abstract. Both argue that whichever layer you build, it has to actually work for a machine, not just look complete to a human skimming the docs.

What this means for your stack

Start with the API and make sure it’s solid on its own — clear naming, good errors, discoverable resources. Then decide, layer by layer, whether a CLI, an MCP server, or a skill earns its place based on who’s actually going to use it. Building the wrapper before the foundation is solid just wraps the problem, not the product. For prioritization, use how to determine which APIs to make agent-ready as the next pass.

Next step

Where to take this next

FAQ

Do I need to build all four layers?
No. Ship a CLI first if it's only you using the capability. Wrap it in MCP once others — including other agents — need the same access. Skills come once there's a workflow worth packaging, not before.
Which layer should I build first?
The API, always. MCP wraps your API, a CLI wraps your API, skills enhance your API, and OpenAPI documents your API. Every layer above the API depends on the API being right. Get the foundation wrong and nothing built on top of it works.
Is a CLI or an MCP server the better agent surface?
Different jobs. A CLI is best when a human is driving, when you want shell composability, or when the consumer is a coding agent that can already shell out. An MCP server is best when multiple agents or clients need the same capability, or when the consumer isn't a terminal at all — a hosted assistant, for instance.