Playwright CLI vs MCP vs Chrome DevTools MCP vs Browser Use: How to Choose (2026)

A decision guide to Playwright MCP, the Playwright CLI, Chrome DevTools MCP, Browser Use and the archived Puppeteer MCP server, with measured numbers and a table that maps your setup to the right tool.

November 6, 2026ComparisonMeasured on @playwright/mcp 0.0.84 and @playwright/cli 0.1.2313 min read

If you give an AI agent a browser in 2026, you are choosing between at least five tools: Playwright MCP, the Playwright CLI, Chrome DevTools MCP, Browser Use and the old Puppeteer MCP server. Most comparisons stop at a feature checklist. That’s the wrong question. The right one is where does your agent run, and what does it need to see? This guide answers that, with numbers I measured myself and a decision table at the end.

The short answer

If your agent has a shell (Claude Code, Codex, Cursor), start with the Playwright CLI and keep Playwright MCP as the fallback. If your client has no shell, such as Claude Desktop, use Playwright MCP. Add Chrome DevTools MCP when the job is performance or Chrome-specific debugging. Use Browser Use when you’re building an unattended agent product, not assisting a developer. Don’t start a new project on the Puppeteer MCP server.

What I measured
I installed @playwright/mcp 0.0.84 and @playwright/cli 0.1.23 on Windows 11, ran the same TodoMVC flow through both, listed the MCP tool schema, and measured the CLI’s skill files. Numbers labeled “measured” are from those runs. Numbers from other people’s benchmarks are attributed and flagged as such. I did not run Browser Use or Chrome DevTools MCP, so their sections rely on their official documentation.

The five options in one table

Playwright MCPPlaywright CLIChrome DevTools MCPBrowser UsePuppeteer MCP
What it isMCP server exposing Playwright as toolsCommand-line tool plus skill files for coding agentsMCP server (and CLI) for inspecting a live ChromePython agent library with its own LLM loop, plus a hosted cloudReference MCP server wrapping Puppeteer
Who decides the next clickYour agentYour agentYour agentBrowser Use’s agentYour agent
BrowsersChrome, Firefox, WebKit, EdgeSame engine as MCPChrome and Chrome for Testing onlyLocal or cloud browsersChrome, via Puppeteer
Needs a shell?NoYesNoYou run the PythonNo
Best atExploration, testing, network mocking, no-shell clientsToken-conscious coding agents, CI, scriptingPerformance traces, console and network debuggingUnattended agents, stealth browsers, scaleNothing it still leads at
StatusActiveActiveActiveActiveArchived May 29, 2025

Playwright CLI vs Playwright MCP: the token story has changed

The loudest claim in this space is that the CLI uses roughly a quarter of the tokens MCP does. You’ll see figures like 114,000 tokens for MCP against about 26,000 to 27,000 for the CLI on the same multi-step task. The Playwright project itself leans on the same idea. Its README recommends the CLI with skills for coding agents because CLI commands avoid loading large tool schemas and verbose accessibility trees into context.

That was true of older MCP versions, which returned the full page snapshot inline on every call. It is much less true now.

What I saw when I ran both

I performed the same step in both tools: open the TodoMVC demo, then type into the input box. Here is the MCP response (trimmed) next to the CLI’s:

# Playwright MCP 0.0.84: browser_type
### Ran Playwright code
await page.getByRole('textbox', { name: 'What needs to be done?' }).fill('Buy milk');
await page.getByRole('textbox', { name: 'What needs to be done?' }).press('Enter');
### Page
- Page URL: https://demo.playwright.dev/todomvc/#/
- Page Title: React • TodoMVC
- Console: 1 errors, 0 warnings
### Snapshot
- [Snapshot](.playwright-mcppage-2026-11-06T18-02-01-739Z.yml)

# Playwright CLI 0.1.23: fill e8 "Buy milk"
### Ran Playwright code
await page.getByRole('textbox', { name: 'What needs to be done?' }).fill('Buy milk');
...
- Snapshot: [Snapshot](.playwright-clipage-2026-11-06T18-08-14-645Z.yml)

They are nearly the same thing. Both return the Playwright code that ran, the URL, the title, the console count and a file path to the snapshot, not the snapshot itself. The CLI’s help text even describes itself as “run playwright mcp commands from terminal”. They share an engine.

A third-party re-run points the same way. A DEV Community author benchmarked @playwright/[email protected] against @playwright/[email protected] on a seven-step login flow and reported about 3,580 characters returned by MCP against about 3,620 by the CLI, within roughly 1% of each other. That is one author’s result with no published tokenizer or run count, so treat it as a signal and not a verdict. But it matches what I saw.

So where does the cost actually live?

In the fixed overhead the agent carries before it does anything:

OverheadPlaywright MCPPlaywright CLI
What loads up frontAll tool definitions, every sessionA SKILL.md file, read when the agent needs it
Measured size25 tools, about 21,060 characters of JSON schema (default set)15,702 characters in SKILL.md
Extra materialNone, but each --caps flag adds definitions (storage alone takes it to 42 tools)10 reference files, 53,595 characters in total, read only when relevant

