the CLI is also Microsoft's preferred way to use it with agents:
> playwright-cli is best for coding agents (Claude Code, GitHub Copilot, etc.) that favor token-efficient, skill-based workflows. CLI commands avoid loading large tool schemas and verbose accessibility trees into the model context.
they do still recommend the MCP for long-running autonomous workflows (e.g. a UAT agent).
All this felt heavy to me. Full browser, debug protocol, DOM dump on every read. MCP vs CLI is the smaller question, what sits underneath matters more. So I built a small Rust binary that drives the system webview directly and returns state tokens and deltas instead of the DOM. Loading the HN front page costs the agent about 50 tokens. It speaks both MCP and CLI, pick whichever your agent prefers.