# browser-use vs Playwright MCP vs Stagehand: Which Open Browser Harness to Pick

> browser-use vs Playwright MCP vs Stagehand compared as of 13 November 2026: how each exposes the browser to the model, grounding, language, session handling, the security caveats the READMEs state, hosted options and a decision table.

Guide: Browser agents and agentic browsing in production — part 2
Published: 2026-11-13 · Updated: 2026-11-13 · 1592 words · ~2117 tokens (estimate)
Canonical: https://changegamer.ai/articles/browser-agent-harness-comparison
JSON: https://changegamer.ai/api/articles/browser-agent-harness-comparison.json
Access: free — editorial guide, not part of the licensed corpus
Pillar: https://changegamer.ai/articles/agentic-browsing-in-production.md

## In short

- As of 13 November 2026, Playwright MCP gives an MCP client browser tools over accessibility snapshots, browser-use 1.0 lets the model write Python against raw Chrome DevTools Protocol, and Stagehand v4 gives act, observe and extract primitives in TypeScript, Python or Go.
- Playwright MCP and browser-use carry explicit security caveats in their READMEs, the Stagehand README has none beyond a secrets-handling pattern, and none of the three presents its restrictions as a sandbox, so isolation must come from a container or VM that you provide.
- Playwright MCP is Apache-2.0 and both browser-use and Stagehand are MIT, so licence does not separate these three; language, how the model drives the browser, and session handling do.
- The Playwright MCP README says coding agents may prefer Playwright CLI plus skills because CLI calls avoid loading large tool schemas and verbose accessibility trees, which makes token cost a real argument against MCP for that case.
- ChangeGamer runs no browser harness, not even in CI, because its accessibility gate is a static lint over generated HTML, which shows that checking your own HTML may not need a browser agent at all.

---

For the choice between browser-use, Playwright MCP and Stagehand, our reading as of 13 November 2026 is this: take Playwright MCP when an MCP client should drive a browser through accessibility snapshots, browser-use 1.0 when you want the model to write Python against the browser, and Stagehand v4 when you want natural-language primitives inside your own TypeScript, Python or Go code. Every fact about the three projects below comes from their READMEs, fetched on 13 November 2026, except where we say otherwise, and all three move fast, so re-read them before you commit. The wider decision order is in the [agentic browsing pillar](/articles/agentic-browsing-in-production); the vendor model loop is in [how the computer use API loop works](/articles/computer-use-api-loop).

## How does each harness expose the browser to the model?

Each harness exposes the browser differently: Playwright MCP as fixed MCP tools, browser-use as a Python REPL, and Stagehand as SDK primitives. The design difference decides who writes the control code.

