← Back to directory
P

Playwright MCP

Official
Give AI agents full browser control via structured accessibility snapshots
GitHub source repository ↗
★ 95.2k Stars Category · Browser Very popular Source revision 32095eac6a94
43FMRS · D
Reliability
3/20
Security and permissions
8/20
Maintenance
17/20
Documentation
9/20
Setup experience
6/20

Playwright MCP is Microsoft's official AI-agent browser control server, driving interaction through accessibility snapshots rather than screenshots, and connecting to mainstream MCP clients over stdio via npx; the README does not enumerate specific tool names, so the tool list is left empty.

Read the FMRS scoring method →

Playwright MCP is a Model Context Protocol server from the Playwright project (Microsoft), launched locally via npx, that gives AI agents full control of Chromium, Firefox, and WebKit. Agents perceive pages through structured accessibility snapshots rather than screenshots or vision models, and use element refs (e.g. e5, e10) to click, type, and interact deterministically. The README states tool coverage spans navigation, form filling, screenshots, network mocking, and storage management. The server itself is maintained in the separate microsoft/playwright-mcp repository and is presented as an official companion project within microsoft/playwright's README and Resources section.

Tools

The tool list has not been reviewed yet.

Setup

Add an MCP server entry to your client (VS Code, Cursor, Claude Desktop, Windsurf, or Claude Code) with command npx and args ["@playwright/mcp@latest"]. VS Code users can alternatively use the one-click install badge provided in the repo. Claude Code users can run claude mcp add playwright npx @playwright/mcp@latest. On first run, npx fetches the latest package and starts a local process that the client talks to over stdio.

claude_desktop_config.json
{"mcpServers":{"playwright":{"command":"npx","args":["@playwright/mcp@latest"]}}}

Fit and risk

Best for

  • Users who want an LLM to drive open-ended browser tasks
  • Developers already using MCP-capable clients like Claude Desktop, VS Code, Cursor, or Windsurf
  • Cross-browser (Chromium/Firefox/WebKit) automation without hand-writing test scripts

Not for

  • Teams needing a full end-to-end test runner with parallel execution and trace viewer — the README points to Playwright Test for that instead
  • Coding-agent setups that prioritize token efficiency and want to avoid loading large tool schemas and accessibility trees — the README recommends the lighter-weight Playwright CLI for that case
  • Environments requiring strict isolation from real browser sessions, cookies, or local files, since the agent gets genuine browser control

Required permissions

  • Local Node.js/npx runtime to launch the server process
  • Ability to download and run Chromium/Firefox/WebKit browser binaries
  • Outbound network access to load whatever pages the agent is directed to visit

Risks and side effects

  • The server grants agents real control of a browser, so a manipulated prompt could cause navigation to or submission of data on unintended sites
  • If a saved storage state (login session) is loaded, the agent may gain access to authenticated account data
  • The README does not describe any authentication or access-control mechanism built into the MCP server itself — safety depends on the host client and how target URLs are constrained

Troubleshooting

  1. Verify Node.js is installed and `npx @playwright/mcp@latest` runs successfully on its own
  2. Check that the MCP client config's command/args match the documented example exactly
  3. Confirm the client supports the MCP stdio transport
  4. If the browser fails to launch, check whether Playwright's browser install step is needed and whether the target site is network-reachable

Use cases

Letting a coding agent or chat assistant navigate, click, and fill forms on real web pages
Driving browser automation from an LLM without relying on screenshots or vision models
Having an AI agent verify multi-step web flows such as form submission or checkout

Supported clients

Claude DesktopFull support
Claude CodeFull support
VS CodeFull support
CursorFull support
WindsurfFull support