The numbers are in the same ballpark. The structural difference is when you pay. MCP tool definitions are in context from the first message whether you browse or not. The CLI skill is pulled in when the task calls for it, and its reference files only when a specific topic like request mocking or tracing comes up. For a long coding session where the browser is used twice, that matters. For a session that is mostly browsing, it largely washes out.

The twist: fewer tokens did not mean lower cost
Ranger ran both tools with Claude Sonnet 4.6 on two roughly ten-step scenarios on the Mozilla homepage (they did not state how many runs). The CLI ended with a smaller context, about 22k to 24k tokens against about 50k for MCP. But the CLI agent needed about 40 to 50 tool calls where MCP needed 14 to 17, took roughly 240 to 304 seconds against 92 to 123, and cost about $0.60 per run against about $0.40. Less context per step can still mean more steps. Measure your own task before you pick a side.

The differences that are real

  • Shell access. The CLI needs one. Claude Desktop and other clients without a shell can only use MCP.
  • State. MCP holds a persistent browser inside one long-running server, which suits exploratory loops. The CLI uses named sessions (-s=name); the profile is kept in memory by default and saved to disk with --persistent.
  • Scriptability. CLI commands compose in shell scripts and CI. MCP tools exist only inside an agent conversation.
  • Visibility. The CLI has playwright-cli show, a dashboard for watching and controlling running sessions.
  • Tool surface. The CLI exposes it as commands (open, goto, snapshot, click, fill, find, eval and more) and takes either snapshot refs like e15 or Playwright locators.
# Install the CLI and its skill for your agent
npm install -g @playwright/cli@latest
playwright-cli install --skills

# Then your agent (or you) can run
playwright-cli open https://demo.playwright.dev/todomvc --headed
playwright-cli snapshot
playwright-cli fill e8 "Buy milk"

The Playwright team’s own guidance sums it up: use the CLI for coding agents that can run commands, and MCP for specialized loops that need persistent state, rich page introspection and iterative reasoning, such as exploratory automation, self-healing tests and long-running workflows. One practical reading of that: default to the CLI in a shell-enabled agent, keep MCP configured for the day you need to watch the agent work interactively.

Chrome DevTools MCP vs Playwright MCP

These two are less rivals than neighbors. Chrome DevTools MCP lets an agent control and inspect a live Chrome. Its pitch is depth inside the browser: it records performance traces and extracts insights, analyzes network requests, reads console messages with source-mapped stack traces, takes screenshots and automates actions using Puppeteer under the hood. Performance tools can also fetch Chrome UX Report field data.

Playwright MCP is broader in a different direction: cross-browser coverage, test-oriented tools (locator generation and verification assertions), network mocking, storage control and an extension mode for real tabs.

Pick Chrome DevTools MCP when
  • The question is “why is this page slow?”
  • You need source-mapped console stack traces
  • You only care about Chrome
  • You want trace-based performance insights, not pass/fail flows
Pick Playwright MCP when
  • You need Firefox or WebKit as well as Chrome
  • You’re producing or healing tests
  • You want to mock routes or force offline states
  • You want the agent to walk a user flow end to end

Three details worth knowing before you install the DevTools server. It officially supports Google Chrome and Chrome for Testing only. Usage-statistics collection is on by default, and you can opt out with --no-usage-statistics. And its performance tools may send trace URLs to Google’s CrUX API unless you pass --no-performance-crux. There is also a --slim flag that exposes a reduced tool set for basic tasks, which helps if the tool-schema overhead is your concern.

You can run both: Playwright MCP to drive the flow, DevTools MCP when a flow reveals something slow. They are separate servers and don’t conflict.

# Chrome DevTools MCP
{ "mcpServers": { "chrome-devtools": { "command": "npx", "args": ["-y", "chrome-devtools-mcp@latest"] } } }

Browser Use vs Playwright MCP: different layers, not rivals

This is the comparison people get most confused by, because the two don’t sit at the same level.

  • Playwright MCP is a tool. Your agent (Claude Code, Cursor) is the brain and calls it.
  • Browser Use is an agent. It is an open-source Python library with its own loop: you give it a task and a model, and it decides the clicks. Its docs describe three paths: the Python library, a CLI that gives an existing agent such as Claude Code or Codex browser access, and a hosted cloud API.

Browser Use Cloud adds things Playwright MCP deliberately doesn’t try to be: hosted stealth browsers, proxies, CAPTCHA solving and a live-view URL, with browsers priced from $0.02 per browser-hour according to the project’s README. That is a different product category, aimed at agents that run unattended against sites that resist automation.

You are…ChooseBecause
A developer with a coding agent, checking your own appPlaywright MCP or CLIYour agent is already in the loop. You want evidence, not autonomy
Building a product feature where users trigger web tasksBrowser UseYou need an agent loop, model routing and scalable hosted browsers
Automating a third-party site with bot protectionBrowser Use Cloud, if the site’s terms allow itStealth and proxies are the point. Check the site’s terms and local law first

