Dev & Engineering ✓ Microsoft · Official playwrightbrowser-automationmcpaccessibility-snapshotsweb-testing

Playwright Browser Automation MCP

Let MCP clients automate browsers through structured page snapshots.

Stars
★ 38k
Last updated
1d ago
License
Apache-2.0
Primary language
TypeScript

At a glance

How it runs
MCP serverSelf-hosted serviceLibrary / SDK
Works with
Universal · cross-platformCodex · Claude Code
Cost
Free, no paid service needed
Setup effort
Low · running in minutes
You'll need
Node.js 18 or newerShell / CLINetwork accessLocal filesystemMCP Server
Typical use
A developer uses an MCP-enabled coding client to open a local or live page and locate controls from its accessibility snapshot.
Not a fit if
  • Teams that need screenshot-only browser control with vision models
  • Deployments that require MCP itself to act as a security boundary
Source review
60/100 · Some gaps

What does this agent do, and when should you use it?

Playwright MCP is a Model Context Protocol server built on Playwright that lets LLMs interact with web pages through structured accessibility snapshots. Its standard setup launches @playwright/mcp with npx, and an MCP client calls the browser tools. Core tools cover navigation, snapshots, clicks, form filling, tab management, and access to console messages and network requests. The browser can use a persistent profile, an isolated session, or an extension that attaches to an existing session; the server can also run over HTTP/SSE or be created programmatically. It requires Node.js 18 or newer, and the README lists multiple MCP clients; the server is not a security boundary.

After the client starts the server, Playwright MCP operates a browser and returns the page's accessibility structure as a snapshot for subsequent tool calls. browser_navigate opens a URL, browser_snapshot captures the page structure, and browser_click, browser_fill_form, and browser_type perform interactions; browser_tabs manages tabs. It can also retrieve console messages and network requests, with optional capabilities for network routing, storage management, and DevTools tools. Results are returned as text snapshots or messages, or saved to files according to configuration; the screenshot tool can also return page images.

  1. A developer uses an MCP-enabled coding client to open a local or live page and locate controls from its accessibility snapshot.
  2. A test engineer runs a form flow in an isolated browser session and supplies initial cookies and local storage through a storage state file.
  3. A troubleshooter reads browser console messages or lists page network requests to investigate an interaction problem.
  4. An automation team enables the optional network capability to mock API responses, switch offline state, and inspect active routes.
  5. A user who needs an existing logged-in browser session connects to an Edge or Chrome instance through the Playwright extension.

How do you install or deploy this agent?

You need Node.js 18 or newer and an MCP client. The standard configuration launches the server with npx and requires no credentials in the shown config:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    }
  }
}

You can also add it with the Codex CLI:

codex mcp add playwright npx "@playwright/mcp@latest"

On first use, the client runs the configured server and connects to it; the browser starts with the default configuration.

How do you use this agent?

Start the server named playwright from your MCP client. Call browser_navigate with the target URL, then browser_snapshot to inspect the page structure; use a target reference from the snapshot with browser_click, browser_fill_form, or browser_type. To run a standalone HTTP service, use:

npx @playwright/mcp@latest --port 8931

The client can connect to its MCP endpoint with:

{
  "mcpServers": {
    "playwright": {
      "url": "http://localhost:8931/mcp"
    }
  }
}

Add --isolated to the launch arguments for a temporary isolated session. Use --caps to enable additional tool capabilities.

What are this agent's strengths and limitations?

Pros
  • Builds structured snapshots from Playwright's accessibility tree, so core interactions do not depend on vision models.
  • Includes callable tools for navigation, forms, tabs, console messages, and network requests.
  • Supports persistent profiles, isolated sessions, storage state files, and extension connections to existing browsers.
  • Documents HTTP/SSE deployment and programmatic connections in addition to MCP-client launch.
Limitations
  • Requires Node.js 18 or newer and a compatible MCP client.
  • The README says the server is not a security boundary; its file and network restrictions are also described as convenience protections.
  • A persistent profile can be used by only one browser instance at a time; parallel clients need isolation or separate user data directories.
  • The Docker implementation currently supports headless Chromium only.

How does this agent compare with similar options?

