tokensave-mcp-diet
Acts as a proxy in front of MCP for Blender, passing Blender tools through while shortening oversized results such as long script outputs and reducing image sizes for tools like look.
tokensave-mcp-diet
A small MCP proxy that keeps oversized tool results out of your AI's context. Part of TokenSave, which measures where AI tokens go.
Put it in front of Playwright MCP, Chrome DevTools MCP, MCP for Blender or another MCP server. Every tool passes through unchanged. When a tool returns a large page snapshot or a long text, the proxy sends back a shorter version instead and keeps the full result in memory, so the model can still read any part of it.
Why
We measured both servers with Claude Code (Opus 5.5) on 2026-10-22, 94 runs in total:
Playwright MCP 0.0.83 | Chrome DevTools MCP 1.11.0 | |
One full snapshot of a long Wikipedia article | 504,168 characters, about 205,600 Claude tokens | 427,400 characters, about 208,900 Claude tokens |
Same snapshot through tokensave-mcp-diet 0.2 (table of contents) | about 1,140 Claude tokens (−99%) | about 1,120 Claude tokens (−99%) |
Hacker News front page snapshot, tokens added to the request | 18,407 → 6,770 (−63%) | 14,115 → 8,047 (−43%) |
Whole task "list the top 5 stories", API cost (average of 5 runs) | $0.298 → $0.208 (−30%) | $0.271 → $0.226 (−17%) |
Whole task "find two facts in the long Wikipedia article", API cost (5 runs) | $0.181 → $0.173 (−4%) | $0.230 → $0.178 (−23%) |
Full method, raw logs and limitations: https://tokensave.app/data/browser-mcp-token-cost (dataset DOI 10.5281/zenodo.23555401, CC BY 4.0)
Claude Code already refuses tool results that are too large and saves them to a file. Version 0.1 sent a 9,000-token outline in that case and lost money inside Claude Code (+3% to +44% per task). Version 0.2 sends a table of contents of about 1,100 tokens instead, which costs about the same as Claude Code's refusal note and lets the model open just the section it needs. In clients that pass large results straight into the context, one long page can cost more than 200,000 tokens.
Compared with Chrome DevTools MCP's filePath option
Chrome DevTools MCP can also keep big results out of the context on its own: take_snapshot and evaluate_script take an optional filePath and write the result to a file instead of returning it (#463, #2054). Use it when your agent can read local files and you want the whole result in one place.
The proxy works differently: the model gets a short outline or table of contents with live uids, so it can keep clicking and typing on the page, and reads one section with snapshot_detail instead of opening a file. It also works with servers that have no such option (Playwright MCP, MCP for Blender) and with clients that cannot read files. We have not measured the filePath option; our numbers above are for Chrome DevTools MCP 1.11.0 without it.
Blender (version 0.3)
MCP for Blender in Claude Code, 2026-10-22, 72 runs: everyday tasks cost $0.16 to $0.23 and a racing scene with a chase camera $0.47, with small results, so the proxy changes little there (−4% to −8%, within noise). The one expensive case is a long script output: printing every property of 580 objects cost $0.873, and $0.166 through the proxy (−81%). Data: https://tokensave.app/data/blender-mcp-token-cost
Related MCP server: Chrome DevTools MCP
What it does
Compact (snapshot fits the budget): the same tree with the noise removed: link targets,
[cursor=pointer], separators, empty layout wrappers and deep indentation. Everyref/uidstays, so clicks and typing work as before.Outline (still too big): headings, form fields, buttons and links only, long text cut, long runs of links collapsed.
Table of contents (very large pages): page title, headings with their refs, the form fields and buttons, and a link count. Usually under 1,500 tokens.
snapshot_detailtool: reads any part of the last full snapshot byref/uid(a heading ref returns its whole section), or by a textquery, instead of taking another full snapshot.Long text results (version 0.3, any server): text over
--max-textcharacters keeps its first 2,000 and last 1,000 characters plus a summary of the hidden lines (how many, and their most common shapes). A newresult_detailtool returns any part by line range or text search. Long string fields instructuredContentare shortened the same way, because some clients (Claude Code) show those instead of the text.Smaller images (version 0.3): tools with a
max_sizeargument (MCP for Blender'slook) get 512-pixel images unless the model asks for more than 1,000.
Images and short results are passed through untouched.
Install
Needs Node.js 18 or later. No npm account or API key.
Claude Code (.mcp.json or claude mcp add):
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "github:johnisking/tokensave-mcp-diet", "--", "npx", "-y", "@playwright/mcp@latest"]
}
}
}For Chrome DevTools MCP, replace the part after -- with npx -y chrome-devtools-mcp@latest. For MCP for Blender, use uvx mcp-for-blender. On Windows, use "command": "cmd" and put "/c" in front of the arguments.
Docker: the included Dockerfile runs the proxy in front of headless Playwright MCP (docker build -t tokensave-mcp-diet ., then docker run -i --rm tokensave-mcp-diet). Listing the tools needs no browser; to use the browser tools in the container, add npx playwright install --with-deps chromium to the image.
The same setup should work in other MCP clients that start servers with a command (Claude Desktop, Cursor, Codex); we have only measured it in Claude Code.
Options
Option | Default | Meaning |
| 8000 | Snapshots shorter than this are passed through unchanged |
| 20000 | Largest compact snapshot to send; above this the outline is sent |
| 60000 | Snapshots longer than this get only a table of contents |
| 12 | In the outline, how many links of a long run to keep |
| 8000 | Other text results longer than this keep only their head and tail (0 turns this off) |
| 512 | Default |
| 3 | Upper limit for a |
| off | Remove the |
Example: npx -y github:johnisking/tokensave-mcp-diet --budget 12000 -- npx -y @playwright/mcp@latest
Limits
Tested with Playwright MCP 0.0.83 and Chrome DevTools MCP 1.11.0 on Windows with Claude Code 2.1.295. Snapshot formats change between versions.
The outline drops plain text. The model has to call
snapshot_detailto read it, which adds a step.Tested with MCP for Blender (add-on 1.8, Blender 5.2.2) for version 0.3.
Shortened text keeps the head and tail only; the model has to call
result_detailfor the middle.The proxy keeps snapshots and long results in memory only. Nothing is written to disk or sent anywhere.
License
MIT. Made by TokenSave, which measures where AI tokens go.
Available Tools
27 toolsbrowser_clickBDestructive
Perform click on a web page
Inputs: target (required), button, element, modifiers, +1 more.
browser_closeBDestructive
Close the page
Inputs: no named parameters.
browser_console_messagesCRead-only
Returns all console messages
Inputs: level (required), all, filename.
browser_dragADestructive
Perform drag and drop between two elements
Inputs: endTarget (required), startTarget (required), endElement, startElement.
browser_dropADestructive
Drop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of "paths" or "data" must be provided.
Inputs: target (required), data, paths, element.
browser_emulate_mediaADestructive
Emulate CSS media features for the page, for example switch between the light and dark color scheme. Omitted parameters are left unchanged; null clears an override.
Inputs: media, contrast, colorScheme, forcedColors, +1 more.
browser_evaluateCDestructive
Evaluate JavaScript expression on page or element
Inputs: function (required), target, element, filename.
browser_file_uploadBDestructive
Upload one or multiple files
Inputs: paths.
browser_fill_formBDestructive
Fill multiple form fields
Inputs: fields (required).
browser_findARead-only
Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.
Inputs: text, regex, filename.
browser_handle_dialogCDestructive
Handle a dialog
Inputs: accept (required), promptText.
browser_hoverADestructive
Hover over element on page
Inputs: target (required), element.
browser_network_requestARead-only
Returns full details (headers and body) of a single network request, or a single part if part is set. Use the number from browser_network_requests.
Inputs: index (required), part, filename.
browser_network_requestsARead-only
Returns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.
Inputs: static (required), filter, filename.
browser_press_keyBDestructive
Press a key on the keyboard
Inputs: key (required).
browser_resizeBDestructive
Resize the browser window
Inputs: width (required), height (required).
browser_run_code_unsafeADestructive
Run a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.
Inputs: code, filename.
browser_select_optionBDestructive
Select an option in a dropdown
Inputs: target (required), values (required), element.
browser_snapshotARead-only
Capture accessibility snapshot of the current page, this is better than screenshot
Inputs: boxes, depth, target, filename.
browser_tabsADestructive
List, create, close, or select a browser tab.
Inputs: action (required), url, index.
browser_take_screenshotARead-only
Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
Inputs: scale (required), type, target, element, +2 more.
browser_typeBDestructive
Type text into editable element
Inputs: text (required), target (required), slowly, submit, +1 more.
browser_wait_forBRead-only
Wait for text to appear or disappear or a specified time to pass
Inputs: text, time, textGone.
result_detailA
Read part of a long tool result that tokensave-mcp-diet shortened (script output, logs, dumps). Pass id from the note (e.g. r1), and lines (e.g. "200-260") or query (text to find). Prefer this over running the command again.
Inputs: id (required), lines, query, max_chars.
snapshot_detailA
Read part of the last page snapshot that tokensave-mcp-diet shortened. Pass ref (an element ref or uid from the outline, e.g. e123 or 1_45) to get that element and everything inside it, or query to find text on the page with its surrounding section. Use this instead of taking a new full snapshot.
Inputs: ref, query, max_chars.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 27 tools
Most tools map to a distinct action (navigate, click, type, hover, select_option, wait_for, resize, close) and the descriptions actively steer choices, e.g. snapshot vs screenshot vs find vs snapshot_detail. A few boundaries blur: browser_evaluate vs browser_run_code_unsafe both execute JS, browser_drag vs browser_drop both involve dragging, and browser_snapshot vs browser_find vs snapshot_detail all read page structure.
The set is overwhelmingly snake_case with a uniform browser_ prefix and a consistent verb_noun shape (browser_press_key, browser_navigate_back, browser_select_option). Deviations are minor: noun-only names like browser_snapshot and browser_tabs, and the two tokensave helper tools (snapshot_detail, result_detail) drop the browser_ prefix entirely.
27 tools is heavy for a single server, though browser automation is a genuinely broad domain and nearly every tool covers a real capability. Some consolidation is possible (evaluate/run_code_unsafe, drag/drop, snapshot/find/snapshot_detail), so the surface sits above the comfortable range rather than clearly over-scoped.
Coverage is strong across the browser lifecycle: navigation, element interaction, form filling, file upload, drag/drop, dialogs, tabs, viewport, console, network inspection, media emulation, plus result-truncation helpers. Gaps are modest—no cookie/localStorage or session-state tools, no request interception, and scrolling must be done indirectly via evaluate or key presses.
Maintenance
Related MCP Connectors
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Shared memory for your AI tools: tasks, notes and context every tool can read and write over MCP.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
Cross-tool persistent memory and context for AI assistants over MCP.
Related MCP Servers
- AlicenseBqualityBmaintenanceConnects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender for AI-assisted 3D modeling, scene manipulation, and rendering.2134,804MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser through Chrome DevTools. Provides browser automation, performance analysis, debugging capabilities, and network request monitoring.2,562,190 npm57,558Apache 2.0
- AlicenseNot gradedqualityAmaintenanceA proxy server that wraps existing MCP servers to significantly reduce token consumption by compressing tool descriptions into a two-step interface. It enables users to integrate extensive toolsets without exceeding context limits or incurring high API costs.143Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA proxy that intercepts MCP responses to reduce token consumption by compressing them via a pipeline and exposing only two meta-tools to the LLM.-