TokenSave Data · Dataset
How many tokens does browser MCP cost? Playwright vs Chrome DevTools, and a snapshot diet
On everyday browser tasks both servers were light: the largest tool result in 16 runs was 6,012 characters, because Claude ran small scripts or searches instead of reading whole pages. One full snapshot of a long Wikipedia article is another story: about 205,642 Claude tokens from Playwright MCP and 208,926 from Chrome DevTools MCP. Our open-source proxy, tokensave-mcp-diet 0.2, turned that into a table of contents of about 1,141 and 1,118 tokens, cut a Hacker News snapshot by 63% and 43%, and made the Wikipedia fact-finding task cheaper on both servers.
Measured 2026-10-22 · 94 runs · Claude Code 2.1.295, Opus 5.5 · License CC BY 4.0 · Tool: tokensave-mcp-diet · Related: Claude Code vs Codex
DOI 10.5281/zenodo.23555401 · Also on Hugging Face · Kaggle · GitHub · GitHub (tokensave-mcp-diet)
Estimate your own Claude Code or Codex bill → See the monthly cost of Claude Code and Codex for your usage: API per task vs Claude and ChatGPT plans. Free, no sign-up.
Key findings
- Everyday tasks were cheap, and not because of the MCP. Filling a to-do list, finding facts on Wikipedia and reading Hacker News took 90,000 to 224,000 input tokens per task ($0.16 to $0.22 at API prices). Each request carried about 23,374 tokens, most of it Claude Code’s own instructions and tools; the browser results added little. Opus 5.5 preferred
evaluatescripts and Playwright’sfindover full snapshots. - One full snapshot of a long page is over 200,000 tokens. The accessibility snapshot of the Python article on English Wikipedia was 504,168 characters from Playwright MCP and 427,400 from Chrome DevTools MCP. Sent to Opus 5.5 it counted 205,642 and 208,926 tokens, about $1.65 each at list price. (OpenAI’s o200k tokenizer counts 133,668 and 138,745.)
- Claude Code already blocks that. It refused both results as too large, saved them to a file and told the model to read it in pieces. The task still got answered. Clients without such a limit would put the whole page into the context.
- Medium pages get through, and that is where a diet pays off inside Claude Code. A Hacker News snapshot added 18,407 tokens (Playwright) and 14,115 (Chrome DevTools). Through tokensave-mcp-diet: 6,770 (-63%) and 8,047 (-43%), with the same answer in all 5 runs. The whole task cost 30% and 17% less.
- Very large pages: version 0.1 lost money, version 0.2 does not. Our first version sent a 9,000-token outline where Claude Code would have sent a short refusal note, and the Wikipedia tasks cost 3% to 44% more. Version 0.2 sends only a table of contents (headings with refs, about 1,141 tokens) and lets the model open a section by its ref. With it, finding facts on the Python article cost 4% less on Playwright and 23% less on Chrome DevTools, and a bare full snapshot cost about the same as Claude Code’s own refusal (+2% and +3%). Every task was answered correctly in all 94 runs.
Everyday tasks, servers as shipped
Average of 2 runs. Input = all input tokens of the task (uncached + cache read + cache write). Cost at Opus 5.5 API prices as reported by Claude Code. Largest result = the biggest single tool result in either run.
| Task (2 runs each) | Playwright MCP: input | Playwright MCP: cost | Playwright MCP: largest result (chars) | Chrome DevTools MCP: input | Chrome DevTools MCP: cost | Chrome DevTools MCP: largest result (chars) |
|---|---|---|---|---|---|---|
| TodoMVC: add 3 items, complete 1 | 178,408 | $0.19 | 1,455 | 199,737 | $0.22 | 1,203 |
| Wikipedia: designer and first year | 115,888 | $0.17 | 6,012 | 117,240 | $0.17 | 555 |
| Hacker News: top 5 stories | 90,006 | $0.16 | 901 | 93,496 | $0.17 | 469 |
| Wikipedia: 5 release dates | 91,350 | $0.16 | 696 | 93,683 | $0.16 | 446 |
Snapshot tasks, with and without tokensave-mcp-diet 0.2
The prompt asked for an accessibility snapshot and forbade JavaScript. “Snapshot tokens” = how much the next request grew after the snapshot came back. Cost = average of 5 runs (3 for the full-snapshot probe), lowest and highest run in brackets. The snapshot token counts varied by at most 4% between runs.
| Task | Server | Snapshot tokens, as shipped | With the diet | Task cost, as shipped | With the diet | Change |
|---|---|---|---|---|---|---|
| Hacker News top 5, from a snapshot | Playwright MCP | 18,407 | 6,770 | $0.298 ($0.297–$0.299) | $0.208 ($0.207–$0.208) | -30% |
| Hacker News top 5, from a snapshot | Chrome DevTools MCP | 14,115 | 8,047 | $0.271 ($0.271–$0.272) | $0.226 ($0.224–$0.229) | -17% |
| Wikipedia facts, from a snapshot | Playwright MCP | refused in 3 of 5 runs | 1,141 | $0.181 ($0.163–$0.214) | $0.173 ($0.170–$0.174) | -4% |
| Wikipedia facts, from a snapshot | Chrome DevTools MCP | refused, saved to file | 1,118 | $0.230 ($0.223–$0.235) | $0.178 ($0.177–$0.178) | -23% |
| Wikipedia, one full snapshot | Playwright MCP | refused, saved to file | 1,141 | $0.154 ($0.153–$0.154) | $0.157 ($0.157–$0.158) | +2% |
| Wikipedia, one full snapshot | Chrome DevTools MCP | refused, saved to file | 1,118 | $0.160 ($0.159–$0.160) | $0.165 ($0.164–$0.166) | +3% |
What tokensave-mcp-diet does
It is a small open-source MCP proxy (github.com/johnisking/tokensave-mcp-diet, MIT) that sits in front of either server. Every tool passes through. When a page snapshot is over 8,000 characters it first removes noise (link targets, cursor marks, separators, empty layout wrappers) and keeps every element ref, so clicking still works. If the result is still over 20,000 characters it sends an outline of headings, form fields, buttons and links instead, and above 60,000 characters only a table of contents. The full snapshot stays in memory, and a new tool, snapshot_detail, returns any part of it by ref (a heading ref returns its whole section) or by text. The CSV also has the runs of version 0.1, which had no table of contents.
What to take from it
- If an agent works through browser MCP in Claude Code, most of the bill is Claude Code’s fixed per-request overhead and the number of steps, not the pages.
- The expensive case is a full snapshot of a long page. Ask for a specific element, a search or a script instead of “read the page”.
- In clients that pass large tool results straight through, one long page can add more than 200,000 tokens to the context. A proxy like tokensave-mcp-diet, or a server option that saves snapshots to files, keeps that out of the context.
Method
- Claude Code 2.1.295,
claude -p <prompt> --effort medium --output-format stream-json --verbose, model Opus 5.5, Windows 11, on 2026-10-22. Each run had exactly one MCP server (--strict-mcp-config) and could use only its tools: WebFetch, WebSearch, Bash, file tools and subagents were disabled. - Servers:
@playwright/mcp@0.0.83andchrome-devtools-mcp@1.11.0, both--headless --isolated. tokensave-mcp-diet 0.1.0 and 0.2.0 wrapped the same commands. - Pages: demo.playwright.dev/todomvc, the English Wikipedia articles “Python (programming language)” and “History of Python”, and the Hacker News front page, live on the day. Snapshot tasks forbade JavaScript (
evaluatetools disabled). - The Claude token count of a full Wikipedia snapshot was measured by piping the saved snapshot text to
claude -p "Reply with OK only."with no tools, minus an empty run (2,889 tokens).
Limitations
- Two runs per everyday task, five per snapshot task (three for the full-snapshot probe) for each version, one model, one machine, live pages that change during the day (Hacker News points moved between runs).
- Only Claude Code was measured. We did not test Claude Desktop, Cursor or Codex, so we do not know which of them pass a 200,000-token result through.
- Snapshot formats change between server versions; Playwright MCP already saves the snapshot to a file when navigating.
- The outline drops plain text, so the model must ask for details; on some tasks that adds steps.
How to cite
Free to use, quote and republish with attribution under CC BY 4.0. Please link to this page.
TokenSave (2026). Browser MCP token cost: Playwright MCP vs Chrome DevTools MCP, and what a snapshot diet saves [Data set]. Zenodo. https://doi.org/10.5281/zenodo.23555401
Embed the chart
Related
- Claude Code vs Codex: startup tokens and MCP tools
- What the Claude Code harness costs
- Claude Code baseline tokens by version
Questions or corrections: contact@jonhisking.com