Playwright MCP exposes browser control to MCP clients using Playwright’s accessibility tree instead of screenshots, so language models can navigate pages through structured snapshots.
Overview
Playwright MCP is a Model Context Protocol server that wraps Playwright for programmatic web interaction. It is aimed at coding agents and other MCP hosts that need deterministic page operations without vision models, relying on accessibility snapshots and structured tool calls.
The server runs under Node.js and is installed through package runners or client-specific MCP configuration in editors and agent products such as VS Code, Cursor, Claude Desktop, and numerous CLI-based agents. Configuration flags cover browser choice, headless mode, host binding, allowed origins, device emulation, CDP attachment, and optional capabilities like PDF or DevTools support.
Compared to driving a browser only through ad hoc scripts, MCP integration keeps persistent browser state and rich page introspection inside an agent loop suited to exploratory automation or long-running tasks. An optional extension mode can attach to an existing Chrome or Edge instance with a companion browser extension.
Requirements list Node.js 20 or newer and any MCP-compatible client. The project positions MCP as useful when continuous browser context and iterative reasoning over page structure matter more than one-off CLI commands.
Key features
- Accessibility-tree page snapshots
- No vision model required
- Configurable browsers and headless mode
- MCP installs for major AI clients
- Optional Chrome and Edge extension mode
- Origin and host access controls
- Mobile and device emulation flags
- Deterministic tool-oriented automation
Use cases
- Agent-driven web testing flows
- Exploratory UI automation in IDEs
- Long-running autonomous browser tasks
- Self-healing test exploration loops
- Structured page interaction for LLMs