# Playwright MCP

> Browser automation through the accessibility tree instead of pixels

Category: MCP servers (https://aiarabicdev.com/mcp-servers)
Canonical page: https://aiarabicdev.com/mcp-servers/playwright-mcp
Tags: mcp, browser, playwright, testing, automation

Playwright MCP exposes browser automation to an agent using Playwright's accessibility snapshot rather than screenshots. The agent reads a structured description of the page, which is dramatically cheaper in context than an image and often more precise to act on.

## Facts

- Licence: Apache-2.0
- Language: TypeScript
- Cost: Free and open source
- Self hostable: yes
- Added: 2026-08-23
- Last checked: 2026-08-23

## Links

- Source: https://github.com/microsoft/playwright-mcp

## The snapshot model

Instead of looking at a picture, the agent receives the accessibility tree: roles, labels and references it can click by name. That is both cheaper and less ambiguous than asking a model to find a button in an image.

It also means the agent is exercising the same tree a screen reader uses, so automation failures frequently surface genuine accessibility problems as a side effect.

## Choosing between this and DevTools

Use Playwright MCP for flows: sign in, fill this form, click through the checkout, then assert what happened. Use Chrome DevTools MCP when the question is visual or diagnostic, such as how the page looks or why a request failed.

Running both is reasonable and common. They answer different questions and neither replaces the other.

## Reach for it when

- the agent needs to walk a multi step flow and assert the outcome
- you want browser automation that does not burn context on screenshots
- generating end to end tests from a described journey

## Watch out for

- the accessibility tree is useless on a canvas heavy or badly labelled page
- browser binaries need installing, which is a slow first run
- it can act on any site it can reach, so scope its access deliberately

## Get started

Add to Claude Code:

```sh
claude mcp add playwright -- npx -y @playwright/mcp@latest
```

---

aiarabicdev is a free directory of open source tools. No affiliate links, no sponsored placements.
New entries are announced at https://t.me/arabic_Intelligence
