Blog
Playwright MCP vs Unbrowse MCP: Which Should Your Agent Use?
A detailed comparison of Playwright MCP and Unbrowse MCP for AI agent web browsing. Covers architecture, speed, token cost, authentication, and when to use each.
Playwright MCP vs Unbrowse MCP: Which Should Your Agent Use?
Playwright MCP and Unbrowse MCP represent two fundamentally different philosophies for giving AI agents web access. Playwright wraps browser automation in MCP. Unbrowse skips the browser entirely.
This comparison breaks down the architecture, performance, cost, and ideal use cases for each, based on production deployments and published benchmarks.
The Core Difference
Playwright MCP gives your agent a browser. Every web task launches a browser instance, renders the page, reads the DOM, and lets the agent interact through accessibility snapshots or screenshots.
Unbrowse MCP gives your agent the APIs behind the browser. It discovers the internal API endpoints (shadow APIs) that every website uses under the hood, then calls them directly. No browser needed for repeat visits.
This is not a marginal optimization. It is a category difference: browser automation versus API-native resolution.
Architecture Comparison
Playwright MCP
Playwright MCP is Microsoft's official MCP server. The architecture follows a standard browser automation model:
- Agent sends an MCP tool call (e.g.,
browser_navigate) - Playwright launches or reuses a browser instance
- The browser renders the full page (HTML, CSS, JavaScript)
- Playwright captures an accessibility snapshot or screenshot
- The snapshot is returned to the agent as text or image
- The agent reasons about the snapshot and sends the next action
- Repeat for every interaction
This loop runs for every page load, every click, every form submission. A typical 10-step workflow means 10 full render cycles.
In early 2026, Microsoft introduced @playwright/cli as a lower-token alternative. A typical browser automation task consumes about 114,000 tokens through MCP, while the same task through CLI uses about 27,000 tokens. The CLI approach sends shell commands instead of MCP protocol messages, reducing overhead.
The Playwright MCP Bridge Chrome extension (v0.0.67) connects to existing browser sessions, letting agents use your logged-in Chrome profile without re-implementing authentication.
Unbrowse MCP
Unbrowse uses a layered resolution architecture:
- Agent sends a
resolvecall with an intent and URL - Unbrowse checks seven cache layers (in-memory, route cache, domain skill cache, local snapshots, marketplace, lightweight browser attempt, full capture)
- If a cached route exists, it calls the internal API directly and returns structured data in under 200 milliseconds
- If no cache exists, it launches Kuri (a 464 KB Zig-native CDP broker), navigates the site, captures all network traffic, reverse-engineers the API endpoints, indexes them, and returns the data
- The discovered endpoints are cached locally and published to a shared marketplace
- Next time any agent asks for the same site, it resolves from cache
The critical insight is that step 4 happens once per site. After that, the browser is never needed again for the same domain. This is the architectural difference that drives the performance gap.
Performance: The Numbers
The benchmark data comes from the published paper Internal APIs Are All You Need (Tham, Garcia & Hahn, 2026), tested across 94 live domains.
Speed
| Metric | Playwright MCP | Unbrowse MCP (cached) |
|---|---|---|
| Mean resolve time | 8.2s | 2.3s (3.6x faster) |
| Median resolve time | 6.8s | 1.3s (5.4x faster) |
| Best case | ~3s | <100ms (18 domains) |
| Repeat visit | Same as first | <200ms |
The real gap shows on repeat visits. Playwright MCP takes the same time every visit because it always renders the page. Unbrowse MCP returns cached API data in under 200ms because no browser is involved.
Token Consumption
| Scenario | Playwright MCP | Unbrowse MCP |
|---|---|---|
| Single page navigation | 27K-114K tokens | ~4K tokens |
| 10-step workflow | 270K-1.14M tokens | ~40K tokens |
| Google Flights full loop | ~50K tokens | ~4,100 tokens |
Playwright MCP sends full accessibility snapshots or DOM representations on every interaction. Unbrowse returns only the structured API response data, which is inherently smaller.
The Google Flights example is illustrative: a full agent loop (goto, snapshot, click, snapshot, evaluate) costs about 4,100 tokens with Unbrowse versus roughly 50,000 tokens with Playwright MCP for comparable functionality.
Cost Per Action
Using Claude Sonnet at $3 per million input tokens:
| Approach | Tokens per action | Cost per action |
|---|---|---|
| Playwright MCP (full) | ~114K | ~$0.34 |
| Playwright CLI | ~27K | ~$0.08 |
| Unbrowse (cached) | ~4K | ~$0.012 |
| Unbrowse (first visit) | ~15K | ~$0.045 |
For agents making hundreds of web requests per day, the difference between $0.34 and $0.012 per action compounds quickly.
Authentication
Playwright MCP
Playwright MCP handles authentication through the Bridge Chrome extension, which connects to your existing browser session with all cookies and login state intact. This works well for local development. For headless deployments, you need to implement login flows programmatically or manage browser profiles.
Unbrowse MCP
Unbrowse extracts cookies directly from your Chrome or Firefox SQLite database. If you are logged into a site in Chrome, Unbrowse uses those cookies automatically -- no extension needed, no separate login step.
For sites that require fresh authentication, Unbrowse opens a visible browser window for you to complete the login flow. Cookies are saved to ~/.unbrowse/profiles/<domain>/ and reused automatically. Built-in sign-in URL detection handles redirects for Google, Microsoft, GitHub, Notion, LinkedIn, X, Slack, and more.
Feature Comparison
| Feature | Playwright MCP | Unbrowse MCP |
|---|---|---|
| Browser rendering | Every request | Only on cache miss |
| Cross-browser | Chromium, Firefox, WebKit | Chromium via Kuri |
| Accessibility snapshots | Yes | Yes (via Kuri) |
| Screenshots | Yes | Yes (via Kuri) |
| DOM manipulation | Full | Full (via Kuri evaluate) |
| API-layer caching | No | Yes (7 cache layers) |
| Shared route marketplace | No | Yes |
| Cookie auto-extraction | Via extension | Native (Chrome/Firefox DB) |
| Token-optimized output | Snapshots only | Structured API data |
| Repeat visit optimization | None | <200ms cached resolution |
| Network traffic capture | No | Automatic passive capture |
| Route mining / earnings | No | Yes (x402 micropayments) |
| Multi-agent benefit | None | Routes shared across agents |
When to Use Playwright MCP
Playwright MCP is the better choice when:
- You need cross-browser testing. Playwright supports Chromium, Firefox, and WebKit. Unbrowse runs on Chromium only.
- You need full DOM manipulation. Complex workflows that require precise CSS selector targeting, drag-and-drop, or multi-frame interactions are Playwright's strength.
- The task is one-off. If you only visit a site once and never return, the caching advantage of Unbrowse does not apply.
- You need screenshot-based reasoning. Some agent workflows rely on visual page analysis. Playwright MCP provides screenshots as a native capability.
- You are building test automation. Playwright's test runner integration is unmatched for CI/CD pipelines.
When to Use Unbrowse MCP
Unbrowse MCP is the better choice when:
- Your agent repeatedly accesses the same sites. The caching architecture means second visits are 30x or more faster.
- Token cost matters. At 4K tokens per cached action versus 27K-114K for Playwright, the savings are significant at scale.
- You are building multi-agent systems. Routes discovered by one agent are available to all agents via the shared marketplace.
- You need structured data, not rendered pages. Most agent tasks need the data behind the page, not the page itself. Unbrowse returns it directly.
- You want to earn from browsing. Agents using Unbrowse mine routes that other agents pay to use, creating a revenue stream from normal browsing activity.
- Latency matters. Sub-200ms resolution from cache versus 3-8 seconds for browser rendering.
Using Both Together
The most effective production setup uses both:
- Unbrowse MCP as the primary web tool. Handles 80-90% of web tasks through cached API routes.
- Playwright MCP as the fallback. Handles complex interactive tasks, cross-browser requirements, and visual verification.
This pattern gives you the speed and cost advantages of API-native resolution for routine data access, with the full power of browser automation available when you genuinely need it.
Setup Comparison
Playwright MCP
Add to your claude_desktop_config.json:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
}
}
}
Unbrowse MCP
git clone --single-branch --depth 1 https://github.com/unbrowse-ai/unbrowse.git ~/unbrowse
cd ~/unbrowse && ./setup --host mcp
This writes a ready-to-import config to ~/.config/unbrowse/mcp/unbrowse.json. Copy the server entry into your agent host's MCP configuration.
A generic template is also available at unbrowse.ai/mcp.json.
The Bottom Line
Playwright MCP is a browser with an MCP interface. Unbrowse MCP is an API discovery engine with a browser fallback.
If your agent needs to browse the web like a human -- clicking, scrolling, filling forms across diverse sites -- Playwright MCP is the mature, well-supported choice.
If your agent needs data from the web -- prices, listings, feeds, search results -- Unbrowse MCP eliminates the browser overhead entirely for repeat visits, cutting cost by 90% and latency by 30x or more.
For most production deployments, the answer is: use Unbrowse MCP first, Playwright MCP second.
Read the full benchmark paper: Internal APIs Are All You Need (Tham, Garcia & Hahn, 2026).