Because Browser Use is Python, it also fits teams already building on LangChain or similar stacks. If you’d rather keep your own agent and just borrow Playwright’s browser tools inside LangChain or LangGraph, the pillar guide shows the adapter shape.

Playwright vs Puppeteer MCP: it’s mostly settled

The reference Puppeteer MCP server (@modelcontextprotocol/server-puppeteer) offers seven tools: navigate, screenshot, click, hover, fill, select and evaluate. Its repository was archived and made read-only on May 29, 2025. That alone is a reason not to start a new project on it. Set that list against Playwright MCP’s default 25: the Puppeteer server has no snapshot tool, no network inspection, and no tab, dialog or file-upload tools.

Puppeteer itself isn’t dead. Chrome DevTools MCP is built on it. The question is only about the abandoned reference server. If you use “claude code puppeteer” today, the swap is short:

claude mcp remove puppeteer
claude mcp add playwright npx @playwright/mcp@latest

Then replace prompts that said “take a screenshot and describe it” with “snapshot the page and report what you find”. The text snapshot is cheaper and more precise than a screenshot for most questions.

Making Playwright MCP faster and cheaper without switching

A search for “faster alternatives to Playwright MCP” usually has a simpler answer than a new tool. Before you migrate, try the settings that cut the cost of the one you have:

  1. Keep the default tool set. Each capability you enable adds definitions. Measured: 25 tools by default, 30 with testing, 42 with storage, 38 with devtools.
  2. Omit images for text-only models. --image-responses=omit stops screenshot bytes flowing back when your model can’t use them.
  3. Search, don’t re-read. Prompt the agent to use browser_find on large pages instead of re-requesting the whole snapshot. In the third-party re-run mentioned above, a scoped find pulled about 450 characters from a page whose full tree ran to around 97,000.
  4. Go headless and isolated. --headless --isolated avoids window rendering and profile locking.
  5. Reduce console noise. --console-level=error keeps the agent from reading debug chatter.
  6. Split long jobs. One flow per session. Page content accumulates in context.

If you’ve done all that and context is still the bottleneck, that is the signal to try the CLI.

The decision table

If this describes youUseWhy
Claude Desktop or any client with no shellPlaywright MCPThe CLI can’t run without a shell
Claude Code, Codex or Cursor with a long coding sessionPlaywright CLI (+ MCP as backup)Pay for browser instructions only when you browse
You need the agent to explore an unknown app and keep statePlaywright MCPPersistent browser, rich introspection, self-healing loops
You’re writing or repairing end-to-end testsPlaywright MCP with --caps=testing, or Test AgentsLocator generation and verification tools; see the AI test-writing guide
Page is slow and you don’t know whyChrome DevTools MCPPerformance traces and CrUX data
You need Firefox or WebKit coveragePlaywright (either form)DevTools MCP is Chrome only
Unattended agent inside your productBrowser UseOwn agent loop, hosted browsers
Running a fixed regression suite in CIPlain Playwright testsNo model should re-decide each click in CI
Currently on the Puppeteer MCP serverMigrate to Playwright MCPThe repository is archived and read-only
Go deeper

Set up Playwright MCP properly, then use it to write tests

The pillar guide covers setup in every major client, the flags worth knowing, seven workflows with prompts, and the security checklist. The test-writing guide shows the full planner, generator and healer loop on a real app.

Read the Playwright MCP guide → Next: How to write Playwright tests with AI

Questions people ask when choosing

Is the Playwright CLI really more token-efficient than MCP?

It used to be by a wide margin, according to older benchmarks. A recent re-run on newer versions found them within about 1% on per-call output, because current Playwright MCP also writes snapshots to a file and returns the path. The difference now is mostly when instructions load: MCP tool definitions sit in context from the start, while the CLI’s skill is read on demand. I measured about 21,060 characters of MCP tool schema against 15,702 characters for the CLI’s main skill file.

Can I run Playwright MCP and Chrome DevTools MCP together?

Yes. They are separate servers with different strengths. Playwright drives flows across browsers; DevTools digs into performance and debugging in Chrome. The cost is more tool definitions in context, so enable both only when you need both.

Which is better for Claude Code: Playwright MCP or the CLI?

Claude Code has a shell, so the CLI is the Playwright team’s recommended default for coding agents. Keep MCP available for exploratory sessions where you want a persistent browser and richer page inspection.

Is Browser Use a replacement for Playwright MCP?

No. Browser Use is an agent library with its own decision loop and an optional hosted cloud. Playwright MCP is a set of tools your own agent calls. They solve different problems and can coexist.

Does Chrome DevTools MCP work in Firefox or Safari?

No. It officially supports Google Chrome and Chrome for Testing only. For Firefox and WebKit, use Playwright.

Should I still use the Puppeteer MCP server?

Not for new work. Its repository was archived on May 29, 2025, and it exposes only seven tools. Playwright MCP is the maintained alternative.

Sources

2 comments

Comments are closed.