Playwright MCP VS CLI — Testing skill for Claude Code
Measuring Playwright MCP vs Playwright CLI for agentic test automation in Claude Code: 3 scenarios, real token numbers.
How to install Playwright MCP VS CLI
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open bikashdehury919/playwright-mcp-vs-cli and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Playwright MCP VS CLI does
Measuring Playwright MCP vs Playwright CLI for agentic test automation in Claude Code: 3 scenarios, real token numbers.
Alternatives in Testing
- Playwright — claude-plugins-official Browser automation, E2E testing, screenshots 29.4k ★
- Playwright Automation — git clone Browser automation skill for end-to-end testing and web interaction 2.3k ★
- RocketSimApp — RocketSim — 30+ tools for Xcode's iOS Simulator 791 ★
README
Playwright MCP vs Playwright CLI in Claude Code
**Author:** Bikash Dehury · Test Automation Specialist · [LinkedIn](https://www.linkedin.com/in/bikash-dehury-90a10577/)
Every week someone on my feed says Playwright MCP is the way to give an AI agent a browser, and the next day someone else says the new Playwright CLI makes MCP obsolete because it uses a fraction of the tokens. Most of those posts quote the same two README paragraphs.
I wanted numbers from my own machine. So I set up two identical Playwright projects, gave one of them Playwright MCP and the other Playwright CLI, and ran the same three test automation tasks in Claude Code in both. Same app, same prompts, same model. The only difference is how the agent talks to the browser.
TL;DR
| Scenario | What the agent had to do | Cost MCP | Cost CLI | Quality | Winner |
|---|---|---|---|---|---|
| S1 Self-heal | Fix 2 broken locators after a UI change | $0.30 | $0.33 | MCP: 2/2 green, fixed only the 2 broken locators. CLI: 2 | MCP (small margin) |
| S2 Exploratory | Find bugs as problem_user |
$0.99 | $0.91 | MCP 8 findings, CLI 14 (all 8 of MCP's plus 6 more) | CLI |
| S3 Suite generation | Write a 5-test page-object suite | $0.74 | $0.62 | Both 15/15 over 3 repeats, same structure | CLI |
What surprised me:
- The token gap is 8 to 22%, not the ~4x you see quoted. Claude Code loads MCP tools on demand. The Playwright MCP tool list cost 1.2k tokens in context, not the ~4.4k the full schema would take. On top of that, 95 to 98% of input tokens came from the prompt cache in every run.
- My S2 hypothesis was wrong. I expected MCP to win exploratory testing because the page is the subject. The CLI found more bugs for less money.
- Same model, same result shape. In S3 both agents produced the same 3 spec files and the same 7 page objects. The interface changed how many steps it took to get there (18 requests for MCP, 12 for CLI), not what got built.
Setup
| | | |-
Related Skills
Public Browser
Token-efficient Chrome browser automation MCP server for AI agents. Direct CDP, a11y-tree refs, multi-tab, ser
AI Agents MCP Workshop
Learn agentic coding hands-on with Claude Code: wire up MCP servers (GitHub, Playwright), build custom agents
Browse Tool
Minimal Bash-invokable browser automation CLI — a lightweight alternative to Chrome DevTools / Playwright MCP
QA Browser Jarvis
Cómo verificar Jarvis Workspace en browser real (Playwright + token) y correr todos sus tests. Usala antes de
Cdpilot
Zero-dependency browser automation CLI. 70+ commands, 10 test assertions, smart commands (click/fill by text —
Clip Report
Daily report for the clip page — what posted, top post with real numbers, today's lesson, tomorrow's one test,
Related Agents
Browser Testing
Browser automation and testing specialist. Uses playwright-cli (stateful Bash CLI) for deterministic scripted
QA Explorer
Hands-on exploratory tester that drives the RUNNING application (browser via Playwright MCP / Claude in Chrome
QA Automation Tester
Automated web tester. Use to turn a test plan or user story into Playwright scenarios and run them with record