mcp-context-cost

serena — context cost

8,204 tokens across 29 tools — moderate (5–15K). Measured 2026-09-16 under methodology v1.0.

An Anthropic request carries 6,550 of those tokens as tool definitions, and Claude counts those at 11,494.

   
server (self-reported) Serena v1.7.1.dev0
status measured
tokenizer tiktoken / o200k_base
launch command uvx --from git+https://github.com/oraios/serena serena start-mcp-server
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 7d876a84707e0689df306366dc7c3225ae49762ca045d7604c7c9a2b20dfbc3c
category community
source https://github.com/oraios/serena

Where the tokens are

tool tokens share description input schema output schema
find_symbol 883 10.8% 273 530 28
replace_in_files 801 9.8% 225 497 28
search_for_pattern 524 6.4% 48 405 28
replace_content 479 5.8% 128 282 28
find_declaration 355 4.3% 8 280 28
find_implementations 346 4.2% 27 249 28
get_diagnostics_for_file 338 4.1% 52 211 28
execute_shell_command 330 4.0% 79 179 28
edit_memory 325 4.0% 10 249 28
find_referencing_symbols 310 3.8% 48 190 28
get_symbols_overview 301 3.7% 59 171 28
read_file 291 3.5% 23 202 28
list_dir 277 3.4% 30 181 28
replace_symbol_body 246 3.0% 36 138 28
write_memory 232 2.8% 74 85 28
insert_before_symbol 231 2.8% 56 105 28
rename_symbol 223 2.7% 59 97 28
insert_after_symbol 205 2.5% 24 110 28
find_file 180 2.2% 25 89 28
safe_delete_symbol 175 2.1% 31 75 28
rename_memory 174 2.1% 56 47 28
create_text_file 162 2.0% 22 71 28
initial_instructions 135 1.6% 52 14 28
activate_project 124 1.5% 11 47 28
read_memory 123 1.5% 26 31 28
delete_memory 114 1.4% 17 31 28
onboarding 112 1.4% 31 14 28
get_current_config 105 1.3% 22 14 28
list_memories 101 1.2% 9 25 28

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 8,204 the badge number — every byte tools/list returned
o200k, Anthropic fields only 6,550 20.2% of the capture is MCP-only metadata
Claude, same fields 11,494 1.40× 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-17 8,204 29 not recorded not recorded —
2026-08-19 8,204 29 not recorded docker no change
2026-09-04 8,204 29 1.7.1.dev0 docker no change
2026-09-16 8,204 29 1.7.1.dev0 docker no change

Some of these sweeps predate the isolation column, so the conditions they were measured under are not on record.

Full series: results/history.csv.

Re-derive it

npx -y mcp-context-cost verify results/serena/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