| Harness | What the model sees (README, 13 November 2026) | Who writes the control code |
|---|---|---|
| [Playwright MCP](https://github.com/microsoft/playwright-mcp) | MCP tools over structured accessibility snapshots; `browser_click` takes an element reference from the snapshot; coordinate tools are opt-in via `--caps=vision` | The MCP client's model picks from fixed tools |
| [browser-use 1.0](https://github.com/browser-use/browser-use) | One persistent Python REPL, the browser-harness helpers and raw Chrome DevTools Protocol (CDP); `mode='ultrafast'` acts on accessibility-tree ids | The model writes Python |
| [Stagehand v4](https://github.com/browserbase/stagehand) | `act`, `observe` and `extract` primitives plus Playwright-style methods such as `goto`, `click` and `locator` | You write the flow; the model fills in single steps (our reading) |

The browser-use README puts its design in one line: the model, a REPL and CDP are "the whole agent".

## How do grounding, language and runtime compare?

Grounding is accessibility-tree based in Playwright MCP, accessibility-tree ids in browser-use's ultrafast mode (the README does not describe default mode's grounding), and a trimmed accessibility tree in Stagehand's own description, while runtimes differ by language.

- **Playwright MCP.** The README says it uses "Playwright's accessibility tree, not pixel-based input". It needs Node.js 18 or newer and any MCP client; the standard config is `npx @playwright/mcp@latest`.
- **browser-use 1.0.** Python 3.11 or newer. The README names `ultrafast` as the mode that acts on accessibility-tree ids and as the default on its `bu-fast` and `bu-ultrafast` models; `mode='default'` opts out, and the README does not describe how default mode grounds actions. It takes models such as `ChatOpenAI`, `ChatAnthropic` and `ChatGoogle`, and the README warns to pin the exact version with `==`, because releases can break things.
- **Stagehand v4.** SDKs for TypeScript, Python and Go. Stagehand attributes "token efficiency" to hybrid accessibility-tree trimming, and says it runs as an extension next to the browser to cut round-trip latency. Local use needs Chrome. We did not measure either claim.

## How does each harness handle sessions and profiles?

Each harness defaults differently on persistence: Playwright MCP keeps a persistent per-workspace profile, browser-use defaults to a Browser Use Cloud browser (with a fresh temporary local profile via `Browser('chromium')`), and Stagehand launches with a `userDataDir` you choose. Persistence decides how much of your logged-in state the agent can touch.

| Mode | Playwright MCP | browser-use 1.0 | Stagehand v4 |
|---|---|---|---|
| Persistent | Default: a per-workspace profile, usable by only one browser instance at a time | `Browser('chromium', user_data_dir='~/bu-profile')` keeps its own logins between runs; `profile='Work'` uses a temporary copy | `localBrowser.launch({ userDataDir })` |
| Isolated | `--isolated` keeps the profile in memory; `--storage-state` loads cookies and local storage into it | `Browser('chromium')`: a fresh temporary profile, deleted afterwards | Not described in the README text we read |
| Attach to your Chrome | `--extension` connects to a running Edge or Chrome through the Playwright Extension | `Browser('chrome')`: "the Chrome you have open, with your logins" | Not described in the README text we read |

The row to worry about is the last one. A harness attached to your real browser acts with your accounts, which is the blast-radius problem the pillar covers under logged-in sessions. For parallel Playwright MCP clients, the README says to use `--isolated` or distinct `--user-data-dir` values.

## What do the projects say about their own security limits?

The Playwright MCP and browser-use READMEs are blunt about their limits, and neither offers a sandbox; the Stagehand README has no security section, only the secrets pattern below. These are the projects' words, not ours.

- **Playwright MCP.** `browser_run_code_unsafe` "executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent". The `--allowed-origins` and `--blocked-origins` flags, the README says, do not serve as a security boundary and do not affect redirects. The `secrets` option and `--redact-url-params` are "a convenience and not a security feature".
- **browser-use.** `allowed_domains` and `prohibited_domains` are "a guard for an aligned model, not a sandbox"; requests an allowed page makes to other hosts are not filtered, and the README says to run untrusted tasks in a container or VM. Its `sensitive_data` redaction is also "not a sandbox", since model-written Python can read the value. Local `Browser('chromium')` and profile modes open a debugging port with no authentication on 127.0.0.1, so on a shared machine other local users can attach ([browser-use MIGRATING.md](https://github.com/browser-use/browser-use/blob/main/MIGRATING.md)).
- **Stagehand.** The README says `observe` "returns real selectors, so credentials never reach the model": its example fills passwords through `page.locator(selector).fill(env)` in your own code. That is a design pattern for keeping secrets out of the prompt, not a sandbox claim.

The common lesson is to treat every restriction flag as hygiene and put the real boundary underneath. Sandbox choice is covered in [how to choose a sandbox](/articles/choosing-a-sandbox-for-ai-agent-code-execution).

## What hosted options exist for each harness?

Browserbase and Browser Use Cloud host browsers; Playwright MCP you host yourself.

- **Browserbase hosted MCP.** The Stagehand README lists a hosted server at `https://mcp.browserbase.com/mcp` that exposes `navigate`, `act`, `observe` and `extract` to any MCP client, and it needs a Browserbase API key. The local alternative is the `browse` CLI plus a skill, which the README says needs no LLM key or Browserbase account for local use.
- **Browser Use Cloud.** The browser-use README states "$0.02 per browser-hour cloud browser with stealth, CAPTCHA solving and residential proxies". That is a vendor-stated price as of 13 November 2026, which we did not verify on a pricing page. The library itself is MIT and free, while model inference and hosted browsers are billed separately.
- **Playwright MCP.** It has a standalone HTTP mode (`--port 8931`) and a Docker image, so you host it yourself.

## Which harness for which situation?

The table is our reading of the READMEs, not a benchmark.

| Situation | Our pick | Why (our reading) |
|---|---|---|
| An MCP client such as an IDE agent needs to drive a browser | Playwright MCP | It is an MCP server over accessibility snapshots, with Node and any client |
| You want the model to improvise with code on varied sites, in Python | browser-use 1.0 | The model writes Python in a REPL; plan for a container because its guards are not a sandbox |
| You own the flow and want natural-language steps that return selectors | Stagehand v4 | `act`, `observe` and `extract` sit inside your own TypeScript, Python or Go code |
| Checking HTML you generate yourself | No browser agent | A static lint can decide it, as below |
| Credentials must stay out of the prompt | Stagehand v4 pattern | `observe` returns selectors, and your code fills the secret |
| Parallel runs on one machine | Playwright MCP with `--isolated` | A persistent profile allows one browser instance at a time |

## Should a coding agent use Playwright MCP at all?

Our reading: maybe not. The Playwright MCP README itself says a coding agent might benefit from Playwright CLI plus skills instead, "because CLI invocations are more token-efficient". It cites avoiding large tool schemas and verbose accessibility trees in the model context. The README says MCP remains relevant for specialized loops that benefit from persistent state and rich introspection, such as exploratory automation, self-healing tests or long-running autonomous workflows where continuous browser context outweighs token cost.

## Where does this differ from the corpus reference?

The reference at [computer use and browser automation](/resources/computer-use-browser-automation), updated 22 July 2026, differs from the READMEs we read on 13 November 2026. It describes browser-use as screenshots plus accessibility information with a v0.13+ beta on a Rust core, and Stagehand as v3. The browser-use README now describes 1.0, a REPL and raw CDP, and no longer mentions a Rust core. The Stagehand README documents v4 with TypeScript, Python and Go SDKs. Treat the READMEs as newer, and expect the reference to be refreshed separately.

## Do you need a browser agent at all?

Often not, and ChangeGamer is a small example: it runs no browser harness anywhere, not even in CI. Its accessibility gate, `scripts/verify-a11y.mjs`, describes itself as a "Static accessibility lint over dist HTML ... No dependencies, no browser". That fits because the pages are generated HTML that a regular expression can check deterministically. This is a design choice, not a harness test. The lesson is narrow: if the job is checking HTML you generate yourself, start without a browser agent.

## One pointer beyond the three

Skyvern is the open option outside this comparison: its README describes automating browser workflows with LLMs and computer vision, and its core is licensed AGPL-3.0 (anti-bot measures excepted), which matters if you embed it in a product.


## Frequently asked questions

### Is browser-use better than Playwright MCP?

Choosing between browser-use and Playwright MCP has no general winner, because they hand the model different things: as of 13 November 2026 browser-use 1.0 lets the model write Python against raw CDP in a persistent REPL, while Playwright MCP gives an MCP client fixed browser tools over accessibility snapshots. Pick by who writes the control code, not by a benchmark, because we know of no published head-to-head.

### Does Playwright MCP need a vision model?

Playwright MCP does not need a vision model: its README says it uses the accessibility tree rather than pixel input and needs no vision model. Coordinate-based mouse tools exist, but they are opt-in through the --caps=vision flag, so a default install works purely on structured snapshots.

### Is Stagehand the same as Browserbase?

Stagehand and Browserbase are different things: Stagehand is an MIT-licensed SDK published by Browserbase Inc., and it runs on a local Chrome as well as on Browserbase. Browserbase is the hosted browser service, which adds a model gateway and server-side caching when Stagehand runs there.

### Can browser-use, Playwright MCP or Stagehand safely run untrusted tasks?

None of the three should run untrusted tasks on its own restrictions. browser-use calls its domain limits a guard for an aligned model, not a sandbox, and Playwright MCP says its origin lists are not a security boundary. Run untrusted tasks in a container or VM, as the browser-use README advises.


---

## The rest of this guide

- [Agentic Browsing in Production: Building, Securing and Preparing for Browser Agents](https://changegamer.ai/articles/agentic-browsing-in-production.md): An operator guide to agentic browsing: the computer-use loop, accessibility-tree vs screenshot harnesses, cost and latency, page-borne prompt injection, logged-in-session risk, Web Bot Auth, WebMCP for site owners, evaluation and a launch sequence.
- [Computer Use API: How the Screenshot-Action Loop Works Across Anthropic, OpenAI and Google](https://changegamer.ai/articles/computer-use-api-loop.md): How the vendor computer use API loop works: screenshot in, structured action out, harness executes, new screenshot back. Tool names, coordinate systems, step caps, confirmation gates and what to log, for Anthropic, OpenAI and Google.
- [Browser Agent Cost per Task: A Formula, the Levers and the Latency Caveat](https://changegamer.ai/articles/browser-agent-cost-and-latency.md): How to compute browser agent cost per task as of 14 November 2026: a formula for screenshots and toolset overhead, an illustrative worked example, Anthropic image-token sizes, the cost levers and why the vendor pages read on 14 November 2026 give no latency figure.
- [Prompt Injection in AI Browser Agents: Five Vectors and the Controls Vendors Document](https://changegamer.ai/articles/prompt-injection-against-browser-agents.md): ChangeGamer's grouping of the browser-specific prompt injection vectors as of 15 November 2026 (hidden page text, user-generated content, CometJacking URLs, screenshot text, seeded inbox emails) and which vendor-documented control addresses each, with a vector-to-control table.
- [How to Isolate a Browser Agent From a Logged-In Session](https://changegamer.ai/articles/logged-in-sessions-and-blast-radius.md): How to choose where a browser agent's session state comes from as of 16 November 2026 (your real profile, a persistent agent profile, a fresh profile, an injected Playwright storageState file, or a scoped API credential) and how to bound what it can reach.
- [Headless Browser for AI Agents: Local, Remote or Managed?](https://changegamer.ai/articles/remote-browsers-and-anti-bot.md): How to choose between a local headless browser and a managed remote browser (Browserbase, Bright Data, Cloudflare Browser Run) or self-hosted Crawlee as of 17 November 2026, how agents connect over CDP, and where anti-bot handling stops.
- [How to Sign Browser Agent Requests With Web Bot Auth](https://changegamer.ai/articles/web-bot-auth-for-browser-agents.md): How a team running a browser agent signs its outbound requests with Web Bot Auth as of 18 November 2026: Ed25519 key, signed key directory, the three headers, the Signature-Agent divergence, Cloudflare Verified status and key rotation.
- [How to Add WebMCP Tools to Your Website](https://changegamer.ai/articles/webmcp-for-site-owners.md): How a site owner adds WebMCP tools as of 19 November 2026: origin trial tokens, the testing flag, document.modelContext.registerTool, annotations, the Permissions Policy tools feature, security risks, feature detection and which flows to expose.
- [OSWorld vs WebArena: Which Benchmark Tells You Anything About Your Browser Agent?](https://changegamer.ai/articles/evaluating-browser-agents.md): OSWorld vs WebArena as read on 20 November 2026: what OSWorld, OSWorld-Verified, OSWorld 2.0, WebArena, VisualWebArena and Online-Mind2Web each measure, how they are scored, what running them involves and what none of them covers.

## Reference resources

- https://changegamer.ai/resources/computer-use-browser-automation.md

All guides: https://changegamer.ai/api/articles.json · Reference corpus: https://changegamer.ai/llms.txt
Licensing: https://changegamer.ai/api/pricing.json (offer catalog) · https://changegamer.ai/api/payment.json (payment methods, HTTP 402 flow) · access guide: https://changegamer.ai/resources/access-and-pricing.md
