GuidesCLI vs MCP (and skills)
DocsGuidesCLI vs MCP for AI agents: why a CLI harness

CLI vs MCP for AI agents: why a CLI harness

MCP loads every tool definition into the model context up front; skills must be found and installed per agent. A CLI costs nothing until the agent runs it, and --help is the manual.

Use a CLI when you want an agent to reach many services without paying for them in context. Most MCP clients load every tool definition into the model's context before the conversation starts (Anthropic measured 58 tools across five servers at about 55K tokens), and a skill helps only once someone has found it and installed it for that agent. A CLI is a program on the PATH: nothing is in context until the agent runs it, bare co lists the commands in about 5 KB, --help explains the one it needs, and each command ends by printing what to run next. Any agent with a shell can use it: Claude Code, Codex, OpenCode or Cursor.

1. Install once

One package gives the agent every co command. There is no server process to run and nothing to configure per client.

pip install connectonion
co init

2. Tell your agent to use co

In Claude Code, Codex, OpenCode or any agent with a shell, say what you want and add "use co". You don't list tools in the prompt.

3. Let it discover the rest

The agent reads the command list, opens --help on the command it needs, and follows the Next: line. Each step is about a thousand tokens, spent only when needed.

co
co gmail --help
co gmail
# Connect Gmail first:
# Next: co auth google

4. Add skills only as a shortcut

co skills link puts ConnectOnion's skills into Claude Code and Codex. It saves the agent a step; nothing requires it.

co skills link

5. Check any CLI the same way

In the 1.8.9 preview, co audit scores any program's help pages the way an agent reads them.

co audit gh pr

FAQ

Why not MCP?

MCP works, but most clients load every tool definition into context up front: "Most MCP clients load all tool definitions upfront directly into context", and moving to on-demand discovery cut one task from 150,000 tokens to 2,000 (Code execution with MCP, Anthropic, Nov 2025). A five-server setup with 58 tools took about 55K tokens before the conversation started (Advanced tool use, Anthropic, Nov 2025). A CLI is on-demand by nature.

Why not skills?

A skill helps only once someone has found it and put it in that agent's own folder, such as ~/.claude/skills or ~/.codex, and each agent keeps its own. With a CLI, the program is the list: a new command appears the next time the agent runs co.

Is ConnectOnion for people or for AI agents?

For agents. You install it and tell your agent to use co. You can run the same commands to check what it did, but you don't need to learn them.

Which agents can use it?

Any agent that can run shell commands: Claude Code, Codex, OpenCode, Cursor, ConnectOnion's own co ai, or a script.

Can I use MCP or skills as well?

Yes. They are not mutually exclusive. ConnectOnion ships skills for Claude Code and Codex (co skills link), and an agent that has MCP servers can run co beside them.

Updated 2026-09-26. Commands checked against ConnectOnion 1.8.8.

Star us on GitHub

If ConnectOnion saves you time, a ⭐ goes a long way — and earns you a coffee chat with our founder.