Blog / How agents load MCP tools
MCP tool-list token calculator: what your tools cost in Claude Code, Codex and OpenCode
Your tool list has one size. What it costs depends on the agent app: one app sends it with every request, another sends only names, another sends nothing until the model searches. Paste your list to see the spread.
Calculator
Paste a tools/list response or its tools array. Everything runs in this page.
Need the JSON? Use MCP Inspector or its CLI to print the tools/list result. Checks beyond size: MCP server scorecard.
Want measured numbers, not estimates?
We capture what each agent app actually sends with your server attached, job by job, and show what to trim.
Where the factors come from
We served a recorded 99-tool list from a local mock server, sent “say hi” with and without it, and compared each app's first-request input tokens.
| App and mode | Without | With 99 tools | Added |
|---|---|---|---|
| Codex 0.161.0, default code mode | 17,098 | 17,098 | 0 |
| Claude Code 2.1.301, default | 21,076 | 22,791 | +1,715 |
Claude Code, ENABLE_TOOL_SEARCH=false | 36,474 | 144,015 | +107,541 |
Claude Code, custom ANTHROPIC_BASE_URL | 35,911 | 143,453 | +107,542 |
| OpenCode 1.18.34, default | 12,265 | 85,680 | +73,415 |
The list itself was 68,730 tokens (o200k_base). Each app counts with its own tokenizer, which is why the added figures differ from the list size.
How to read the result
- Preloading apps pay it every request. Multiply by requests per question. In our live runs OpenCode averaged 3.7; Codex took 4.2–7.6 depending on the job.
- Search-based apps pay later, in search output and loaded definitions, and their cost depends on names and first lines more than size. See Claude Code tool search, seen from the wire.
- A few heavy tools often dominate. In our example, two tools were 35% of the list. See how many MCP tools is too many.
Go deeper: MCP context window usage, OpenCode 1 vs 2, Per-task cost, Claude Code vs Codex.
Back to how agents load MCP tools.
How we measured
- Controls: 16 Oct 2026, mock server serving a recorded 99-tool list, prompt “say hi”, first-request input tokens by each app's own usage.
- Calculator: your list's estimated tokens × (added ÷ 68,730) for preloading apps; 1,715 ÷ 99 per tool for names-only. Codex shown as 0 up front.
- Limits: one list, one version per app, single runs. Treat results as a rough guide.
FAQ
How many tokens does my MCP server's tool list use?
Paste the tools/list JSON into the calculator: it estimates tokens as compact JSON characters ÷ 4. For an exact count, use the tokenizer of the model you care about.
Do all agent apps pay for the whole tool list?
No. In our measurements OpenCode 1 and Claude Code with tool search off sent every definition with every request; Claude Code with tool search on sent only names (about 17 tokens per tool); Codex sent nothing up front and found tools by search.
When does Claude Code turn tool search off?
In our tests, with ENABLE_TOOL_SEARCH=false and when it ran through a custom ANTHROPIC_BASE_URL (a proxy or gateway). Then all 99 definitions were in every request.
Is the calculator exact?
No. It scales factors measured on one 99-tool list by your list's size. Tokenizers differ by model, and apps change between versions.
Want measured numbers, not estimates?
We capture what each agent app actually sends with your server attached, job by job, and show what to trim.