
Playwright MCP
github.com/microsoft/playwright-mcp- Category
- AI Agents
- Rank
- No. 69Tools index
- Listed in
- #2 Control a browser · #2 Connect tools with MCP
- Pricing
- Open Source
- Type
- TOOL
- Builder
- @microsoft
- GitHub
- 36.9k stars
- Latest release
- v0.0.80
- Date
About
Microsoft's MCP server for Playwright. Lets agents drive a browser via tool calls.
What it does
Playwright MCP represents web pages as structured accessibility snapshots, then lets a language model inspect page state and perform deterministic browser actions. It can maintain browser context across an iterative agent session without requiring a vision model.
Why it's ranked here
This is a strong fit for stateful browser work because it combines structured page introspection, persistent context, and Playwright automation. The repository also shows real navigation, clicking, library, CLI, and Docker test coverage. Its own documentation clearly acknowledges the context cost.
What's good
Accessibility snapshots give models named elements and stable references instead of ambiguous pixels. Configuration covers browser choice, persistent profiles, remote connections, network allowlists and blocklists, output limits, timeouts, optional capabilities, and generated code languages. The package also supports both command-line use and programmatic embedding.
Tradeoffs
Verbose accessibility trees and large MCP tool schemas consume more model context than concise command-line workflows. Secret replacement is explicitly a convenience, not a security feature. The file-access guardrail is also not a secure boundary. Client-level permissions remain necessary for sensitive automation.
How to use it well
Use it for exploratory automation, self-healing tests, or long-running agent loops that need continuous browser state and repeated inspection. It suits MCP clients and embedded Node.js services. For high-throughput coding agents balancing browser work with large repositories, the documented CLI and skills approach is the better adjacent tool.
Technical notes+
package.json publishes @playwright/mcp for Node.js 18 or newer, exposes cli.js as the playwright-mcp binary, and exports index.js with types from index.d.ts. index.js delegates createConnection to playwright-core/lib/coreBundle. config.d.ts defines Chromium, Firefox, and WebKit selection, CDP and remote endpoints, server binding, capability gates, network policy, snapshots, output controls, and code generation. playwright.config.ts runs tests from tests in parallel, while tests/fixtures.ts creates stdio MCP clients and supports Docker transport. tests/core.spec.ts, tests/click.spec.ts, tests/cli.spec.ts, and tests/library.spec.ts exercise navigation, element references, browser installation help, and CommonJS consumption.
Observed
- License
- Apache-2.0
- Languages
- JavaScript and TypeScript
- Package
- Published as the npm package @playwright/mcp
- Runtime
- Node.js 18 or newer
- Interfaces
- MCP server, command-line binary, and Node.js library export
- Browser engines
- Chromium, Firefox, and WebKit are configurable
- Testing structure
- Repository includes Playwright tests for CLI, library, navigation, clicking, stdio transport, and Docker mode
Read from README.md, package.json, cli.js, index.js, roll.js, index.d.ts, config.d.ts, update-readme.js, playwright.config.ts, tests/cli.spec.ts, tests/fixtures.ts, tests/core.spec.ts, tests/click.spec.ts, tests/library.spec.ts, tests/testserver/index.ts.
Intel on Playwright MCP
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.