Every tool you give an AI agent is a tax on its context window.

Playwright MCP exposes 26+ browser automation methods. Each action returns the full accessibility tree. On a complex page, that’s thousands of DOM nodes per click. Your agent burns through context navigating a login form.

This is the new battleground for AI tooling: not capability, but efficiency. The tools that win aren’t the ones with the most features. They’re the ones that accomplish the same task with the smallest context footprint.

The Playwright MCP Problem

I’ve written about MCP context bloat before. Chrome DevTools MCP alone consumes ~17,000 tokens just for tool definitions. Load a few MCP servers and you’re starting every conversation with half your context gone.

Playwright MCP has the same problem, compounded. It was built by extending Playwright’s API surface directly. Every method became a tool. Comprehensive, but expensive.

The issues compound:

  • Tool bloat - 26+ methods means the model must reason about which to use before every action
  • Context explosion - Full accessibility trees on complex pages can hit thousands of nodes
  • Decision paralysis - More tool choices doesn’t mean better choices

When your agent spends half its context window on browser state, less remains for actual reasoning about the task.

The best agents might be the ones with the fewest tools. Every tool is a choice you’re making for the model. Sometimes the model makes better choices.
— Vercel Engineering Blog, Dec 2025

Vercel’s Answer: agent-browser

agent-browser is Vercel Labs’ take on browser automation for AI agents. The design philosophy: minimize context, maximize utility.

Architecture: Rust CLI for fast command parsing, Node.js daemon managing Playwright instances. The daemon persists between commands, so subsequent operations are instant.

I built a similar daemon architecture for my Headless plugin - persistent Node.js server managing Playwright sessions via Unix socket. agent-browser takes the same approach but adds a Rust CLI frontend and, crucially, the refs system. I’ll probably refactor to use agent-browser under the hood.

The key innovation: Snapshot + Refs. Instead of dumping the full accessibility tree, agent-browser snapshot -i returns only interactive elements with stable references:

@e1: button "Sign In"
@e2: input[type=email] "Email"
@e3: input[type=password] "Password"

Your agent sees three lines instead of three thousand nodes. Then: agent-browser click @e1. Done.

The 93% claim

Vercel claims 93% less context than Playwright MCP. The number comes from comparing full accessibility tree dumps vs their streamlined reference output. Your mileage varies by page complexity, but the directional improvement is real.

What This Looks Like in Practice

# Install
npm install -g agent-browser
agent-browser install  # Downloads Chromium

# Basic workflow
agent-browser open example.com
agent-browser snapshot -i      # Interactive elements only
agent-browser click @e2
agent-browser fill @e3 "hello@example.com"
agent-browser screenshot page.png
agent-browser close

The CLI works with any agent that can execute bash: Claude Code, Cursor, Copilot, Gemini, Codex. No MCP server configuration required.

For Claude Code specifically, there’s a skill file you can drop in:

curl -o .claude/skills/agent-browser.md \
  https://raw.githubusercontent.com/vercel-labs/agent-browser/main/skills/agent-browser/SKILL.md

The Broader Pattern

agent-browser isn’t an isolated experiment. It reflects a shift in how the industry thinks about AI tooling.

Anthropic tackled this with Tool Search in Opus 4.5: defer tool loading until needed. 72K tokens → 500 tokens. But that’s for tool definitions. agent-browser goes further by reducing what each tool returns.

Vercel’s own December 2025 blog post detailed removing 80% of tools from their internal data agent. The results:

  • 3.5x faster execution
  • 37% fewer tokens consumed
  • 100% success rate (up from 80%)
  • 42% fewer steps required

The lesson: constraints often help more than they hurt. When you stop doing the model’s thinking for it, it performs better.

What agent-browser Doesn’t Solve

Being honest about limitations:

  • Stability - Some users report element targeting via refs can be flaky on dynamic pages
  • Feature depth - The streamlined command set means fewer options than full Playwright
  • Maturity - 4.2k stars and active development, but still early days
  • No MCP option - CLI-only means no native integration for MCP-first workflows

If you need the full Playwright API surface, Playwriter takes a different approach: browser extension with a single execute tool that accepts Playwright code directly. Same “reduce context bloat” philosophy, different execution.

The Takeaway

Context efficiency is becoming a first-class design constraint for AI tooling. The question isn’t “what can this tool do?” but “what’s the context cost per capability?”

Playwright MCP answered “give agents everything Playwright can do.” agent-browser answers “give agents the minimum needed to accomplish browser tasks.”

Both work. One scales better as tasks get complex.

Try It

npm install -g agent-browser
agent-browser install
agent-browser open https://example.com
agent-browser snapshot -i

Then tell your agent to use it. The GitHub repo has integration guides for Claude Code, Cursor, and others.

The context wars are just beginning. Tools that respect the window will win.