# Playwright MCP: an MCP server we run in production

Canonical: https://scalably.io/mcp/playwright-mcp
Source: https://github.com/microsoft/playwright-mcp
Registry: not published to the MCP registry
Provenance: third-party server, pinned at latest, verified 2026-10-02.
Integrity: no independent hash is published for this third-party listing; the raw endpoint at https://scalably.io/mcp/playwright-mcp.md mirrors this representation byte for byte
This is the machine-readable representation of the page at the canonical URL. Same facts, denser format.

## Direct answer
Browser automation and QA from Claude Code and Codex on the operator's machine.

## Install
- Claude Code: `claude mcp add playwright -- npx -y @playwright/mcp@latest`
- Codex: `codex mcp add playwright -- npx -y @playwright/mcp@latest`
- Claude Desktop: not available for this server.

## Environment
No environment variables.

## Tools
| Tool | Description |
|---|---|
| `browser_navigate` | Navigate to a URL. |
| `browser_navigate_back` | Go back to the previous page. |
| `browser_snapshot` | Capture an accessibility snapshot of the page; better than a screenshot for acting. |
| `browser_find` | Search the accessibility snapshot for text or a regular expression. |
| `browser_click` | Click on the page. |
| `browser_hover` | Hover over an element. |
| `browser_type` | Type text into an editable element. |
| `browser_fill_form` | Fill several form fields. |
| `browser_select_option` | Select an option in a dropdown. |
| `browser_press_key` | Press a key. |
| `browser_drag` | Drag and drop between two elements. |
| `browser_drop` | Drop files or data onto an element. |
| `browser_file_upload` | Upload one or more files. |
| `browser_handle_dialog` | Handle a dialog. |
| `browser_wait_for` | Wait for text to appear or disappear, or for a set time. |
| `browser_take_screenshot` | Take a screenshot; use browser_snapshot to act on the page. |
| `browser_console_messages` | Return console messages. |
| `browser_network_requests` | List network requests since the page loaded. |
| `browser_network_request` | Full details of one network request. |
| `browser_evaluate` | Evaluate a JavaScript expression on the page or an element. |
| `browser_run_code_unsafe` | Run a Playwright code snippet in the server process (RCE-equivalent). |
| `browser_emulate_media` | Emulate CSS media features such as the color scheme. |
| `browser_resize` | Resize the browser window. |
| `browser_tabs` | List, create, close or select tabs. |
| `browser_close` | Close the page. |

## Setup
- Needs Node.js 18 or newer. No credentials.
- Claude Code: `claude mcp add playwright npx @playwright/mcp@latest`. We track `latest`; it resolved to 0.0.83 when this page was verified.
- Useful flags: `--browser` (chrome, firefox, webkit, msedge), `--isolated`, `--user-data-dir`, `--extension` to attach to a running Chrome or Edge, `--port 8931` for HTTP, `--config <file>`.
- Opt-in tool groups via `--caps`: `vision` (coordinate mouse tools), `pdf`, `devtools` (tracing, video, recording); the README also documents `network`, `storage`, `config` and `testing` groups.
- Docker: `mcr.microsoft.com/playwright/mcp`.

The 25 core tools below are always on; the opt-in groups add about 50 more.


## Limits
- Playwright MCP is not a security boundary. `browser_run_code_unsafe` runs arbitrary code in the server process.
- A persistent profile can be used by one browser instance at a time.
- The Docker image supports headless Chromium only. `--extension` is Chrome and Edge only.
- The README notes that coding agents may get better token efficiency from the Playwright CLI with skills.

Sources: microsoft/playwright-mcp v0.0.83 README; npm dist-tags for @playwright/mcp.


## Reliability
- CI: not applicable, this is a third-party project we do not control.
- Pinned at latest
- Verified 2026-10-02
- We run this server in production, pinned at the exact version, with the install command derived mechanically from that pin so it can be re-verified against the published package.

## Related
- Also in browser: [Scrapling MCP](https://scalably.io/mcp/scrapling-mcp)
- Read more: [The Claude Agent SDK: build your own agent](https://scalably.io/blog/claude-agent-sdk-guide), [Claude Code MCP: how to add an MCP server](https://scalably.io/blog/claude-code-mcp)
