DEV Community

Nitai Aharoni
Nitai Aharoni

Posted on

What a browser MCP snapshot actually costs (I measured it)

I kept watching my agent's context fill up just from looking at web pages, so I measured where it goes. Sharing the numbers because I have not seen many people put real figures on this.

The cost nobody prices in

When an agent drives a browser through a plain MCP tool, every look at a page returns the whole accessibility tree, and the model has to read all of it before it can click anything. That read is the real cost. It is not the tool being slow, it is the model chewing through markup it never needed.

The numbers

From my own runs against Playwright MCP, the common option if your client has no shell:

  • A Hacker News comment page is a 246,690 character tree. One look through a full snapshot tool was about 77,000 tokens across the calls it took. A leaner approach did the same look in about 2,700.
  • The W3C CSS Grid spec, one look: about 169,000 tokens versus about 6,500.
  • Three full flows end to end: 14 calls and about 56,000 tokens versus 6 calls and about 13,000.
  • Driven by a real agent across 5 live tasks, the leaner runs finished about 3.5x faster end to end (roughly 24 seconds versus 83). The win is fewer round trips and far less for the model to read each turn, not raw tool speed.

Two honest caveats

  1. If your agent has a shell, the Playwright CLI and Vercel's agent browser already sidestep most of this by writing output to disk, and they are free. This only bites when your client only speaks MCP, like Claude Desktop.
  2. It does not win everything. On a search page of 398 unique results the leaner tool paid about 30,000 tokens, roughly tied, because there genuinely is that much distinct content to carry.

The point

The leaner tool in these numbers is one I built (Reflex, reflexmcp.com, free tier no card), but the point of the post is the measurement, not the tool: if you drive a browser from an agent, look at what one page look actually costs you before you blame the model for being slow.

Curious what numbers other people are seeing, especially on pages heavier than a spec or a comment thread.

Top comments (0)