Brocogni Claims 81% Token Cost Cut Over Playwright MCP for Browser Automation
Developers building an open-source browser automation tool called Brocogni found that generating reusable Playwright scripts via Playwright MCP cost significantly more tokens than expected due to repeated observation and selector-reconstruction cycles. The core issue is that Playwright MCP uses ephemeral element references that expire after each session, forcing the LLM to re-parse accessibility trees and guess selectors when producing reusable code. In benchmarking a full pipeline — observe, interact, generate script, execute, and fix failures — Playwright MCP consumed around 3,211 tokens per script compared to Brocogni's 1,535. Brocogni shifts selector computation server-side before the LLM sees the page, returning only the nine or so actionable elements rather than 62–93 accessibility nodes. Across an estimated 200 scripts per month, this approach reduced projected costs from roughly $7.11 to $1.33, an 81% reduction according to the team's own benchmark.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in