---
title: "Ship the surface the task actually needs"
description: "Choose a CLI, a remote MCP server, or an HTTP API from the task in front of you. A count of public MCP servers does not pick the surface."
canonical: "https://www.agentrail.co/blog/mcp-vs-cli-vs-api?h=6EAZ974EF8CY700T"
author: "Vivek Mittal"
published: "2026-11-30T11:00:00Z"
last_updated: "2026-11-30T12:59:16.715Z"
---

# Ship the surface the task actually needs

Choose a CLI, a remote MCP server, or an HTTP API from the task in front of you. A count of public MCP servers does not pick the surface.

Ship the surface the task actually needs. A CLI, a remote MCP server, and an HTTP API are three contracts. The task picks among them. A trend doesn't.

A surface is the contract an agent uses for one step. It is a command, a remote tool list, or an HTTP request. The roles inside MCP stay on [host, client, server](https://www.agentrail.co/blog/what-is-an-mcp-server?h=6EAZ974EF8CY701R). This page owns the choice.

> **Key Takeaways**
>
> • A CLI fits when the agent already has a shell and the work is a command.
>
> • MCP fits when the agent must discover a remote tool list and call one of those tools.
>
> • An HTTP API fits when the task is a request against a contract you already publish, including OpenAPI.
>
> • More than 10,000 public MCP servers is a size fact from December 2025. It doesn't choose your surface.
>
> • The journey shows which surface the task actually used. Name which step uses which.

## Three surfaces, three contracts

A CLI is a process the agent starts. An MCP server is a remote list of tools a client can call. An HTTP API is a set of routes the agent requests. Each one succeeds or fails on its own contract.

The agent already has a way to act. If that way is a shell, a command can finish the step. If that way is a tool-using client, a server can finish the step. If that way is HTTP, a route can finish the step. A second surface helps when the step cannot finish on the one the agent already has.

Leave the design of each contract on its own page. Flags, JSON on stdout, no pager, and exit codes stay on [a CLI an agent can run without a prompt](https://www.agentrail.co/blog/non-interactive-cli-for-ai-agents?h=6EAZ974EF8CY702P). Writes the agent will send twice stay on [write endpoints an agent will call twice](https://www.agentrail.co/blog/idempotent-api-for-ai-agents?h=6EAZ974EF8CY703M). Here you only decide which surface the step needs.

Shipping all three "for agents" publishes three briefs. The agent may follow one and ignore the others, or it may mix them. An unspecified choice between briefs is the same gap as an unspecified field. The developer would ask which one you meant. The agent will not. That contrast stays on [a developer can ask](https://www.agentrail.co/blog/agent-experience-vs-developer-experience?h=6EAZ974EF8CY704J).

Name the step before you name the technology. "Create a customer" is not yet a surface. "Create a customer from a checkout on the agent's machine" leans CLI. "Create a customer from a client that discovers tools" leans MCP. "Create a customer with POST against the spec you already ship" leans HTTP. The verb was the same. The fact that chooses is different.

## A CLI when the agent already has a shell

Ship a CLI when the agent is already in a shell and the step is a command on that machine. Install, a local read, a deploy from a checkout, a query against a file in the repo. The agent can start a process. It doesn't need a remote catalog to do that.

The command still has to run without a person at the keyboard. That mechanic is the CLI page. The test on this page is earlier. Does the step begin as a process the agent can spawn? If it does, start with the CLI. If the step begins on a remote system the agent cannot see as a local binary, a CLI is the wrong first surface.

A CLI that only wraps an HTTP call can still be right. It is right when the agent lives in a terminal and your users already install the binary. It is extra when the agent was going to send HTTP anyway, and the binary adds an install the step didn't need. Ask which action the step starts with.

A missing shell is a fact, not a preference. A server-side job with no filesystem and no permission to exec will not grow a CLI because you published one. Give that job the HTTP contract. Give the coding agent in a repo the command.

The shell is either there or it isn't. Write that down next to the task name before you open a design doc. Help text and exit codes come after you choose the command, on the CLI page.

## MCP when discovery and a remote tool list matter

Ship MCP when the agent needs to discover operations on a remote server and call one of them. The host can connect a client. The client can list tools. The model can choose from that list. That is the contract you are accepting. The role split stays on the server page. Don't rebuild it here.

`tools/list` can be empty, paginated, and different for different authorization ([Tools](https://modelcontextprotocol.io/specification/2026-07-28/server/tools)). The agent learns the surface at list time. That is the point of discovery. A route the caller must already know is a different deal. A binary the caller must already have installed is a different deal.

In December 2025, Anthropic reported more than 10,000 active public MCP servers, and more than 97 million monthly SDK downloads across Python and TypeScript ([Donating the Model Context Protocol](https://www.anthropic.com/news/donating-the-model-context-protocol-and-establishing-of-the-agentic-ai-foundation)). Cite that as the size of the public set. A public count doesn't know whether your step has a shell, a tool client, or an HTTP contract.

Ship MCP when the step is "find the operation, then call it," and the caller speaks the protocol. Skip it when the caller is a job with a URL it already has. A second server that only repeats your docs is still a server the host must connect. Connect it when discovery of operations is the step. Skip it when the operations are already on an HTTP contract the agent calls directly.

The description on each tool is the brief the model uses at choice time. How to write that text stays on [MCP tool descriptions](https://www.agentrail.co/blog/mcp-tool-descriptions?h=6EAZ974EF8CY705G). Choosing MCP doesn't write the brief for you. A server with empty descriptions is still the MCP surface. It is a weak one.

A client that never calls `tools/list` is not using the discovery you shipped. It may be using a hard-coded tool name. That can work, and it is closer to a known route than to discovery. The journey should show the list and the call, or you don't yet know that MCP was the surface the task needed.

## An HTTP API when the contract is already OpenAPI

Ship the HTTP API when the step is a request you already serve, and the contract is already described. OpenAPI is one way to describe it. The agent sends the method, the path, and the body. A tool list is optional for a caller written against that spec.

If the spec is current, the API is the surface. Wrapping every route as a tool adds a second brief the model has to reconcile with the spec. Do that when the caller discovers operations through `tools/list`. Skip the wrap when the caller already has the method and the path.

Writes that arrive twice need an idempotent contract. That design stays on the idempotent API page. The decision here is only whether the step belongs on HTTP. A server-side job with a base URL and a key already speaks HTTP. Give it the route.

A browser page is not this contract. An agent that only has HTTP can still fail on a site built for a person. The API is the machine contract. The website is another surface. If the step can be done with the API, don't send the agent through the page to do it.

OpenAPI helps when it matches the routes you serve today. A spec that documents a removed method sends the agent at the removed method. The surface is still HTTP. The brief is stale. Fix the spec, or stop pointing agents at it. A new MCP server that copies the stale spec copies the stale brief.

Partial coverage is normal. Some steps have routes. Some steps exist only in the dashboard. The route is the HTTP surface. The dashboard step is unspecified until you give it a request or a command. Don't describe the whole product as "an API" because the public half has a spec.

## A decision by task, not by trend

Write the step in one sentence. Mark the fact that chooses the surface.

| Task fact | Surface to ship |
| --- | --- |
| The agent has a shell, and the work is a local command | CLI |
| The agent must discover operations on a remote server | MCP |
| The agent will call an HTTP contract you already publish | HTTP API |
| The step needs two of those | Ship both, and name which step uses which |

Read the last row with care. A task can install with a CLI and then call an API. A task can list tools and then hit HTTP inside the tool handler. The decision is per step. One slogan for the product hides the step that needed a different contract.

Trends fail this table. "Agents want MCP" ignores a shell the agent already has. "Agents want CLIs" ignores a remote list the agent cannot guess. "We already have an API" ignores a client that only discovers tools and will not read your spec unless the operation is on the list. Fill the row from the task you run.

The December 2025 server count is a fact about the public ecosystem. The left-hand column is a fact about the task. If you cannot write that fact, you cannot pick a surface.

A platform team that ships all three gives every task three entry points. Add the second surface when a real step cannot finish on the first. Until then, the extra surface is another unspecified choice.

## Which surface the journey actually used

The surface you shipped and the surface the agent used can differ. An agent can ignore the MCP server and call the API. It can skip the CLI and copy a sample from a doc. The record that shows the path is the journey across the surfaces the task touched.

That record stays on [agent journey analytics](https://www.agentrail.co/blog/agent-journey-analytics?h=6EAZ974EF8CY706E). This page doesn't redefine the journey. It says what to look for on one. The step list should name CLI, MCP, or HTTP on the step that did the work. A task that only fetched docs didn't use the surface you thought you shipped.

We reconstruct how agents discover, choose, and use a product across website, docs, APIs, SDKs, and MCPs. Use that path to see the surface. A connected server, an installed binary, or a published spec means the surface is available. The journey shows whether the task called it.

Keep the outcome beside the surface. A completed HTTP call on the wrong route is still the wrong surface for the job. A `tools/call` that returns an error is use of MCP, and it is not a finished task. The journey is where those two facts sit together. Start there when you review a week of attempts.

If the journey shows a surface you didn't mean to support, decide. Either make that surface a real contract, with the CLI rules or the HTTP rules or the tool text, or stop publishing the hint that led the agent there. A sample in the docs is a hint. An error that links to a binary is a hint. Hints become the surface the agent tries.

## Frequently Asked Questions

### Should every product ship MCP, a CLI, and an API?

Ship the surface the step uses. Add a second surface for a step the first one cannot finish. A full menu is three briefs.

### Does a large MCP ecosystem mean we should ship a server?

Anthropic counted more than 10,000 active public MCP servers in December 2025. That count doesn't know your task. Use the table.

### Where do CLI flags and exit codes belong?

They belong on the [non-interactive CLI](https://www.agentrail.co/blog/non-interactive-cli-for-ai-agents?h=6EAZ974EF8CY702P) page. This page only decides whether a CLI is the right surface.

### What if the agent uses a different surface than the one we shipped?

Read the journey. The path across docs, API, SDK, and MCP shows what the agent actually called. Then change the hint or the contract.

Pick the row from the task, not from the announcement. Then check a real attempt. The surface that shows up on the path is the one to maintain, and that check lives in [agent journey analytics](https://www.agentrail.co/blog/agent-journey-analytics?h=6EAZ974EF8CY706E).
