Skip to content
AI Dev Toolkit.
Esc
  • Loading…

MCP server · Browser automation

Playwright MCP server

Playwright MCP is Microsoft’s official MCP server for browser automation. It lets Claude Code, Cursor and other MCP apps drive a real browser through Playwright, reading pages as accessibility snapshots instead of screenshots. It runs locally with npx @playwright/mcp@latest and needs no account. Its README says it is not a security boundary.

Maintainer
Microsoft (official)
Licence
Apache-2.0
Runs
Locally (npx)
Sign-in
None
Registry version
0.0.86 (updated 2026-11-18)
Last activity
2026-10-08

Overview

What can the Playwright MCP server do?

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

Tools it gives the assistant

  • 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

How do I install Playwright MCP in Claude Code, Cursor or VS Code?

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.

Terminal
claude mcp add --scope local playwright -- npx -y @playwright/mcp@latest
Native Windows (PowerShell)
claude mcp add --scope local playwright -- cmd /c npx -y '@playwright/mcp@latest'

Need another app? Open Playwright MCP in the MCP config generator for a shared project .mcp.json, Devin, or several servers at once; it writes one file per app. The snippets follow the setup in the server’s README, checked on 2026-10-14.

Is the Playwright MCP server safe? Check 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.

FAQ

Playwright MCP questions

Is the Playwright MCP server official?

Yes. Microsoft publishes and maintains it, under the Apache-2.0 licence. Install it only from the source linked on this page, not from a copy in another directory.

Is Playwright MCP server remote or local?

Local. Your MCP app starts it on your machine with npx, and it runs with your user account’s permissions.

Does Playwright MCP server need an API key or account?

No. It needs no account, API key or sign-in to run. You also need: Node.js 18 or newer; An MCP client.

Why it’s listed

Why we list it

The most widely used browser automation server, maintained by the Playwright team with frequent releases.

Related

All MCP serversMCP config generatorGuide: MCP servers in Claude CodeGuide: what is MCP?

Keep exploring