mcp-context-cost

git — context cost

1,455 tokens across 12 tools — light (1–5K). Measured 2026-09-30 under methodology v1.0.

An Anthropic request carries 1,119 of those tokens as tool definitions, and Claude counts those at 2,382.

   
server (self-reported) mcp-git v1.30.0
status measured
tokenizer tiktoken / o200k_base
launch command uvx --with "mcp\<2" mcp-server-git
isolation docker · ghcr.io/astral-sh/uv:python3.12-bookworm-slim · network bridge · linux/amd64 · network enabled for package fetch; clean FS, no host credentials, git in
env vars supplied none
canonical SHA-256 9710fb8f79f50348c138ee513e344f7fc9ac0e912a728d8aeda847cd04ed64f1
category official-reference
source https://github.com/modelcontextprotocol/servers

Where the tokens are

tool tokens share description input schema
git_log 289 19.9% 4 246
git_branch 219 15.1% 3 177
git_create_branch 123 8.5% 9 74
git_diff 106 7.3% 6 61
git_diff_unstaged 104 7.1% 11 51
git_diff_staged 98 6.7% 7 50
git_add 97 6.7% 7 51
git_checkout 89 6.1% 3 47
git_show 89 6.1% 6 44
git_commit 88 6.0% 5 44
git_reset 76 5.2% 6 31
git_status 75 5.2% 5 31

Each tool is tokenized on its own, so the parts do not sum exactly to the whole: the array adds its own brackets and commas, and the tokenizer merges tokens across object boundaries. The badge number is always the count of the whole array, never a sum of parts.

What this costs on Claude

Measured 2026-09-14 against claude-opus-5 via Anthropic’s count_tokens (method tools-delta/v1).

  tokens  
o200k, full capture 1,455 the badge number — every byte tools/list returned
o200k, Anthropic fields only 1,119 23.1% of the capture is MCP-only metadata
Claude, same fields 2,382 1.64× the badge number

An Anthropic tool definition carries name, description, and input_schema and nothing else, so title, annotations, outputSchema, execution, and icons are dropped before the request — that is the second row. The third row is the same tools counted by Anthropic, which is larger than the second because Anthropic’s tokenizer is denser on this content than o200k_base and the API adds its own framing (at most 328 tokens of it fixed, measured against a single minimal tool). The two effects run in opposite directions, which is why the Claude number is not a fixed multiple of the badge.

Over time

date tokens tools release measured in change
2026-08-18 1,455 12 not recorded docker —
2026-09-04 1,455 12 1.29.1 docker no change
2026-09-05 1,455 12 1.29.1 docker no change
2026-09-09 1,455 12 1.30.0 docker no change
2026-09-30 1,455 12 1.30.0 docker no change

Full series: results/history.csv.

Re-derive it

npx -y mcp-context-cost verify results/git/measurement.json

That re-tokenizes the published capture and checks the count and the hash. If it disagrees with the badge, the badge is wrong — open an issue and it gets corrected.

Badge JSON · All servers · Leaderboard · Methodology