AUTOMATION / FIND BY GOAL

Should AI Automation Use CLI, MCP, or an Agent?

Start with one command or a deterministic script. Add MCP, an agent, or scheduling only when the workflow needs external access, judgment, or a future trigger.

Last checked:September 5, 2026Beginner · Automation choices
01

START WITH THE OUTCOME

Choose the outcome first

Core, optional and skip choices come from this vertical's reviewed data.

01

One command can finish the job

CLI is usually the most direct starting point for converting a file, checking state, or running a fixed operation.

Core
Optional
No fixed tool; decide from the actual goal
Usually skip
A fixed action does not need tool discovery or autonomous planning.Start with the command
02

A fixed sequence needs to run repeatedly

Put the known steps into an inspectable, repeatable script before adding a higher-level workflow.

Core
Optional
Usually skip
When the rules are stable, deterministic automation is often easier to verify.Stabilize the workflow first
03

The task must reach an external service

API, MCP, or a native connector may all fit. Prefer the option your environment supports with the smallest permission set.

Core
Optional
Usually skip
No fixed tool; decide from the actual goal
MCP is one connection method, not the only answer to every external action.Compare connection methods
04

The next step depends on what happens

An agent becomes useful when the workflow cannot be fully decided in advance.

Core
Optional
Usually skip
No fixed tool; decide from the actual goal
The agent chooses steps; connections, instructions, and scheduling remain separate decisions.Use an agent only for judgment
02

DECISION TREE / NO AI API

Choose a route in 30 seconds

Answer by outcome. The result is a static editorial recommendation.

Q01

Can one command or a fixed script complete the task?

The minimal automation ladder

Use a when one command can do the work. Use a script for a fixed sequence. Compare an , native connector, or when the workflow needs another system. Introduce an only when the next step depends on the result. A scheduler handles future or conditional triggers.

Browser automation is the same decision

Choose Playwright CLI for deterministic browser tests. Consider Playwright MCP when structured browser tools or an MCP-native loop improve the workflow. See Playwright MCP vs CLI for the trade-offs.

Useful combinations without duplicate infrastructure

  • Convert a file every morning: script + scheduler.
  • Inspect git state: CLI.
  • Create a GitHub issue: choose CLI, API, or MCP based on the workflow you already have.
  • Decide what to do from page state: browser capability + agent.

If the job is “run this fixed command,” do not build an agent, an MCP stack, and a workflow platform around it. The simplified relationship between instructions and connections is covered in Skill vs MCP.

Before you add a server

Use the Codex MCP guide only when a new MCP server is justified, and browse the FAQ if the choice is still unclear. Grant only the permissions the automation needs.

06

SOURCES / LAST CHECKED

Sources and editorial status

Only independently reviewed pages become indexable.

Last checked:September 5, 2026editorial-pack