{"slug": "playwright-mcp-vs-kane-cli-42333-vs-2056-tokens", "title": "Playwright MCP vs Kane CLI: 42,333 vs 2,056 tokens", "summary": "TestMu AI (formerly LambdaTest) measured token consumption for two ways a coding agent can drive browser testing: Playwright MCP versus its own Kane CLI. In a single iPhone add-to-cart flow on its Ecommerce Playground, Playwright MCP with full snapshots returned 42,333 tokens to the calling agent across 12 tool calls, while Kane CLI returned 2,056 tokens in one command; using Playwright's browser_find cut the MCP figure to 4,076 tokens. The team attributed most of the snapshot cost to page reads, with the store's home page alone accounting for 20,116 tokens, and noted the Kane CLI run took 96.7 seconds versus 15 seconds of browser time for MCP.", "body_md": "When a coding agent tests a web app through Playwright MCP, its own model drives the browser one tool call at a time and decides whether the test passed. With Kane CLI, which we build at TestMu AI (formerly LambdaTest), the agent hands one plain-English objective to a separate browser agent and gets back a pass or fail with evidence.\n\nWe wanted to know how much text each approach puts in front of the calling agent, so we ran the same flow both ways and counted every response.\n\nThe short version:\n\n`browser_find`: The headline gap is against full snapshots. Against `browser_find`, the gap is much smaller. This is one flow, so treat it as one data point.\n\nOn TestMu AI's Ecommerce Playground:\n\n`browser_snapshot` before each action. In the second, it uses `browser_navigate` and `browser_click` save the snapshot to a file and return only a link, so the agent has to ask for the page again before its next action.`--agent --headless`, then replayed the saved test.` o200k_base` tokenizer.\n| Measure | Playwright MCP, full snapshots | Playwright MCP, `browser_find` | Kane CLI, first run | Kane CLI, replay | \n|---|---|---|---|---|\n| Setup text loaded | 4,396 tokens of tool definitions | 4,396 tokens of tool definitions | 1,784 tokens, if the agent reads the hosted skill | Same skill, already read | \n| Calls from the agent | 12 tool calls | 12 tool calls | 1 command | 1 command | \n| Text returned to the agent | 42,333 tokens | 4,076 tokens | 2,056 tokens in 24 NDJSON lines | 3,575 tokens in 53 NDJSON lines | \n| Final result line only | None; the agent decides | None; the agent decides | 764 tokens | 65 tokens | \n| Browser time | 15 seconds, plus the agent's thinking on 12 turns | 15 seconds, plus the agent's thinking on 12 turns | 96.7 seconds, reasoning included | 23 seconds | \n| Kane CLI credits | None | None | 22.8 credits | None | \n\nAll four runs confirmed an iPhone in the cart.\n\n**Snapshots are the cost.** With full snapshots, four page reads made up 41,385 of the 42,333 tokens. The store's home page alone was 20,116 tokens: a 1,360-line accessibility tree with 1,156 element references.\n\n**`browser_find` helps, if the agent knows what to look for.** Searching for \"Search For Products\" or \"Add to Cart\" cut the reads to a few hundred tokens each. The search-results page still returned 2,241 tokens, because \"iPhone\" matched every product card.\n\n**Kane CLI's result is small and structured.** The agent can read only the final `run_end` line, which carries the status, a summary and the values Kane CLI extracted.\n\n**Approval checks add up.** The Playwright MCP flow made 12 MCP tool calls. In Cursor, that means 12 prompts under an empty allowlist, or 12 classifier reviews under Auto-review. The Kane CLI command needed at most one. Only Run Everything skips the checks.\n\nThe difference is who decides. Playwright MCP hands the agent browser snapshots and leaves the judgment to the model. Kane CLI runs the objective itself and hands the agent a verdict.\n\n[Kane CLI](https://www.testmuai.com/kane-cli/) installs from npm. This is the shape of the two Kane CLI runs, a first run saved by name and then a replay:\n\n```\nnpm install -g @testmuai/kane-cli\nkane-cli login --oauth\n\n# First run, saved so it can be replayed\nkane-cli run \"Go to <your-store-url>, search for 'iPhone', open the first result, add it to the cart, then verify the cart lists an iPhone\" \\\n  --agent --headless --name iphone-cart\n\n# Replay\nkane-cli testmd run .testmuai/tests/iphone-cart_test.md --agent --headless\n```\n\nRun the same flow through Playwright MCP, count the responses with one tokenizer, and compare. If you get very different numbers, post the flow and the versions in the comments.\n\n*This measurement was first published in [Playwright CLI vs Playwright MCP: Which Should Your Coding Agent Use?](https://www.testmuai.com/blog/playwright-cli-vs-mcp-vs-kane-cli/), which also covers Playwright CLI.*", "url": "https://wpnews.pro/news/playwright-mcp-vs-kane-cli-42333-vs-2056-tokens", "canonical_source": "https://dev.to/testmuai/playwright-mcp-vs-kane-cli-42333-vs-2056-tokens-1c1f", "published_at": "2026-11-24 08:40:07+00:00", "updated_at": "2026-11-24 08:43:27.507539+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["TestMu AI", "LambdaTest", "Playwright MCP", "Kane CLI", "Cursor", "npm"], "also_reported_by": [], "takeaway": "Full-page Playwright MCP snapshots returned 42,333 tokens for a four-page flow, with the home page alone at 20,116 tokens, while browser_find cut reads to 4,076 and Kane CLI returned 2,056 tokens in one command.", "recommendation": {"advice": "Prefer targeted browser_find queries or a delegated browser agent over full-page snapshots to keep agent context small; the source measured 42,333 tokens for snapshots versus 4,076 for browser_find on the same flow.", "playbook": "llm-cost", "playbook_url": "https://wpnews.pro/playbooks/llm-cost"}, "alternates": {"html": "https://wpnews.pro/news/playwright-mcp-vs-kane-cli-42333-vs-2056-tokens", "markdown": "https://wpnews.pro/news/playwright-mcp-vs-kane-cli-42333-vs-2056-tokens.md", "text": "https://wpnews.pro/news/playwright-mcp-vs-kane-cli-42333-vs-2056-tokens.txt", "jsonld": "https://wpnews.pro/news/playwright-mcp-vs-kane-cli-42333-vs-2056-tokens.jsonld"}}