MCP or Skills or CLI?
MCP vs skills vs CLI. Connect Claude Code or Codex to external services. Context costs. What's better: MCP server, agent skill or command-line tool.
AI agents are powerful but limited to training data and capabilities built into the "harness" (the program, such as Claude Code or Codex, that connects the AI model to your Mac and carries out its requests to read files and run commands). To be fully useful, AI agents need access to specialized software and external services.
Claude Code and Codex get access to external services and software in three ways:
- MCP servers
- skills
- command-line tools
In this article I explain each method, what each costs, and which to use. Most developers use all three, each for what it does best.
Choosing how your agent gets extra abilities is part of setting up a Mac for AI coding. For the rest, see the roadmap.
Before you get started
I recommend using our free app to set up Claude Code or Codex with both skills and MCP servers. It is a FREE Mac app that installs the developer tools and AI coding agents you need, adds the skills and MCP servers you choose, and verifies your setup is working. It does the setup this guide describes, but easier and faster. Here are all the details about the app before you download. Then download it:
MCP servers, skills and command-line tools
Here is the difference between MCP servers, skills and command-line tools. MCP servers and command-line tools give the agent access to software and services. Skills teach it how to use them. After this, I'll explain which to use.
MCP server
An MCP server is a small computer program that runs as a gateway between an AI agent and other local software or external services. It runs on your Mac or remotely. A remote MCP server often requires sign-in credentials for access to other programs or services. See MCP Servers on Mac for the full explanation.
Skill
A skill is a folder of instructions that teaches an AI agent how to do a particular task. The main file is named SKILL.md. It starts with a short name and a description of when to use the skill, followed by the instructions, and the folder can also hold reference files and small scripts. Skills follow the Agent Skills open standard, which Anthropic created and released for any tool to use. Claude Code, Codex, GitHub Copilot, Cursor and Gemini CLI all read skills.
- Claude Code reads your skills from
~/.claude/skills/and a project's skills from.claude/skills/. Type/and the skill's name to run one. - Codex reads your skills from
~/.agents/skills/and a project's skills from.agents/skills/. Type$and the skill's name to run one.
Each skill's SKILL.md file starts with a description of what the skill does and when to use it. An AI agent will find and use a skill when your request matches the skill's description.
CLI
A command-line tool is a program you run in a terminal application, such as git for version control. Claude Code and Codex can run commands using the terminal, after asking your permission. AI models already know how to use command-line tools from their training, and they can read a tool's --help to learn a new one.
With your permission, an AI agent can access other software on your computer if the other software has a command-line interface (CLI). For services on the internet, an AI agent can use the service's API (application programming interface), either with a command such as curl or by writing a small program. Usually you'll need to give the agent an API key or sign in first.
Context consumed by each method
An AI agent has a limited working memory for each conversation, called its context. Everything the agent knows about its tools consumes context, and the more room the tools take, the less is left for your project.
- MCP servers describe every one of their tools to the agent. A large MCP server can describe dozens of tools, which can fill tens of thousands of tokens (the units AI models use to measure text) before the agent does any work. Claude Code avoids most of this cost with tool search, which is on by default: it loads only the tools' names at the start and loads a tool's full description when it needs it. In Codex, you can turn off a server's tools you don't need in
~/.codex/config.toml. - Skills load only their name and short description at the start, about 100 tokens each according to Anthropic. The instructions load only when the agent uses the skill.
- Command-line tools cost nothing until the agent runs one. The agent can also filter a command's output, with tools such as
greporjq, so only the part it needs goes into its context.
Managing context is so important that it has its own name: context engineering. Knowing how much context an MCP server or a skill uses is part of it.
Use an MCP server when a service needs your sign-in
I recommend an MCP server in these cases:
- A service needs your account. Use an MCP server if you need to sign in to a service and don't want to give the agent an API key. The agent sees only what you can see, and you can disconnect it at any time.
- No command-line tool exists. Many web services, such as design tools and wikis, have no command-line tool, but they do have an MCP server.
- You work in a desktop chat app. Claude Desktop's Chat tab and the ChatGPT app can't run terminal commands, but they can use MCP servers. You can switch to using Codex or Claude Code for terminal commands, but if you're already in a chat, use an MCP server.
- You want limits on what the agent can do. A server offers only the actions its publisher chose, so it can leave out dangerous ones such as deleting data.
Choose a skill for repeated procedures
Use a skill when the agent needs habits rather than a new connection. Use one for a job you repeat, a checklist, a house style, or the steps for using a tool correctly. A skill doesn't connect to anything by itself. Anthropic describes the split this way: MCP connects Claude to data, and skills teach Claude what to do with that data.
Prefer command-line tools when available
When a command-line tool exists and your agent can run commands, it is usually the best choice. There is nothing to set up beyond installing the tool, and the agent already knows how to use it. For GitHub, for example, many developers let the agent use gh in place of an MCP server.
Command-line tools run with your permissions, so read what the agent wants to run before you approve it. Claude Code asks before running each new command. Codex runs commands in a sandbox (a restricted space) with network access off by default, so a command that needs the internet, such as gh pr list, stops to ask your approval.
Use MCP servers, skills and command-line tools together
The three work well together. A skill can tell the agent which command-line tool to use and how, and when to call an MCP server. For example, a skill for reviewing pull requests can tell the agent to read the changes with gh, look up the current documentation with an MCP server, and follow your team's checklist.
That is why my "Set Up Your Mac" apps offer both skills and MCP servers, alongside the command-line tools they install.
The MCP vs CLI controversy
In February 2026, a blog post titled "MCP is dead, long live the CLI" set off a long discussion on Hacker News. Developers who prefer command-line tools pointed to the context that large MCP servers use, to MCP servers that were unreliable, and to the way command-line tools can be chained together. Developers who prefer MCP pointed to people who use AI in chat apps with no terminal, to the simple sign-in remote servers offer, and to the limits a server can set on what an agent does. As in many online debates, the best advice lies somewhere in the middle: both are ways for an agent to call tools, and each suits different work.
Many of the articles written since, such as CircleCI's comparison, land on "use both". Command-line tools suit the quick local work of coding, testing, and checking, and MCP servers suit work that involves your accounts and other people's services. Skills are a way of describing repeatable tasks that can use either the CLI or MCP servers.
Compare MCP, skills and CLI tools at a glance
- MCP server - a connector with tools - lives in your agent's settings, or runs at a web address - uses context for its tools' names and descriptions - often uses your sign-in - works in desktop chat apps - best for services that need your account.
- Skill - a folder of instructions - lives in a skills folder for you or for a project - uses context for its name and description until used - needs no sign-in - works wherever skills are supported - best for procedures and repeatable tasks.
- Command-line tool - a program the agent runs - installed on your Mac, often with Homebrew - uses no context until run - signs in with its own login - needs an agent that can run commands - best for coding work on your Mac.
Continue setting up your Mac
Don't miss the full visual roadmap and checklist that shows how to set up a Mac for software development, with all the essential tools and settings you might not yet know about.