TL;DR
- Pick by the job. Our advice: Playwright CLI with skills for short checks, MCP for a long browser session, Claude in Chrome only for logged-in apps. Commit a Playwright test for anything you need to keep.
- Cost did not separate the setups. Seven runs of one small flow cost $0.146 to $0.235 at API prices. MCP's largest single tool result was 16.9k characters, against 7.7k or less for every other run.
- A report is not evidence. One run reported a clean console while the warning sat in a log file Claude never opened.
- Limit what the browser can reach. Playwright MCP is not a security boundary, and Claude in Chrome can reach any site you are signed into.
Which one should you use?
Use Playwright CLI with skills for short checks, MCP for a long browser session, and Claude in Chrome only for logged-in apps. That split is our advice. Microsoft's CLI README calls the CLI the best fit for coding agents and names exploratory automation and self-healing tests as MCP work. Our seven runs of one flow do not name a winner.
| Option | How it works | The catch |
|---|---|---|
| Playwright CLI with skills | Claude runs short shell commands | Details sit in files Claude may not open |
| Playwright MCP | Claude calls browser tools and reads accessibility snapshots | Full page snapshots come back inline |
| Anthropic's webapp-testing skill | Claude writes Python Playwright scripts | Python, whatever your app is written in |
| Claude in Chrome | Claude uses your real browser | It can reach any site you are signed into |
How do you set up each one?
Playwright CLI. Both the CLI and the MCP server need Node.js 18 or newer. The README's install is two commands, and its sample prompt can be your first one:
npm install -g @playwright/cli@latest
playwright-cli install --skillsTest the "add todo" flow on https://demo.playwright.dev/todomvc using playwright-cli.
Check playwright-cli --help for available commands.The skill was not required for our flow. When the Skill tool was denied, Claude still worked from playwright-cli --help.
Playwright MCP. The README's command has no double dash. The Claude Code docs explain the separator: everything after -- goes to the server untouched. claude mcp add --help on 2.1.310 shows that form, though we read the help text and did not run these exact commands. Use it when you pass a flag to the server:
# from the Playwright MCP README
claude mcp add playwright npx @playwright/mcp@latest
# with a server flag, using the double dash
claude mcp add playwright -- npx @playwright/mcp@latest --headlessMCP needed --headless on our server, which has no display, because the browser runs headed by default. Local scope is the default: the server loads only in that project and stays private to you. For several clients at once, start each extra one with --isolated or its own --user-data-dir.
Anthropic's webapp-testing skill. This skill has Claude write native Python Playwright scripts, and it bundles a helper, scripts/with_server.py, that manages server lifecycle. We did not test it.
Claude in Chrome. Start Claude Code with --chrome. It needs a direct Anthropic plan and stays off with an API key or a long-lived token. Turning it on by default raises context use, because its tools are always loaded. We did not test this one either.
How do you make Claude actually run the check?
Tell it the address, the flow and what counts as done. Our test used this CLAUDE.md block with the URL changed, so change it to fit your app:
## Checking UI changes
- Dev server: http://localhost:3000. Start it if it is not running.
- After any UI change, open the page with playwright-cli and walk through the flow you changed.
- Use the test account in .env.test. If a page asks for a real sign-in or a bot check, stop and ask me.
- Done means: you saw the expected result on the page, and you say what you clicked and what you saw.
- If the behavior should stay true, add a Playwright test under e2e/ and run it.What happened when we ran it
We gave Claude Code one identical prompt seven times against our own app. It checked a footer link, a heading, an empty state, a link to the free lessons, console messages and sideways scrolling at 390 by 844, then took a screenshot. The setup was Claude Code 2.1.310 with claude-sonnet-5-5, on public pages with a fake AI provider. This is seven runs on one small flow, not a benchmark. Dollar figures are estimates at API prices, because we run on a subscription.
| Run | Cost | Turns | Tool-result characters | Largest result | Found the warning |
|---|---|---|---|---|---|
| Playwright test as code, run 1 | $0.158 | 11 | 5.3k | 1.4k | Yes |
| Playwright test as code, run 2 | $0.235 | 20 | 19.0k | 6.0k | Yes |
| CLI without its skill | $0.165 | 18 | 13.0k | 7.7k | Yes |
| CLI with its skill, run 1 | $0.171 | 20 | 5.9k | 2.4k | Yes |
| CLI with its skill, run 2 | $0.199 | 21 | 3.6k | 0.6k | No |
| Playwright MCP, run 1 | $0.204 | 18 | 23.5k | 16.9k | Yes |
| Playwright MCP, run 2 | $0.146 | 13 | 20.3k | 16.9k | Yes |
A separate plain Playwright script gave us the truth to compare with: every full page load logs one console warning, about an unrecognized bluetooth entry in the Permissions-Policy header. Loading /learn redirects to /learn/home, which is intended.
Cost. It did not separate the approaches, and the ranges overlap. The cheapest run and the second most expensive were both MCP.
Context. MCP returned a 16.9k-character page snapshot inline, while the CLI writes snapshots to files and returns short references. Less is not automatically better: the run with the least, 3.6k, is the one that missed the warning. One run proves nothing about why.
Microsoft's reasoning. The CLI README says CLI calls avoid loading large tool schemas and verbose accessibility trees into the model's context. The tree half held in our runs. The schema half was weak: on 2.1.310 the MCP tool schemas were deferred and loaded on demand, 6.7k tokens estimated in print mode and 406 tokens in an interactive session after two tool calls.
Three failures to learn from
All seven runs exited 0, so the session's exit code told us nothing.
The false clean console. One CLI run reported a clean console. Its console command returned Total messages: 0 (Errors: 0, Warnings: 0), but the session's log file held the warning, and Claude did not open that file. We do not know why the command said 0. When a report says "nothing found", ask what it looked at.
The redirect wrongly flagged. One MCP run flagged the redirect from /learn to /learn/home as a possible problem, and wrongly said that loading /learn directly stays on /learn. Reproduce a finding before you act on it.
The test Claude loosened. In one test-as-code run, the first test failed on the warning. Claude changed the test to look at errors only, said so, and got 1 passed. It was honest, and the warning stopped being checked. When a test goes from red to green, read what changed in the test.
Is a browser check enough?
Not for anything you need to keep working. We start with Playwright tests written as code that runs in CI. We rejected MCP as our way to test, because tests must be code that runs in CI. That is a choice about what a test has to be, not a result of these runs.
A browser check lives in one conversation. A committed test runs again whenever CI runs it. Our test-as-code runs left a real test and an exit status behind: 1 passed and 2 passed. Send this after a browser check, in your own words if you like:
Write the flow you just checked as a Playwright test under e2e/.
Assert what you saw on the page, not what the code should do.
Run it, show me the exit status, then break the feature on purpose and confirm the test fails.A test that has never failed has not shown you it can. We did not run that last step ourselves, so our passes show only that the tests passed.
Point it at the real service at least once. Stripe's portal confirmed a cancellation, but our app kept saying the plan renews: Stripe sets cancel_at and leaves the flag we were reading false. Our fake Stripe tests had passed 14 of 14, and a real sandbox run caught it. That is a lesson about fakes, not a result for any tool here.
What can't these tools protect you from?
Microsoft is blunt: "Playwright MCP is not a security boundary." The README adds that --allowed-origins and --blocked-origins do not serve as one and do not affect redirects. Claude in Chrome shares your browser's login state.
Our line so far is test accounts only. We never hand over passwords, and a person handles sign-ins and bot checks. Our advice, not a test finding: point the browser at a local or staging target, and use an account that holds nothing you would mind losing.
How good is this at finding bugs?
We found one benchmark, and it comes from a vendor. In Momentic's own 60-minute test, the best Claude Code setup (Opus 5.5 with Playwright MCP) matched 59.0 of 1,396 labeled bugs, and Momentic's own agent, Mo, matched 269.3. Momentic sells Mo. The agents could not read the application source and drove a hosted browser, so it says nothing about Claude checking its own change on your code.
Where do you find more components?
On 5 November 2026, Explore listed 330 matches for "playwright". Three picks tie on score, and you should read each file before you install it:
playwright-generate-test(github/awesome-copilot, MIT)- Playwright Tester Mode (github/awesome-copilot, MIT)
playwright/.mcp.json(anthropics/claude-plugins-official, Apache-2.0)
If the terms here are new, the context lesson shows how to check what loads with /context.
What to do next
Pick one flow you changed this week. Run it through a browser tool, read what Claude says it saw, and check one claim yourself. Then have it commit that flow as a Playwright test, break the feature on purpose, and confirm the test fails.



