MCP vs CLI: what an agent should use to act
MCP versus CLI to connect agents to real systems: contract, sandbox, permissions, and a hybrid pattern in SaaS.

When an agent stops answering and starts acting in your product, the question stops being "do we use MCP?" and becomes which surface the system is going to touch. It can be a bounded command in a controlled environment, or a catalog of actions that the program discovers and calls under a contract. The APIs still exist underneath. They are almost always what the command wraps, or what the MCP server publishes. Here we compare those two ways of calling, not a slide with three acronyms.
In demos everything looks like an API: the model calls an address, returns data, and the committee applauds. In a real environment, putting the whole schema into every turn is expensive, it adds noise to what the model reads, and it makes it hard to audit which verb ran. That pushes toward other ways of exposing the same action. A well-designed command compresses the action into a few words and returns output with a fixed shape. MCP puts a shared contract in place so an agent client can discover those actions without each integration being a custom project. The two live together. The mistake is to choose by fashion instead of by contract, permissions, and where the code runs.
This article does not repeat the layer map and it does not replace identity and permissions. It assumes an action needs a name, narrow data, and a cap. Here we show how to read two different wrappers for that same action.
The question is not the protocol, it is the surface
For years the integration was "document your API and the agent will improvise". It works in a trial with three addresses. With twenty resources, versions, and several customer accounts, the model starts choosing the wrong verb, filling fields it should not touch, and spending context on a schema nobody read in full. The API is not bad. The agent does not need to see the whole map to do one concrete action.
The surface is the way the program invokes that action. It can be a narrow call, a command with options, or a server that publishes a catalog. Underneath, in all three cases, there is usually the same product API. The decision is not "do we throw the API away?". It is "how do we wrap it so an agent can use it without burning context or losing the audit?".
Anthropic insists on treating the door between the agent and the tool with the same rigor as a screen for a person: clear names, data that does not invite mistakes, and predictable output. On many teams that rigor shows up as small commands, not as schema dumps on every turn. On others, as a shared protocol so Cursor, Claude Desktop, and your own program read the same catalog without rewriting connectors. That is why the article stays on MCP versus the command line.
What a command is when the actor is an agent
CLI means command-line interface. It is not terminal nostalgia. For an agent it is a compressed contract: one line that says what can happen, on which resource, and in which response shape.
Imagine support with a copilot that searches tickets. Instead of giving it a hundred routes, you register a command from a closed list:
support search --tenant acme --q "factura duplicada" --limit 5 --format json
That line fixes the customer account, bounds the search, limits rows, and forces data back in a fixed shape. The agent does not browse a menu of addresses. It runs a verb you defined. If the command always returns the same shape, the model does not interpret HTML or generic error pages, and afterwards you can reconstruct the run by reading the command, the data, and the exit code.
The command wins when the action is bounded, repeatable, and should cost few words per call. It fits processes, options, and caps (--dry-run, --max-rows) inside an enclosure: no free network, a maximum time, and a closed list of programs. It is the "code interpreter" pattern done properly, because it is not the model running whatever it wants, but a program that can only invoke commands you registered. It also fits operations you already had as scripts (migrations, exports, heavy reports): the agent fires the script and the script calls your API with service credentials, not the other way around.
The risk is on the other side. A command with no enclosure is a shell with credentials. If the agent can run rm, read /etc, or call curl anywhere, you do not have an integration. You have an agent with more power than the task needs, which is one of the risks named in the OWASP article. The command teaches well when the enclosure exists before the command.
What MCP is, and which problem it solves
MCP (Model Context Protocol) is the contract between an agent client and a server of actions. The server publishes which actions exist, with a description and the shape of the input data. The client lists them without you rewriting the connector for each editor or each program. The MCP specification does not replace your product API. It is the plug built for agents when that catalog has to be usable from many clients.
Think of a SaaS that sells "connect your systems to agents". Every week a new CRM, a drive, or a ticketing system appears. Without a shared contract, each program (the developer's editor, the embedded copilot, the program you evaluate with) asks for its own connector. MCP reduces that friction: one server per outside system, and many agent clients reading the same catalog. Devic uses MCP as the integration layer for that reason. The use case and your business actions stay yours.
MCP wins when you need to discover actions on the fly and a standard contract between many clients and many servers, not when you need a single product verb. If the catalog changes (a new connector, a new version), the client can list again without redeploying the whole instructions. If the agent runs on the person's laptop, it can talk to an MCP on your infrastructure without you passing that account's key inside the instructions. The server applies permissions on its side and the client only sees the allowed actions.
MCP does not win when the critical action of your SaaS is already a stable address and you want the same data to always produce the same effect, with no layer in between. A narrow HTTP call or an internal command is usually enough there. MCP also does not fix badly defined actions. If the shape of the data is vague, you have only standardized the confusion.
How to read the choice without dogma
There is no universal winner. There are combinations you see in production when the team can name three things: which action the agent does, where the code runs, and who audits the effect.
Situation | Surface that usually wins | Why |
|---|---|---|
A product action on your system (create a ticket, read an order) | Internal command or a narrow HTTP call | The same effect for the same data, simple audit, little context |
A catalog of integrations that grows (third parties, partners) | MCP | One server per system, many agent clients |
An agent with code or scripts inside an enclosure | A command from a closed list | A clear enclosure, fixed-shape output, a switch per command |
A copilot embedded in your screen, on a single account | HTTP call or MCP on your server | Permissions on the server; the client does not run programs |
Exploration in the developer's editor | MCP | Discovery and reuse across tools |
Figure. Two axes, four cells
The program runs on your server | The program runs in an enclosure or locally | |
|---|---|---|
Your product | Narrow HTTP call or MCP on your own server | Command with a closed list and JSON output |
An outside system or a wide catalog | MCP server (the credentials live on the server) | MCP or a command, depending on whether the vendor publishes an official command |
The first table answers "which situation is ours?". The second adds where the program runs, because the same product verb can go through the server (centralized permissions) or through an enclosure (bounded execution, with output you can measure). If a cell sounds odd, it is usually a sign that a piece of the map is missing (the enclosure, the agent's identity, or an owner of the contract), not that "more protocol is missing".
Three questions before you commit to a surface:
Does the action already exist as a stable verb in the product? If yes, wrap it. You do not need a portable catalog for a single flow.
How many agent clients will consume the same integration? One: a command or an HTTP call is usually enough. Several different programs: MCP starts to pay for itself.
Where do the credentials live? If the agent runs on the person's laptop, the credentials do not go in the instructions. They go on an MCP server, or in an enclosure that calls your API with its own identity.
Putting forty MCP actions with a long description into every turn has a price in context. A command with subcommands documented in that flow's instructions, or discovered in a single help, is usually cheaper when the use case is one. That is not being against MCP. It is not paying for dynamic discovery where you do not need it.
A mature SaaS does not pick one: it splits responsibilities
What is usual in a mature SaaS is not "MCP only" or "commands only". It is a stack with clear responsibilities, because different actions have different risk and a different context cost.
Your API stays the source of truth for effects in the product. On top of it you build narrow verbs: addresses or commands an agent can call without inventing queries or paths. Third-party integrations go as MCP servers (or equivalent connectors) with the credentials on the server, not in the instructions. If the agent needs to run heavy logic or transform data, that happens in an enclosure with registered commands. The model does not write free code toward production.
An example with no customer names: support wants the copilot to search articles, propose an answer, and, only after an approval, update the ticket. The search can be an MCP to the knowledge base or a kb search command in an enclosure, because reading does not have the same risk as writing. Writing to the ticket is an HTTP call with the tickets:write permission and a person's confirmation, because the effect in the product has to stay bounded by identity and by account. The same agent uses two surfaces not from indecision, but because two tasks ask for different controls.
Before you add a third protocol, ask whether the action already exists as a stable verb. If it is an outside catalog, MCP. If it is bounded execution with output you can measure, a command in an enclosure. If it is a critical effect in your domain and it is already settled that the same request does not run twice, a narrow HTTP call on your API still makes sense.
Permissions and audit: the protocol does not change the rules
MCP and the command line change how you call. They do not change the rules of who may do what. If the agent acts on customer data, treat it as a service with its own identity, concrete permissions, and the door closed by default, the same as if it called your API by hand.
With a command, the record should note the command, the data (without secrets), the agent's identity, the account, and the exit code. With MCP, the action name, the validated data, the server that answered, and the link to the task identifier. In both cases you need the same minimum as in traceability: being able to reconstruct the chain without opening the chat.
An MCP server with wide permissions is an API key in disguise. A command on the person's laptop, with the administrator's session, is impersonation. The protocol does not fix that. The agent's own identity, the closed list, and being able to remove its access without kicking the person out do.
What no interface fixes on its own
If you only have three internal actions and a single agent client, an MCP server can be an extra layer. Start with HTTP calls or commands documented in the flow. MCP, when the catalog or the clients justify the standard. A command with no enclosure does not scale to a product with many customer accounts. It is acceptable in a local spike, not in a copilot that touches customer data.
Neither replaces your business contract. "Search tickets on the current account, maximum 5, without the raw HTML" is worth the same wrapped in MCP, in a command, or in a call. If the contract is vague, the protocol only tidies the chaos. MCP and the command line are wrappers for agents, not a replacement for product design.
If the team can answer which surface each trial action uses, with which identity, and what stays in the record, the choice stops being theological. If it cannot, the problem is not the protocol. It is that you are still in the demo. We covered that jump in a demo is not an agent in production.
Turn your SaaS AI-Native
Get a free trial just by signing up
Latest posts





