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

APIs are the foundation. MCP servers and CLIs wrap them. Skills teach agents to use them well. Get the API wrong and nothing above it works.

## Where this framework comes from

Aakash Gupta analyzed how ten companies, including Stripe, Cloudflare, GitHub, Shopify and Zapier, ship for AI agents ([Aakash Gupta's agent-distribution research](https://www.news.aakashg.com/p/master-ai-agent-distribution-channel)). The credit for that analysis is his. This guide builds on it with what's held up in practice since. His finding: the API is always the foundation, and the surfaces on top add to each other rather than replace each other.

## The layer order

**APIs are the foundation.** [MCP](/glossary/mcp-server) 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. Skills don't sit above MCP. A skill teaches the agent to use your API, CLI or MCP server well, and it can't act without one of them. Since September 2026, an MCP server can also serve its own skills through the official MCP Skills extension.

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: its CLI existed years before MCP, and agents now use it natively. Stripe didn't retrofit for agents. It exposed what was already there, because the [AI-ready API](/glossary/ai-ready-api) foundation was already solid.

## The rule for choosing what to build

Start with a solid API. Then pick surfaces by where the work happens: automation in a terminal (Claude Code, Codex, scripts), your API or a CLI works fine. A conversation where the user works out what they want as they go: an MCP server, because chat apps like ChatGPT and Claude reach products through MCP. Any of the above: add a skill. It raises the success rate on all three. This is a sequencing rule, not a mandate to build every layer.

Nikolay Rodionov of Alpic shared a surface matrix at MCP Dev Summit North America (April 2026) that maps each surface to a use case: MCP alone for simple flows and UI (MCP Apps), for everyone; skills alone for reusable prompts, for writers and developers; skills + MCP for complex workflows that reach external services; skills + API for specific automation jobs, for people comfortable managing API keys; skills + CLI for local, terminal-native workflows. The big unlock lately is "Skills+": pairing a skill with another layer instead of shipping it on its own.


## The evidence that the stack matters in practice

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

- In Smithery's March 2026 benchmark ([published results](https://github.com/clavia-labs/mcp-vs-cli-bench)), adding a machine-readable spec lifted raw API calls from 52% to 73% success. On the same tasks, thin native MCP tools hit 92% against 55% for the raw API with a spec, and beat a well-described CLI 92% to 83%.
- An October 2026 audit of ten well-known CLIs against the [Agent-Ready CLI Checklist](https://github.com/paraskakis/skills) found only two, GitHub's `gh` and Stripe, passed all nine critical gates. The two most common failures hit four CLIs each: no machine-readable way for an agent to ask "am I authenticated, and as whom?", and destructive commands that run without asking for confirmation.

**About this evidence:** Smithery's result comes from 732 published runs on three APIs with early-2026 models. It's a strong signal for tool-calling agents, but results vary with API familiarity and agent design, so don't 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. Wrap a weak API and you've only wrapped the problem. For prioritization, use [how to determine which APIs to make agent-ready](/guides/how-to-determine-which-apis-to-make-agent-ready) as the next pass.

Want a full benchmark of your APIs and MCP with prioritized fixes? [Get in touch](/contact).

### FAQ

**Do I need to build all four layers?** No. Start with a solid API. Add a CLI when agents work in a terminal, an MCP server when people use your product from chat apps like ChatGPT or Claude, and a skill on top of whichever you ship.

**Which layer should I build first?** The API. MCP servers and CLIs call it under the hood, and skills teach agents to use it. If the API is a mess, every layer on top inherits the mess.

**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, like a hosted assistant.

Source: Level 250 — https://www.level250.com/guides/agent-access-stack-apis-cli-mcp-skills
