Skip to the page
Tecyfy

MCP vs API, CLI or skills: where agent tokens go

MCP is not more verbose than an API: either way, the model reads each tool's name, description and schema. The bloat comes from loading every tool up front on every turn. We measured one small tool set 4 ways, then ranked the fixes: shorter descriptions, fewer servers, a CLI or skill the agent reads only when needed, and tool search.

Tecyfy · Published · 8 min read

A robot bent under a backpack of MCP manuals walks beside a robot carrying one small toolbox: how loading every tool bloats an agent

MCP is not what makes an agent's context bloat. The model never reads the protocol: the app turns every MCP tool into a name, a description and a JSON schema, which is exactly what you would send for a tool you wrote yourself. The bloat comes from loading every tool from every server up front, on every turn. The fixes, in order of effort: shorten descriptions, connect fewer servers, give a coding agent a CLI or a skill it reads only when needed, and turn on tool search.

The short answer

OptionWhat the model reads up frontFits when
MCP serverEvery tool's name, description and schema, unless the app defers themMany apps should share the tools, the agent has no shell, or the server must hold credentials
Your own API, as toolsThe same: a name, description and schema per toolOne app, a few tools, all of them used often
A CLIOne line saying the command exists; --help when it is usedThe agent has a shell, as a coding agent does
A skillIts name and description; the instructions when a task matchesKnow-how and steps more than single calls; also wraps a CLI or script

RAGRAGA way to answer from your own documents. A search finds the passages that match the question, and they are added to the prompt before the model writes. is a separate question. It finds text to put in front of the model; MCP connects tools and data to an app. An MCP server can offer a search tool, but the protocol retrieves nothing itself.

Where the tokens go

Through function callingFunction CallingThe developer's name for tool use. The model replies with the name of a function and its arguments in a fixed format, and your code runs it., every request carries the full list of tools the model may call. An MCPModel Context ProtocolAn open standard for connecting AI applications to tools and data. A system offered once as an MCP server works in any application that speaks MCP. app asks each server for its list (tools/list), turns each entry into a tool definition, and sends them all, turn after turn. So the cost is:

tools loaded × length of each definition × turns

Prompt cachingPrompt CachingLetting the API keep the processed start of a prompt for a few minutes, so later requests that begin the same way are cheaper and quicker. makes the repeats cheaper, but they still fill the context windowContext WindowEverything a model can see at once while it writes an answer, counted in tokens. When the window is full, something has to be left out., and Claude picks tools less accurately once it has more than 30 to 50 of them. A typical set of 5 servers (GitHub, Slack, Sentry, Grafana and Splunk) can come to about 55,000 tokens of definitions before the agent reads your request.

The same tools, measured 4 ways

We wrote one small data server 4 ways: 4 tools to list tables, describe a table, run a read-only query and export a CSV. Each tool has a 1 or 2 sentence description and a short schema, which is lean for a real server. We counted them with OpenAI's o200k tokenizer, the one our token counter uses; Claude counts tokens differently: Claude 4.7 and later models produce about 30 percent more tokens for the same text than earlier Claude models, so recount with Claude's token counting for the model you use before relying on these figures.

FormIn context on every turnRead once, when used
4 tool definitions (MCP or your own API)384 tokensnone
CLI: one line saying orders --help exists22 tokens107 tokens of help text
Skill: its name and description33 tokens120 tokens of instructions

The tool definitions came to about 96 tokens a tool. That sounds small until a server has 50 tools, or the agent has 5 servers: then it is thousands of tokens on every turn, most of them for tools the task never touches. The CLI and the skill pay their full price once, only in the sessions that use them.

The catch: the CLI and the skill need a shell or code execution, and the agent has to run --help or read the skill before the first call. That is one extra step, and a model that never thinks to look misses the tool.

Try itHow much context do your tools take?
5servers
20tools
96tokens

as measured on our lean server

30turns
  • Every tool loaded up front9.6K a turn100 definitions on every turn
  • Tool search960 a turn5 kept loaded and 5 found, once a search runs
  • A CLI or skill per server165 a turnone line each, plus about 540 tokens of help when a server is used
Over 30 tools: worse picksTool search pays here

5 servers of 20 tools at 96 tokens each put 9.6K tokens in front of the model on every turn, 288K over 30 turns. Tool search brings it to about 960 a turn, and a CLI or skill to 165.

Tool search counts the 5 tools kept loaded and the 5 a search returns, not the search tool itself. The CLI or skill line is the 33 tokens we measured for a skill's name and description; the agent needs a shell to use it. Counts are OpenAI's o200k tokenizer, so Claude's own count runs higher.

