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.

Leonid Bugaev · Published 21 Oct 2026

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.

Measure your MCP

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 modeWithoutWith 99 toolsAdded
Codex 0.161.0, default code mode17,09817,0980
Claude Code 2.1.301, default21,07622,791+1,715
Claude Code, ENABLE_TOOL_SEARCH=false36,474144,015+107,541
Claude Code, custom ANTHROPIC_BASE_URL35,911143,453+107,542
OpenCode 1.18.34, default12,26585,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

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

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.

Measure your MCP