Give a coding agent a CLI when a good one exists and the model already knows it: gh, aws, gcloud, kubectl. It costs nothing until it’s used, and the agent can ask for exactly the fields it wants. Reach for an MCP server when there’s no decent CLI, when the login lives with a hosted service, or when the tool has to keep something open between calls, like a browser. Write a skill when the agent needs a procedure, or a CLI it hasn’t seen before; only a short description sits in the context until the skill is used. And the complaint that MCP servers eat your context window is half out of date. In Claude Code, four popular servers cost me 2,497 tokens with tool search on, which is the default, and 58,008 with it off.
That gap is why the argument never settles. Half the posts this autumn were written as if every tool definition goes into every request, and half as if none of them do. Both are true, depending on your setup, so I measured mine.
What MCP, a CLI and a skill actually are#
MCP, the Model Context Protocol, is an open protocol Anthropic published in November 2024 for plugging tools into AI apps. An MCP server describes each of its tools with a name, a description and a JSON schema for its inputs. The agent reads those, calls a tool, and the server does the work, often with its own login to some service. The definitions are the part the model has to read, and they’re what this whole debate is about.
A CLI is just a command the agent runs in a shell. It learns the command from its training data, which for gh or aws is enormous, or from --help when it isn’t sure. The output is text, so the agent can pipe it through jq or head before it reads any of it.
A skill, in Claude Code’s sense, is a folder with a SKILL.md in it. The name and description (up to 1,536 characters) are always in context, so the agent knows the skill exists. The body only loads when the skill is used. A skill can be a checklist, a house style, or a reference for a CLI the model doesn’t know, in which case the agent still does the work through the shell.
The argument this autumn#
In September, Maharshi Patel’s MCP was always a bad idea? (335 points on Hacker News) called MCP “a protocol of a bygone era”: models now read --help, write scripts and call APIs well enough that most servers wrapping an API aren’t needed. A couple of weeks later the team behind the Pi coding agent went the other way. You said no MCP (687 points) explains why MCP is now part of Pi’s core after they’d said it never would be, with deferred loading so tools don’t sit in the context until they’re wanted. They still concede the CLI’s best trick: agents chain commands together.
This month on dev.to, Your MCP Servers Are Silently Draining Your Context Window put the cost at about 25,000 tokens “of rigid JSON schemas injected at the top of your prompt” before you’ve asked anything. And MCP Is Dead Simple. And That’s Exactly the Problem made the point that building a server is the easy part; deciding what the agent should be allowed to do with it is the hard part.
The context-window numbers in that thread assume every definition is sent with every request. Claude Code stopped doing that by default with tool search: the model sees each server’s tool names and instructions, plus a search tool, and loads a tool’s full definition only when it goes looking for it. So I wanted to know what four servers cost with it, and without it.
What I measured#
I set up an empty folder with four public servers in an mcp-servers.json: GitHub’s official server (in Docker, default toolsets), Chrome DevTools MCP, Playwright MCP and Context7. Every run used --strict-mcp-config, so none of my own servers loaded, and the same settings otherwise. The prompt was “Reply with OK”. I ran it through claude -p --output-format json and added up the input tokens it reports (fresh, cache writes and cache reads). This was Claude Code 2.1.328 with Opus 5.5.
With no servers, the one-line prompt cost 18,078 input tokens. That’s Claude Code’s own system prompt and tools, and it’s the same for everyone. Adding the four servers with tool search on took it to 20,575: 2,497 tokens for having 106 tools on hand. With ENABLE_TOOL_SEARCH=false the same prompt cost 76,086, four times the baseline.
Not all of that extra 58,008 is MCP. /context, which works in print mode too, shows how it splits. Besides the MCP tools, there are 14,500 tokens of Claude Code’s own tools that are normally deferred, and the totals only add up if those load as well when tool search is off:

