
There are two ways to let an agent drive a browser. The first suggests itself: take a screenshot, show it to the model, it says "click the blue button on the left", you turn that into coordinates and click. It works until the button moves ten pixels, until a second blue one appears beside it, until the page renders a little slower than usual.
The second way is to give the model structure rather than a picture. Playwright can build a page's accessibility tree: the very one a screen reader uses. Every element there has a role, a name and a reference you can address it by. Clicking through such a tree is addressing, not guessing.
That is what Playwright MCP is built on. The README says it plainly: the server lets models interact with pages through structured accessibility snapshots, "bypassing the need for screenshots or visually-tuned models". No computer vision, no coordinates, no attempts to parse an image.
The project is built at Microsoft, lives in the microsoft organisation and ships under Apache-2.0. This piece covers how to connect it, what it gives the agent, and why the authors themselves tell half their readers to use a different tool.
Three Promises and One Honest Caveat
The README lists the key properties briefly: fast and lightweight, because it uses the accessibility tree rather than pixels; LLM-friendly, because no vision models are needed and everything runs on structured data; deterministic, because it avoids the ambiguity common to screenshot-based approaches.
And right after that comes a section you rarely meet in a project's own README. It is called "Playwright MCP vs Playwright CLI" and it says: if you are using a coding agent, you might be better served by the Playwright CLI with skills rather than by this package.
The argument is honest: CLI invocations are more token-efficient because they avoid loading large tool schemas and verbose accessibility trees into the model's context, letting the agent act through concise, purpose-built commands. For an agent already holding a codebase, tests and reasoning in a limited window, that is a real difference.