# Playwright

Playwright gives an agent control of a browser through structured accessibility snapshots rather than screenshots. Fits testing, scraping and page walks where no vision model is available.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 39981 repo stars
- Author: microsoft
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/microsoft/playwright-mcp
- Updated: 2026-10-22
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/playwright

## What it does

The server shows the agent a page as an accessibility tree: headings, buttons, fields and links appear as structure, not pixels. The model clicks, types and reads text without relying on vision. That removes the guesswork of screenshot-based approaches.

Under the hood sits Playwright on Node.js, launched with one command: `npx @playwright/mcp@latest`. Node.js 18 or newer is required. The server stays lightweight because it never touches pixel data.

For coding agents juggling large codebases, the author points to the CLI version: MCP pays off when you need a persistent browser context and iterative reasoning over page state, not a one-shot run.

## Requirements
- Needs: Docker
- Works with: Playwright

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- give an agent a browser without a vision model
- click buttons and fill forms from page structure
- pull data off pages through the accessibility tree
- keep a browser open for long autonomous workflows
- write self-healing tests that read page state

## Example prompts
- Open `example.com` and list every link that has the class `nav-link`.
- Fill in the login form and check what greeting appears after sign-in.
- Walk the catalogue page and collect all product names into a list.

## Similar
- [playwright-cli](https://affpapa.org/en/nevibecode/skills/playwright-cli.md) — skill · 221700 installs
- [playwright-dev](https://affpapa.org/en/nevibecode/skills/playwright-dev.md) — skill · 3900 installs
- [Playwright Cloud Browsers](https://affpapa.org/en/nevibecode/mcp/playwright-cloud-browsers.md) — MCP server · ★ 18 repo stars
- [playwright-in-sandbox](https://affpapa.org/en/nevibecode/skills/playwright-in-sandbox.md) — skill · 510 installs
- [playwright-generate-test](https://affpapa.org/en/nevibecode/skills/playwright-generate-test.md) — skill · 18162 installs
- [playwright-explore-website](https://affpapa.org/en/nevibecode/skills/playwright-explore-website.md) — skill · 14792 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