So the four servers’ tool definitions come to about 40,000 tokens, and Claude Code’s deferred tools to another 14,500. Here’s how the MCP part splits by server, along with the three runs:
GitHub’s server is the heavy one: 46 tools and almost 19,000 tokens, and that’s only its default toolsets (context, repos, issues, pull requests, users). With GITHUB_TOOLSETS=all it offers 91 tools. Context7 does its whole job with two.
One more thing I learned along the way. Before running any of this, I estimated the definitions’ size the usual way, counting characters and dividing by four, and got about 25,600 tokens. /context says 39,900. JSON schemas are full of braces, quotes and short field names, and they tokenise worse than prose. If you budget by file size, budget high.
When does the 40,000 come back? When tool search is off: if you set ENABLE_TOOL_SEARCH=false, give a server "alwaysLoad": true, use a model older than the Opus, Sonnet and Haiku 4.5 generation, or use another client that loads everything up front. On Opus 5.5’s million-token window that’s 4%. On a 200,000-token window it’s a fifth of the context gone before you’ve typed a word, on every request.
The cost moves to the answers#
With tool search on, what you pay for is the answers. I asked for the same thing both ways: the five most recent open pull requests on the public cli/cli repository.
# the CLI: ask for the fields you want
gh pr list -R cli/cli --limit 5 --json number,title,author,headRefName,updatedAt
# 1,280 bytes. Without --json, the plain table is 603 bytes.The GitHub MCP server’s list_pull_requests tool, called with perPage: 5, returned 34,749 bytes: full objects with bodies, user records, and the head and base branches. That’s 27 times the JSON from gh, for the same five pull requests. The CLI lets the agent choose its fields and pipe the result through head or jq before reading it. This tool hands back everything, and the agent has to read all of it.
Claude Code puts a ceiling on that. By default an MCP result can be up to 25,000 tokens (MAX_MCP_OUTPUT_TOKENS), with a warning above 10,000. A ceiling isn’t a diet, though. Ten calls like that one and you’ve spent more than the definitions ever cost.
Learning the CLI is cheap too. gh pr list --help is 3,183 bytes, and the agent rarely reads it, because it has seen gh thousands of times. That’s the real case for a CLI: the model already knows it, and nobody had to describe it in a schema. Today, for example, my agent pulled Search Console numbers with gcloud and curl and watched a deploy with gh run watch. I don’t have an MCP server for either, and I didn’t miss one.
Skills are the cheap middle#
I have seven personal skills. Their descriptions add up to 2,286 characters, about the size of one mid-sized MCP tool definition. Their bodies add up to 53 KB, and each one only loads when that skill is used. Two of them show where skills fit:
- The Tigris skill is a CLI reference: the commands and conventions for an object store’s CLI. There’s no server. The agent reads the skill and runs the commands.
- The Jira skill sits on top of the Atlassian MCP server, both on my machine. The server handles the login and the API, about 40 tools of it. The skill holds what the server can’t know: which site and which board, and the handful of things I actually do there.
For a hosted service, that pairing is the one I’d recommend: MCP for the login, a skill for “how we do it here”. Context7 has reached the same conclusion from the other side. Its setup command (npx ctx7 setup) asks whether you want “CLI + Skills”, which needs no MCP at all, or the MCP server. The vendor treats them as two routes to the same thing.
Hosted servers come with one cost a CLI doesn’t have: you go when the vendor goes. The Atlassian server tells me at the start of every session that its current endpoint will be removed on 1 March 2027. A CLI, I can pin.
Which one I reach for#
| Situation | Use | Why |
|---|---|---|
A well-known CLI exists (gh, aws, gcloud, kubectl, fly) | CLI | The model already knows it, picks its fields, and can pipe the output |
| A hosted service with an OAuth login and no good CLI (issue trackers, docs tools) | MCP, plus a skill for house rules | The server holds the login; the skill holds the conventions |
| Something the agent drives and that has to stay open between calls (a browser, a debugger) | MCP | It needs a live session, not one command at a time |
| A procedure, or an in-house CLI the model has never seen | Skill | Only the description costs anything until it’s used |
| Library docs for the version you’re on | Context7, either way | It ships as an MCP server and as a CLI with a skill |
| An app that can’t run shell commands (a chat app, some desktop clients) | MCP | It’s the only door |
What I’d set up#
Leave tool search on. Don’t set alwaysLoad on a server unless you use its tools in nearly every session, because every always-loaded definition is paid for on every request.
Put servers where they’re needed rather than everywhere. A project’s .mcp.json is shared through git, and claude mcp add --scope project writes to it:
claude mcp add --scope project playwright -- npx -y @playwright/mcp@latestIf you use GitHub’s server, trim it. GITHUB_TOOLSETS picks which groups of tools it offers, and --read-only drops every tool that writes. Better still, let the agent use gh.
Run /context now and then. It lists every MCP tool with its token count and marks which ones are deferred, which is how I found out the GitHub server alone is nearly half the total.
And when you notice you’ve pasted the same instructions into a session twice, that’s a skill.
If you want to check your own setup, here’s a trimmed version of the script from the clip. It needs claude on your path and two config files: one with your servers, and one with {"mcpServers": {}}.
#!/usr/bin/env python3
"""Send one tiny prompt three ways and print how many input tokens each costs."""
import json, os, subprocess
PROMPT = "Reply with OK"
RUNS = [
("no MCP servers", "no-servers.json", {}),
("servers, tool search on", "mcp-servers.json", {}),
("servers, tool search off", "mcp-servers.json", {"ENABLE_TOOL_SEARCH": "false"}),
]
def input_tokens(config, extra_env):
cmd = ["claude", "-p", PROMPT, "--output-format", "json", "--max-turns", "1",
"--strict-mcp-config", "--mcp-config", config, "--setting-sources", "project"]
out = subprocess.run(cmd, capture_output=True, text=True, stdin=subprocess.DEVNULL,
env={**os.environ, **extra_env}).stdout
u = json.loads(out)["usage"]
return u["input_tokens"] + u["cache_creation_input_tokens"] + u["cache_read_input_tokens"]
base = None
for label, config, env in RUNS:
n = input_tokens(config, env)
base = base or n
print(f"{label:28} {n:>9,} {n - base:>+9,}")The short version#
A CLI the model already knows is the cheapest tool you can give an agent: no definitions to load, and answers as small as the agent asks for. An MCP server earns its place when it holds a login or a live session that a CLI can’t. With tool search on, keeping a few connected costs about 2,500 tokens. Without it, four of them cost 40,000 or more on every request. A skill sits between the two: a paragraph in context, and the rest on demand. On my machine, the best setups use two of the three together.
Further reading#
On this site:
- Claude Code settings.local.json vs settings.json, Explained
- AGENTS.md vs CLAUDE.md: Which File Your Coding Agent Actually Reads
- How I Run Claude Code Day to Day, on skills, memory and permission modes
- Agentic AI Security, on what my agents can reach and who gets to tell them what to do
- Playwright MCP vs Chrome DevTools MCP: Letting Claude Code Check Its Own Work
Elsewhere:
- MCP tool search, MCP output limits and how skills load in the Claude Code docs
- GitHub’s MCP server, for toolsets and read-only mode
- Context7, which ships as an MCP server and as a CLI with a skill
- MCP was always a bad idea? and You said no MCP, the two sides of this autumn’s argument
