MCP server · Browser automation
Playwright MCP server
Lets an assistant drive a real browser through Playwright, reading pages as accessibility snapshots instead of screenshots.
- Maintainer
- Microsoft (official)
- Licence
- Apache-2.0
- Runs
- Locally (npx)
- Sign-in
- None
- Registry version
- 0.0.82 (updated 2026-09-18)
- Last activity
- 2026-10-08
Overview
What it does
Playwright MCP is Microsoft’s browser automation server built on Playwright. Instead of sending screenshots, it gives the model a structured accessibility snapshot of the page, so it can click, type and navigate by element reference without a vision model. It runs locally through npx and opens Chrome, Firefox, WebKit or Edge, headed by default or headless with a flag.
It suits exploratory testing, filling forms, checking a page after a change and other long browser sessions where keeping state matters. By default it uses a persistent profile, so logins survive between sessions; --isolated keeps the profile in memory and --storage-state loads cookies from a file. Extra tool groups are opt-in with --caps, including network routing, storage, DevTools tracing and video, coordinate-based mouse control, PDF export and test assertions. For coding agents, the README points to Playwright CLI with skills as a lighter option that uses fewer tokens.
Tools
What the assistant can do
- Navigate, click, type, hover, drag, select options and press keys by element reference
- Take accessibility snapshots and screenshots, and read console messages and network requests
- Fill forms, upload files, handle dialogs and manage tabs
- Opt-in network routing and cookie or local storage control
- Opt-in tracing, video recording, PDF export and test assertions
- Opt-in coordinate-based mouse control for vision models
Install
Install Playwright MCP server in your app
You need:
- Node.js 18 or newer
- An MCP client
Run in your project. --scope local keeps the servers private to you in this project; use user for every project.
claude mcp add --scope local playwright -- npx -y @playwright/mcp@latest
claude mcp add --scope local playwright -- cmd /c npx -y '@playwright/mcp@latest'
Project root. Commit it to share the servers with your team; each person sets the variables in their own shell.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}
- On native Windows (not WSL), the reference servers’ READMEs start npx through `cmd /c`: if a server won’t start, use "command": "cmd" with "args": ["/c", "npx", …].
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json (Settings → Developer → Edit Config). Restart Claude after saving.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}
In your project, or ~/.cursor/mcp.json for every project.
{
"mcpServers": {
"playwright": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}
In your workspace. VS Code asks for each secret the first time a server starts and stores it securely.
{
"servers": {
"playwright": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}
macOS/Linux: ~/.config/devin/mcp_config.json · Windows: %APPDATA%\devin\mcp_config.json. Read by the default Devin Local agent and by the legacy Cascade agent.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"-y",
"@playwright/mcp@latest"
]
}
}
}
Want it alongside other servers? Open Playwright MCP in the MCP config generator and add the rest; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.
Before you install
- The README states it is not a security boundary; browser_run_code_unsafe runs arbitrary JavaScript in the server process and is described as RCE-equivalent.
- The default persistent profile keeps logins and cookies on disk; use --isolated for throwaway sessions.
- File access is limited to workspace roots unless you pass --allow-unrestricted-file-access; origin allow and block lists are not a security boundary.
- A local MCP server runs with your user account’s permissions. Install it only from the source linked above. See how to choose a safe server.
Why it’s listed
Why we list it
The most widely used browser automation server, maintained by the Playwright team with frequent releases.
Related
More MCP servers
- Chrome DevTools MCPLets an assistant control and inspect live Chrome: performance traces, network, console, Lighthouse audits and memory snapshots.
- Filesystem MCP ServerLets an assistant read, write, edit, move and search files, but only inside the folders you allow.
- Git MCP ServerLets an assistant check status, read diffs and logs, stage, commit and switch branches in a local Git repository.
All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?