The README compares MCP with Playwright CLI + SKILLS: CLI uses fewer tokens and suits high-throughput coding workflows, while MCP suits automation that benefits from persistent browser state, page-structure inspection, and iterative reasoning.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Playwright Browser Automation MCP This agent 60 · Some gaps MCP serverFree ★ 38k 1d ago TypeScript Codex · Claude Code
CamoFox Browser Server 72 · Some gaps Self-hosted serviceFree ★ 425 28d ago JavaScript Claude Code
Weaver Agent Platform 45 · Major gaps Self-hosted serviceFree + model costs ★ 184 6mo ago Python OpenAI API · Claude API
Agent Browser: Browser automation CLI for AI agents 54 · Major gaps CLIFree + model costs ★ 44k 1d ago Rust —

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
60/ 100 5-point scale 3.0 / 5
Trust 16/29
Reliability 5/14
Adaptability 12/18
Convention 13/18
Effectiveness 9/13
Verifiability 5/8
Why each dimension lost points
Trust16 / 29 · 2.8/5

Default behavior restricts file access to workspace roots, blocks file:// navigation, binds to localhost, and offers isolation, permission, and origin controls, supporting some least privilege. However, options can open file access, bind all interfaces, or share browser context, and the docs state origin restrictions do not cover redirects. The docs disclose persistent profiles, storage state, secret files, and reuse of logged-in browser state, but do not describe secret protection or cleanup policy. Browser automation can perform side-effecting actions; the supplied material shows no per-action confirmation or rollback mechanism. Playwright versions are pinned to an alpha build, with no dependency security review evidence. Repository, package metadata, and license support attribution.

Reliability5 / 14 · 1.8/5

The README, package metadata, and capability tests generally describe a consistent MCP browser tool. Node.js requirements and timeout options are documented. The Playwright dependency is an alpha version, and operation requires Node, browser, and client environments; no offline or dependency failure recovery guidance is shown. The supplied material contains no evidence of user-facing failure categories or diagnostics, so that criterion scores zero. CI workflows define multi-platform and Docker test jobs, but this review does not claim they were executed.

Adaptability12 / 18 · 3.3/5

The README distinguishes MCP and CLI use cases and lists many MCP clients; configuration covers browsers, devices, snapshots, capabilities, and transport-related options. File access, origin policies, and capability switches define some boundaries, though options can explicitly relax access or sandboxing. The intended scope is browser automation through MCP, but the materials give limited guidance on unsuitable tasks or choosing by risk level.

Convention13 / 18 · 3.6/5

The README organizes installation, configuration, profiles, and initial state, with examples for many clients; its option table and profile notes document some limitations. Some examples use @latest, reducing version reproducibility, and the supplied materials show no separate changelog or compatibility policy. The Apache-2.0 license file is complete. Repository and package metadata identify Microsoft, while security reporting instructions and CI/publish workflows clarify maintenance and update responsibility.

Effectiveness9 / 13 · 3.5/5

Structured accessibility snapshots and MCP tools provide a browser interaction path that does not require a vision model, with concrete utility supported by the capability tests and tool list. The docs also note that CLI may use less context for coding agents, making the tradeoff explicit. Outputs include snapshots, code, and optional images, but the materials do not establish their quality or actual cost across tasks, so full marks are not justified.

Verifiability5 / 8 · 3.1/5

Core features, installation requirements, options, and security boundaries are traceable to the README; package metadata, license, test definitions, and CI configuration corroborate some claims. Statements about being lightweight, deterministic, or efficient remain project claims whose runtime effects cannot be confirmed statically. CI configuration does not establish successful execution. The rationale distinguishes documented facts from unverified performance inferences.

Risks and how to mitigate them
  • Connecting to an existing browser or using a persistent profile retains login state and site data; choose the user data directory carefully and consider isolated mode.
  • The origin allowlist is not a security boundary and does not cover redirects; binding to 0.0.0.0, opening file access, or sharing browser context expands access.
  • Default install examples use @latest, while the dependency uses a Playwright alpha version; check and pin a specific release when reproducibility matters.
Evidence confidence: Low Reviewed Oct 20, 2026 Reviewed revision ab6d67cbf8b6
See the full review method →

FAQ

Does it require an API key or paid model?
The installation example runs locally through npx and lists no model API key requirement or service pricing.
How does it identify page elements?
By default, it exposes structured accessibility snapshots; tools can target snapshot references or unique selectors.
Does an isolated session retain login state?
Storage state is lost when an isolated session closes. You can provide initial state with --storage-state; persistent profiles retain browser data.
Can it reuse an existing logged-in browser session?
Yes. The Playwright MCP browser extension can connect to an existing Edge or Chrome instance, and requires that extension to be installed.
Can I use the server as a security boundary?
No. The README explicitly says Playwright MCP is not a security boundary and that its host, origin, and file access controls are not security protections.
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents