Skip to main content
AgentsUse

Browser Automation

Playwright

A browser automation framework that drives Chromium, Firefox, and WebKit with a single API for tests, scripts, and AI agents.

open sourceApache-2.0Checked 2026-10-29Source-verified

Quick decision

Best for
Teams that need one API across Chromium, Firefox, and WebKit, with a test runner and an MCP server from the same project.
Not ideal for
Work that needs a hosted browser fleet, proxies, or CAPTCHA handling out of the box. Playwright gives you the browser driver, not the infrastructure around it.
Pricing model
Open source under Apache-2.0. The library, test runner, CLI, and MCP server are free to use. Browser infrastructure and any LLM calls are separate costs you arrange yourself.
Deployment
Self-hosted library. Local browser.
Authentication
No account needed for the library. Pages you automate may need their own sign-in, and Playwright can save and reuse authentication state.
Review state
Source-verified. Checked 2026-10-29; not locally tested by AgentsUse.

Use this profile in a stack

Open the browser workspace, search for Playwright, and add it to a saved stack or watchlist. The workspace is free, needs no sign-in, and stores stacks in your browser only.

What it does

Playwright is a framework for web automation and testing maintained by Microsoft. It drives Chromium, Firefox, and WebKit with a single API, so the same script can open pages, fill forms, and read results across the three browser engines.

For agent work, the project ships three paths: Playwright Test for end-to-end checks, a CLI aimed at coding agents, and Playwright MCP, a Model Context Protocol server that gives an LLM structured accessibility snapshots of the page instead of screenshots. Agents interact through element references, which keeps actions deterministic.

Playwright runs headless by default and supports headed execution, device emulation, network interception, screenshots, and PDF generation from the library API.

Capabilities on record

Browser control

  • Cross-browser automation Source-verified

    Drive Chromium, Firefox, and WebKit with a single API.

  • Resilient locators Source-verified

    Find elements by role, label, placeholder, text, or test id, mirroring how users see the page.

  • Auto-wait and web-first assertions Source-verified

    Actions wait for elements to be actionable and assertions retry until conditions are met.

  • Network interception Source-verified

    Route, mock, or block network requests during automation.

Data access

  • Screenshots and PDF capture Source-verified

    Save page screenshots and generate PDFs from a page.

Agent integration

  • MCP server for agents Source-verified

    Expose browser control to MCP clients through the @playwright/mcp package with accessibility snapshots.

Quick start

Install the library

The shortest path from the official README. The MCP server uses the same npx pattern with the @playwright/mcp package.

Install the library
npm i playwright
# or start a test project:
# npm init playwright@latest

Source: https://github.com/microsoft/playwright. The example uses placeholders. Keep real credentials in your environment, not in shared configs, tickets, or repositories.

MCP support: Yes. The Playwright MCP server (@playwright/mcp) gives MCP clients browser control through accessibility snapshots. Config checked against the project README on 2026-10-03.

Works with

MCP

Official MCP server via @playwright/mcp (npx).

Packages

npm: playwright, @playwright/test, @playwright/mcp. Also published for Python, .NET, and Java.

Browsers

Chromium, Firefox, and WebKit on Linux, macOS, and Windows.

Deployment

Self-hosted library. You run the browsers.

Only support with a source is listed. An absent framework is unverified by AgentsUse, not incompatible.

Health and maintenance

GitHub stars

98,816

Checked 2026-10-29

GitHub forks

6,734

Checked 2026-10-29

Downloads

154,059,035

npm weekly downloads for the playwright package

Package
npm: playwright, version 1.64.1
License
Open source, Apache-2.0
Maintainer
Microsoft

Stars and forks from the GitHub repository page; version and weekly downloads from the npm package page. Maintenance signals only, not a quality rating.

Pricing and license

Open source under Apache-2.0. The library, test runner, CLI, and MCP server are free to use. Browser infrastructure and any LLM calls are separate costs you arrange yourself.

Limitations and safety

  • You operate the browsers yourself. Scaling, proxies, and anti-bot handling are your responsibility.
  • The MCP server returns accessibility snapshots. Pages with poor accessibility markup give the agent less to work with.
  • No independently checked benchmark is published for this tool yet. The maintenance and setup facts above are source checked, but they do not measure task quality or speed.
Safety

Agent tools can read data, write files, call APIs, and act through connected accounts. Start with a test account or read-only access, keep credentials in environment variables, and review agent actions before connecting anything that can spend money, send messages, or delete data.

Alternatives to Playwright

Common questions

What does Playwright do for an AI agent?

A browser automation framework that drives Chromium, Firefox, and WebKit with a single API for tests, scripts, and AI agents.

Is Playwright open source?

Yes. This profile records the license as Apache-2.0 from the official repository.

Does Playwright support MCP?

Yes. The Playwright MCP server (@playwright/mcp) gives MCP clients browser control through accessibility snapshots. Config checked against the project README on 2026-10-03.

Sources and freshness

Checked 2026-10-29. Source-verified means the claims above trace to the listed sources; it does not mean AgentsUse ran the tool. Send corrections through the contact page. Back to the tools catalog.