The Microsoft Playwright MCP, built by microsoft, provides microsoft's official Playwright MCP server (35,900+ GitHub stars, npm `@playwright/mcp`) drives a real browser through Playwright's accessibility tree rather than screenshots, so it needs no vision model and its responses are structured text an LLM can act on deterministically. It is officially maintained and best for Coding & Dev.
by microsoft
About
Microsoft's official Playwright MCP server (35,900+ GitHub stars, npm `@playwright/mcp`) drives a real browser through Playwright's accessibility tree rather than screenshots, so it needs no vision model and its responses are structured text an LLM can act on deterministically. Requires Node.js 18+; `claude mcp add playwright npx @playwright/mcp@latest` is the whole install for Claude Code, and the same stdio block works in Cursor, Claude Desktop, Windsurf, Codex, Goose, VS Code, Copilot, Kiro and LM Studio. Roughly 70 tools ship across eight groups: core automation (browser_snapshot, browser_find, browser_click, browser_fill_form, browser_evaluate, browser_console_messages, browser_network_requests), tab management, and six opt-in capability groups behind --caps — network request mocking and offline simulation, cookie/localStorage/sessionStorage management, devtools tracing and video, coordinate-based mouse input via vision, PDF export, and testing assertions with browser_generate_locator and the verify_* tools. By default it runs headed with a persistent profile, so logins survive between sessions; that profile is keyed to the client workspace and can only be used by one browser instance at a time, so a second concurrent client needs --isolated or its own --user-data-dir. File-system access is restricted to workspace roots and file:// navigation is blocked unless --allow-unrestricted-file-access is passed, while --allowed-origins and --blocked-origins are explicitly documented as not a security boundary. Every CLI flag has a matching PLAYWRIGHT_MCP_* environment variable. Microsoft now points coding agents at the Playwright CLI with skills instead, on token-efficiency grounds, and recommends MCP for agentic loops that need persistent browser state.
Trust verdict
How grades are computed →Grade A (98/100, reliable) from 1 measured signal, based on repository evidence. Only one signal stands behind it, so treat the grade as provisional.
What was measured
- Repository maintenance100/100 · weight 20
The repository has been pushed to or released within the last six months. — last push 2026-07-25, last release 2026-07-09 (v0.0.78).
- Source verification100/100 · weight 25
The repository URL was confirmed to resolve against the live GitHub API and is not archived.
- Provenance90/100 · weight 10
Published and maintained by the vendor of the service it connects to, rather than by a third party.
- Listing ↔ repository match100/100 · weight 5
The listing name lines up with the linked repository microsoft/playwright-mcp.
What could not be measured
These contributed nothing to the score — not a penalty, not a zero. They are why the confidence reads the way it does.
- Live MCP handshakeunknown
No remote endpoint to handshake — this server installs and runs locally over stdio, so there is nothing to probe from the outside.
- Measured uptimeunknown
No probe history recorded for this server yet.
- Tool-schema stabilityunknown
Drift is a difference between two successive checks, and this server has none recorded.
Installation
npx @playwright/mcp@latest@playwright/mcp confirmed live on the npm registry — checked August 17, 2026.
Playwright MCP drives a real browser through Playwright's accessibility tree rather than screenshots, so it needs no vision model and its output is structured text a language model can act on deterministically. Before you install it, read the project's own caveat: Microsoft now says that if you are using a coding agent, you may be better served by the Playwright CLI with skills, because CLI invocations avoid loading large tool schemas and verbose accessibility trees into the context window. MCP is the right choice for agentic loops that want persistent browser state and iterative reasoning over page structure — exploratory automation, self-healing tests, long-running autonomous workflows — and the wrong choice if you mostly want a browser occasionally in a session already full of code.
Installing Playwright MCP
1.Check the runtime
Node.js 18 or newer. Everything below runs through npx, so there is nothing to install globally.
2.Claude Code
One command, no arguments needed for a default headed persistent-profile setup.
shellclaude mcp add playwright npx @playwright/mcp@latest3.Anything with a JSON config
Cursor, Claude Desktop, Windsurf, Goose, Codex, LM Studio, Kiro, Copilot and others take the same stdio block. Flags go in args after the package name.
json{ "mcpServers": { "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] } } }4.Decide persistent or isolated before you run two clients
The default is a persistent profile, so logins survive across sessions. It lives in ~/Library/Caches/ms-playwright/mcp-{channel}-{workspace-hash} on macOS, ~/.cache/ms-playwright/... on Linux and %USERPROFILE%\AppData\Local\ms-playwright\... on Windows, where the workspace hash comes from the MCP client's workspace root — so different projects get separate profiles automatically. A persistent profile can only be used by one browser instance at a time.
5.Run several clients in parallel
Start each additional client with --isolated, or point it at a distinct --user-data-dir. Isolated sessions keep the profile in memory and lose all storage state when the browser closes; seed them with --storage-state pointing at a Playwright storage-state file if they need to start logged in.
json{ "mcpServers": { "playwright": { "command": "npx", "args": [ "@playwright/mcp@latest", "--isolated", "--storage-state=/path/to/storage.json" ] } } }6.Turn on the capability groups you need
Core automation, tab management and browser installation are always on. Everything else is opt-in behind --caps: config, network, storage, devtools, vision and pdf, plus testing for assertion tools. Note that the README's options table lists only vision, pdf and devtools while its tool sections document the rest — trust the tool sections, and verify with a tools/list against your own install.
shellnpx @playwright/mcp@latest --caps=network,storage,testing
The tool surface, by group
Roughly 70 tools across eight groups. The ones worth knowing by name are the ones that change how you prompt.
browser_snapshotThe accessibility-tree snapshot the whole design rests on. Most other tools take a target reference produced by it.
browser_findLocates an element without dumping a whole snapshot — the cheaper first move on a large page.
browser_click / browser_type / browser_fill_form / browser_select_optionCore interaction. fill_form fills several fields in one call rather than one tool call per input.
browser_evaluate / browser_run_code_unsafeArbitrary JavaScript in the page, and arbitrary Playwright code. Treat the latter as the escape hatch it is.
browser_console_messages / browser_network_requestsRead the console and the request log — how the agent debugs a page rather than just driving it.
browser_route / browser_unroute / browser_network_state_setRequest mocking and offline simulation. Opt-in via --caps=network.
browser_cookie_* / browser_localstorage_* / browser_sessionstorage_* / browser_storage_stateFull storage read-write, including exporting a storage state you can feed back in with --storage-state. Opt-in via --caps=storage.
browser_start_tracing / browser_start_video / browser_highlight / browser_annotateTraces, screen recordings and visual annotation. Opt-in via --caps=devtools.
browser_mouse_click_xy / browser_mouse_drag_xy / browser_mouse_wheelCoordinate-based input for canvas and other things with no accessibility tree. Opt-in via --caps=vision.
browser_generate_locator / browser_verify_text_visible / browser_verify_element_visible / browser_verify_valueAssertion and locator-generation tools for writing tests from a live session. Opt-in via --caps=testing.
browser_pdf_saveSave the page as a PDF. Opt-in via --caps=pdf.
What people use it for
Reproduce a bug report against your own logged-in staging site
“Open our staging dashboard, follow these steps from the bug report, and tell me at which step the behaviour diverges from what the reporter described — include the console errors and any failing network requests.”
Uses the persistent profile so you are already authenticated, and browser_console_messages plus browser_network_requests to explain the failure instead of only reporting it.
Turn a manual click-through into a Playwright test
“Walk through the signup flow, then generate stable locators for each element you interacted with and write me a Playwright test asserting the success state.”
browser_generate_locator and the verify_* tools exist for exactly this, but only with --caps=testing enabled.
Check a page against a flaky third-party API
“Route the pricing API to return a 500, reload the page, and tell me what the user sees. Then set the browser offline and do it again.”
Failure-path testing without touching the backend, via --caps=network. This is the workflow that justifies MCP over a CLI: the browser keeps its state across the whole investigation.
Which one should you use?
Two different projects answer to "the Playwright MCP server". They are not the same code.
ExecuteAutomation Playwright MCP
Pick it for auto-generated Playwright test scripts, in-page JavaScript execution and a large device-preset library. Pick Microsoft's for the official, actively-maintained accessibility-tree server with the opt-in capability model.
Connecting to your own already-open browser
Use --extension with the Playwright Extension (Edge and Chrome only) to attach to existing tabs and their logged-in state, or --cdp-endpoint to attach to a browser you launched yourself.
Every command, environment variable, and endpoint above was read from the project’s own documentation on 2026-08-11: microsoft/playwright-mcp README, @playwright/mcp on npm.
Categories
Frequently Asked Questions
Why does Playwright MCP fail when I open it in a second client?
Should I use Playwright MCP or the Playwright CLI with skills?
Can Playwright MCP read files on my machine?
Does --allowed-origins make the browser safe to point at the open web?
Is it headless by default?
Why does it time out on a slow page?
How do I cut token usage on big pages?
What is Microsoft Playwright MCP?
Who built Microsoft Playwright MCP?
Is Microsoft Playwright MCP free?
How do I install Microsoft Playwright MCP?
What does Microsoft Playwright MCP integrate with?
Repo Health
Local/stdio install — runs on your machine, so there is no remote endpoint to verify live. Trust signal below is from the source repo.
- Last commit
- 1mo ago
- Last release
- v0.0.78 · 2mo ago
- Install
- npm
- Package
- @playwright/mcp
Quick Info
- Install Type
- npm
- Author
- microsoft
- Categories
- 2
- Integrations
- 5
Related Servers
Everything
Reference/test server with prompts, resources, and tools. Perfect for testing MCP implementations.
Fetch
Web content fetching and conversion for efficient LLM usage. Extract readable content from any URL.
Git
Tools to read, search, and manipulate Git repositories. Full Git operations support.
Sequential Thinking MCP Server
a single structured-reasoning tool that lets a model plan, revise and branch its own chain of thought instead of answering in one shot. Published by Anthropic as part of the official modelcontextprotocol/servers monorepo (89,000+ stars, actively maintained), it exposes exactly one tool — sequential_thinking — and that tool is the whole product. Each call carries a `thought` string plus bookkeeping fields: `thoughtNumber`, `totalThoughts`, and `nextThoughtNeeded`, which the model flips to false when it is done. The interesting fields are the optional ones. `isRevision` and `revisesThought` let the model go back and correct an earlier step rather than plowing ahead on a bad assumption; `branchFromThought` and `branchId` let it fork into an alternative line of reasoning and carry both forward; `needsMoreThoughts` lets it extend past its own original estimate when a problem turns out to be deeper than it looked. In practice you never call the tool by hand. You connect the server to an MCP host and ask a question that deserves more than one pass — plan a PostgreSQL 14 to 16 migration and revise if downtime exceeds five minutes, work out why a deploy only fails in production, compare three architectures and branch when an assumption breaks. You can tell it is working when the host inspector shows repeated sequential_thinking calls with a rising `thoughtNumber` rather than a single response. Install with `npx -y @modelcontextprotocol/server-sequential-thinking` — note the hyphenated package name, which differs from both the `sequentialthinking` directory in the repo and the Docker image `mcp/sequentialthinking`, a mismatch that breaks a lot of copied configs. A Docker image is published alongside the npm package, and the README carries one-click VS Code install buttons for both transports. Set `DISABLE_THOUGHT_LOGGING=true` if you do not want every thought written to the server log.
21st.dev Magic
Create crafted UI components inspired by the best 21st.dev design engineers.
Sponsored
Better Stack
Free PlanGet alerted when your APIs, browser tests, payment pipelines, or MCP server dependencies go down. Used by 100K+ developers.
Start monitoring free →