Why is my AI agent using thousands of tokens before I ask it anything?
Every MCP server you connect hands the model its whole tool list, and most clients send that list with every request. Each tool brings a name, a description and a JSON schema for its inputs, and the schema is usually the expensive part. Connect a few large servers and the model reads tens of thousands of tokens of tool definitions before it reads your question.
We measured it on 2026-10-22. Mixpeek's full MCP server adds 68,605 input tokens to every request, for 67 tools. Google's official Google Ads MCP server adds 3,668, for 3 tools. The fixes are to connect fewer tools, shrink the schemas, or let the model search for tools and load only the ones it needs.
How many tokens does each MCP server add to a request?
First-party measurement, run 2026-10-22 with Anthropic's token counting endpoint on claude-sonnet-5-5. Each row is the token count of a request with the server's tools minus the same request without them.
| MCP server | Tools | Input tokens added per request | Tool list size (JSON) |
|---|---|---|---|
| Mixpeek, full server (mcp.mixpeek.com/mcp) | 67 | 68,605 | 186 KB |
| Mixpeek, ingestion scope | 27 | 32,041 | 86 KB |
| Mixpeek, admin scope | 23 | 24,403 | 66 KB |
| Mixpeek, retrieval scope | 19 | 18,151 | 48 KB |
| Google Ads MCP (official, default config) | 3 | 3,668 | 8 KB |
How we counted. The Mixpeek lists came from
tools/list on the public endpoints. The Google Ads
list came from running the open-source server at its 2026-10-09 commit with its bundled tool
configuration. Any request that carries at least one tool also pays a fixed 315 tokens, which is
included in every row above. Your own client may format tools differently, so treat the numbers as
the size of the definitions, measured the same way for every server.Where do the tokens go?
Into the input schemas. Across Mixpeek's 67 tools, the tool descriptions are 3% of the bytes and the schemas are the rest. Counted one tool at a time, the median tool costs 530 tokens, the smallest 157 and the largest 5,172. The ten largest tools carry 51% of the total.
The largest is
list_storage_connections, a read that takes a few filters. One of those filters,
provider_type, carries a 10,774-byte description of every storage provider Mixpeek supports, copied
in from the server's code. The model pays for that text on every request whether or not it ever lists
a storage connection. That is a common pattern: a schema generated from code inherits every docstring,
enum note and nested object the code has.Google's Google Ads server shows the other shape. Its
search tool has a small schema and a
5,807-character description that teaches the model how to write a Google Ads Query Language query.
Those tokens do work on every call, because the tool is useless without them.How many tokens would a large advertising MCP server cost?
Multi-platform advertising servers ship far more tools. Adspirer's FAQ lists 405 tools across Google, Amazon, LinkedIn, Meta, TikTok and ChatGPT Ads. We did not measure that server. As arithmetic only: at the 530-token median we measured on Mixpeek's tools, 405 tool definitions sent up front would come to roughly 215,000 tokens per request. Check what your client actually loads before you connect several of these at once.
Anthropic's tool search documentation puts a typical five-server setup (GitHub, Slack, Sentry, Grafana and Splunk) at about 55,000 tokens of definitions, and says Claude's ability to pick the right tool degrades past 30 to 50 available tools. So a large tool list costs you twice: once in tokens, and again in wrong tool calls.
How do I cut the tokens my agent spends on tools?
1. Connect only the servers this agent needs. A reporting agent does not need the server that creates campaigns. Many servers offer scoped endpoints or a config file that turns tool groups off; Google Ads MCP has
tools_config.yaml, and Mixpeek has separate ingestion, retrieval and admin
endpoints.
2. Pick the scope by the job. In our table, an agent that only searches a Mixpeek library pays
18,151 tokens on the retrieval endpoint against 68,605 on the full server, 74% less.
3. Defer loading. With Claude's tool search tool, you mark tools defer_loading: true and the
model searches the catalog and loads up to 5 matches by default. Anthropic reports this typically
cuts definition tokens by over 85 percent. For MCP servers connected through the MCP connector, set
it once on the toolset's default_config.
4. If you write the server, shrink the schemas. Move long explanations out of parameter
descriptions into docs, replace a long enum note with the enum values, and drop parameters that are
aliases of each other. Measure each tool alone, as below, and fix the largest first.
5. Cache the prefix. Tool definitions sit at the front of the prompt, so prompt caching makes the
repeated tokens cheaper on later turns. It does not make them shorter, and the model still has to
choose among them.How do I measure my own MCP server's token cost?
Fetch the tool list from your server, then ask the counting endpoint for the difference with and without it. The endpoint is free to call.
import json, os, urllib.request
def count(tools=None):
body = {"model": "claude-sonnet-5-5",
"messages": [{"role": "user", "content": "Which campaigns spent the most last week?"}]}
if tools:
body["tools"] = tools
req = urllib.request.Request(
"https://api.anthropic.com/v1/messages/count_tokens",
data=json.dumps(body).encode(),
headers={"x-api-key": os.environ["ANTHROPIC_API_KEY"],
"anthropic-version": "2023-06-01", "content-type": "application/json"})
return json.load(urllib.request.urlopen(req))["input_tokens"]
# tools/list result from your MCP server
mcp_tools = json.load(open("tools.json"))["result"]["tools"]
tools = [{"name": t["name"], "description": t.get("description") or "",
"input_schema": t["inputSchema"]} for t in mcp_tools]
print("all tools:", count(tools) - count())
for t in tools:
print(t["name"], count([t]) - count())Which MCP servers should an advertising agent connect?
The ones that match its job, and no more. A reporting agent needs read access to each ad platform it reports on; the official servers from Google, Meta, Amazon and TikTok cover their own platforms. A creative or brand-safety agent also needs to see the ads and the content around them: what is on screen, what is said, which logos appear. That is a perception job, and it is the part an ad platform's server does not do. Ethan Steininger, Mixpeek's founder, describes the gap this way: agents "cannot watch a video, scan a photo for a logo, or search audio by what was said."
Doing it in Mixpeek
Mixpeek reads your files where they already live, in S3, GCS or any bucket, and turns what's in them into data your software can search, classify and moderate. Its hosted MCP server gives an agent that library as tools, in four scoped endpoints:
| Endpoint | Tools | Tokens added (2026-10-22) | Use it for |
|---|---|---|---|
| mcp.mixpeek.com/retrieval/mcp | 19 | 18,151 | Searching, retrievers, agent sessions |
| mcp.mixpeek.com/admin/mcp | 23 | 24,403 | Namespaces, taxonomies, clusters |
| mcp.mixpeek.com/ingestion/mcp | 27 | 32,041 | Buckets, collections, documents |
| mcp.mixpeek.com/mcp | 67 | 68,605 | Everything, for setup sessions |
Who it fits: agents that need to find a moment in a video library, an image by what is in it, or a passage in a document, over content that already lives in a bucket. Who it does not: an agent that only reads campaign metrics belongs on the ad platform's own server. Build starts at $25 a month (pricing).
Frequently Asked Questions
How many tokens does an MCP server use?
It depends on its tool list. In our 2026-10-22 measurement, Google's official Google Ads MCP server added 3,668 input tokens per request for 3 tools, and Mixpeek's full MCP server added 68,605 for 67 tools. The median Mixpeek tool cost 530 tokens.
Do MCP tool definitions count against the context window?
Yes. Tool definitions are input tokens. They take space in the context window and are billed on every request that includes them, unless your client defers loading them.
Why does one MCP tool cost thousands of tokens?
Usually because of its input schema. Schemas generated from code carry nested objects, long enum notes and docstrings. One Mixpeek tool,
list_storage_connections, costs 5,172 tokens, mostly from a
single filter whose description lists every storage provider.Does prompt caching fix tool token costs?
It lowers the price of the repeated tokens on later turns. The definitions are still in the context window, and the model still chooses among all of them.
How many tools can an agent handle?
Anthropic's tool search documentation says Claude's ability to pick the right tool degrades once more than 30 to 50 tools are available, and recommends tool search when tool definitions pass 10,000 tokens or you have 10 or more tools.