Fixes, ranked by effort

  1. Tighten the descriptions. Say what the tool does and when to use it, in a sentence or two. Move long reference text (every column, every enum value explained) into a tool the agent can call, such as describe_table.
  2. Connect fewer servers. Turn off the servers a project does not use. Split a 60-tool server into smaller ones by job, so each project connects what it needs.
  3. Merge narrow tools. 5 tools that each fetch one field of a record can be 1 tool that returns the record.
  4. Use a CLI or a skill for a coding agent. If the agent has a shell, a command it reads --help for costs almost nothing until it is used. A skill adds the steps and rules around it ("revenue is in amount_usd; refunds are a separate table").
  5. Turn on tool search. Keep the definitions out of context until the model searches for them (next section).
  6. Let the agent write code against the tools. Present each MCP server as a folder of code files the agent reads only when needed and calls from a script, so results go between tools without passing through the model. In one published example, a task fell from about 150,000 tokens to 2,000.

Tool search, and does it work?

On the Claude API, you add a search tool (tool_search_tool_regex_20251119, where Claude writes a pattern, or tool_search_tool_bm25_20251119, where it writes a query in words) and mark the other tools defer_loading: true. The model starts with only the search tool and the ones you left loaded; a search returns up to 5 matches by default (Claude can set a different limit), and only those enter the context. This typically cuts tool-definition tokens by over 85 percent.

Claude Code does this for MCP tools by default: at the start, only tool names and each server's instructions load. ENABLE_TOOL_SEARCH=auto loads them up front until they pass 10 percent of the context window, and "alwaysLoad": true on a server keeps its tools always visible.

What it costs you:

  • An extra step. A search is one more round before the first call to a tool.
  • Misses. The search reads tool names, descriptions and argument names. A tool described in different words from the task may not come up. Name tools with a shared prefix (github_, slack_) and put the words people use near the start of the description.
  • Not for small sets. It pays from about 10 tools or 10,000 tokens of definitions. Below that, load them all, and keep the 3 to 5 tools used most loaded even when the rest are deferred.

Skills or tool search? They do different jobs. Tool search finds the right single call among hundreds. A skill carries the know-how for a kind of task: which calls, in which order, with which rules. A large setup often uses both.

Which to build

  • A solo agent with a few tools you own: plain tools in your own code. No server needed.
  • A coding agent: a CLI plus a skill for each system, and MCP only for what has no CLI.
  • Tools for your whole team across apps: one MCP server per job, short descriptions, tool search on in the clients.
  • A public integration: MCP, so any client can connect, with a small set of well-named tools and server instructions that say when to search for them.

A checklist for tool descriptions

  • First sentence: what it does. Second: when to use it rather than its neighbour.
  • Argument descriptions say the format, with one example (sales.orders).
  • No copies of documentation; a tool that returns the details on request.
  • Names share a prefix per service, so one search finds the group.
  • Results stay short: return a file path or a count for large outputs, not every row. Claude Code warns when an MCP result passes 10,000 tokens.

MCP vs function calling shows how an MCP tool reaches the model, with the same tool written both ways, and context engineeringContext EngineeringChoosing what goes into a model's context at each step of a task, what to fetch only when needed, and what to clear, note down or summarise as the context grows. covers what else competes for the same window.

Questions

Is MCP more token-verbose than calling an API directly?
No. A model never reads the MCP protocol. The app turns each MCP tool into the same name, description and JSON schema it would send for a tool you wrote yourself, so the same tool costs the same tokens either way. What costs tokens is how many tools are loaded and how long their descriptions are.
Why do MCP tool descriptions use so much of my context window?
Most apps load every tool from every connected server at the start and send them again with each request. A typical set of 5 servers (GitHub, Slack, Sentry, Grafana and Splunk) can come to about 55,000 tokens before the agent does any work.
When is a CLI better than an MCP server for an agent?
When the agent already has a shell, as a coding agent does. One line telling it the command exists costs a few tokens, and it reads the --help text only when it needs the tool. An MCP server fits better when many apps should share the tools, when the agent has no shell, or when you need the server to hold credentials the agent must not see.
What is the difference between an MCP server and a skill?
An MCP server gives an app tools to call. A skill is a folder of instructions, and sometimes scripts, that the agent reads when a task matches its description. Only a skill's name and description sit in context until then, about 100 tokens each.
What is MCP tool search?
Tool search keeps tool definitions out of the context until the model searches for them. On the Claude API you mark tools with defer_loading and add a regex or BM25 search tool; Claude Code does this for MCP tools by default. It typically cuts tool-definition tokens by over 85 percent.
Is MCP an alternative to RAG?
No, they solve different problems. RAG finds passages of text to put in front of the model; MCP is a standard way to connect tools and data sources to an app. An MCP server can offer a search tool that does retrieval, but the protocol itself does not retrieve anything.