Playwright MCP review: Forms, files and session isolation
Testing Playwright MCP 0.0.84 in real Chromium: form submissions, stale references, file bytes, isolated sessions, persistent storage and a response-body timeout.
AgentIndex · Published 2026-11-07 · Updated 2026-11-07
Playwright MCP gives an MCP client tools for operating a browser. We tested whether its snapshots and actions were enough to complete an inspectable workflow, recover from a changed page and keep artificial account state separate.
The tested release submitted the expected form data, transferred identical file bytes and separated browser contexts. It also exposed limits that matter when building an automation loop: a stale reference needed a new snapshot, a failed multi-field fill retained an earlier change, and response-body retrieval timed out in our mixed recovery workflow while independent controls succeeded.
What actually ran
On November 7, 2026, we installed npm @playwright/[email protected], whose publication metadata identifies commit be26c080edfae7c761db1e757c4aff9f6453b4d7. Its pinned Playwright dependency was 1.65.0-alpha-2026-10-30. We downloaded its matching Chromium 157.0.8103.15, revision 1252, and selected that executable explicitly. The environment was macOS 26.6.2 on Apple M1 Pro, Node.js 26.3.0 ARM64 and MCP SDK 1.27.1. Published CLI entry point
The server ran over actual stdio MCP. A loopback HTTP application supplied a form, upload endpoint, CSV download, replaceable controls and storage markers. The main run made 73 tool calls and checked 15 conditions; listing 25 available tools does not mean all 25 were exercised. The reproduction files and raw JSON include the page, dependency lock, source fingerprints, screenshot and additional network probes.
Tool choices were scripted. No model selected actions, and no personal browser profile or real account was used. This measures selected server/browser behavior, not autonomous task success, a token advantage, login reliability or performance against another automation tool.
| Exercise | Observed result |
|---|---|
| Text, Chinese notes, dropdown and checkbox | Server received exactly the expected four form fields |
| Replaced DOM node | Old reference failed; a fresh snapshot enabled the replacement button |
| Two identically named buttons | Ambiguous selector failed; the second snapshot reference selected the intended button |
| Failure in a later form field | The earlier field remained changed |
| File upload and CSV download | SHA-256 matched the input and expected output bytes |
| Same versus named contexts | Same context shared state; a separate named context did not |
| Browser close in isolated mode | Local storage and cookies were cleared |
| Dedicated profile across process restart | Local storage and a persistent cookie survived; the session cookie expired |
Snapshots identify controls, with a visual boundary
In this version, navigation returned a link to a saved YAML snapshot. An explicit browser_snapshot returned the tree inline. That distinction matters for clients: either retrieve the linked artifact or request a snapshot before selecting references. Our runner retained both forms of evidence.
The tree exposed the form's labels, dropdown and checkbox. We filled four fields, submitted through the actual page and compared the HTTP JSON body with the expected object. The Chinese notes survived unchanged. A delayed update also appeared through browser_wait_for.
Two negative cases tested recovery. Replacing a row removed its old referenced button; clicking that reference returned an error. Refreshing the snapshot and selecting the replacement succeeded. A selector matching two identically named buttons produced a strictness error; selecting the second reference worked. These results support explicit inspection and retry logic, without establishing that a model will choose the right recovery.
Our screenshot visibly contained text painted into a canvas, canvas-only:42, but the accessibility snapshot did not contain that text. The tested text-oriented workflow therefore did not cover arbitrary canvas content or visual layout interpretation. We captured the screenshot, but did not test vision-based actions.
A form operation can fail after changing the page
One browser_fill_form request successfully changed the first input, then failed on a nonexistent later field. Reading the DOM confirmed that the first change remained. The operation did not roll back the earlier fill.
For a caller, a tool error is insufficient evidence that nothing happened. Inspect the current fields before retrying, and check the application's resulting state after submission. In our fixture, the input later read “Partial change” while the last submitted receipt still showed “Fixture User”: editing a field and submitting it were separate observable events.
File exchange had stronger independent evidence than a success message. A real file chooser supplied a 49-byte UTF-8 file; the upload endpoint received the matching SHA-256. Clicking the download link saved a CSV whose hash matched the expected bytes. We tested one small file per direction, without establishing large-file, MIME-type or multi-file coverage.
State sharing depends on the context and cookie type
Tabs in the default context shared the artificial marker. A tab in a separate named context started without it; another tab in that same named context shared its own marker. Selecting the original tab recovered the original context's state.
In isolated mode, browser_close followed by navigation cleared the tested cookies and local storage. A dedicated temporary persistent profile behaved differently across two MCP processes: local storage and a cookie with an explicit lifetime survived a normal close, while the session cookie did not. Persistent profiles therefore do not imply that every login survives a restart. No actual authentication provider was tested. Profile options
We also exercised cancelling and accepting a confirmation dialog. Cancellation preserved the marker; acceptance cleared it. This was browser dialog handling on our artificial page, not a host application's approval policy.
Network inspection had a reproducible limit in the mixed flow
The mixed workflow exposed our deliberate console error, HTTP 503 status and JSON response headers. Requesting that response's body then exceeded a 20-second MCP client deadline. A repeat with the same workflow reproduced the timeout; restarting the MCP connection allowed the remaining checks to complete.
We checked this against a smaller application using both HTTP 200 and 503, with the page either consuming the fetch body or leaving it unread. Direct Playwright and MCP response-body retrieval succeeded in all four independent conditions. That rules out a blanket claim that 503 bodies or unread fetch bodies are unsupported. It does not isolate the mixed-flow timeout's cause. The extra runner and its raw client error remain available so the limitation is reviewable rather than silently discarded.
For setup, the published package declares Node.js 18 or newer and needs an available browser; installing the npm package alone is not our complete tested setup. The server also exposed browser_run_code_unsafe in its tool list, which we did not invoke, and default file:// navigation was rejected. Neither observation establishes a sandbox guarantee. Pinned configuration and security notes
Choose it when a browser workflow benefits from named controls, stateful tabs and inspectable intermediate results. Budget for fresh snapshots, state checks after errors and browser/profile setup. Firefox, WebKit, Edge, extensions, real login flows, remote transport and model-selected recovery remain untested here. For a different question—whether measured page performance breaches a budget—see our WebPerf Snippets measurements. For retrieving evidence from previous coding sessions, see the ctx history-search review.
For reducing the context generated by tool workflows, see our Headroom compression and retrieval tests, which distinguish compact input, lossy logs and lossless fallback.