What it is
Playwright MCP, from Microsoft, gives agents browser automation through structured accessibility snapshots instead of screenshots. Capabilities such as PDF, vision and devtools are opt-in through --caps.
- Maintainer
- Official (vendor)microsoft on GitHub (organisation account, project of the same name)
- Source
- microsoft/playwright-mcp40,575 GitHub stars · Apache-2.0 licence
- Transport
- stdio, HTTP on localhost (optional)
- Packages
- @playwright/mcp npm · latest 0.0.86 · 45,585,272 downloads last month
- Latest release
- v0.0.86 2026-11-18
- Public advisories
- 1GitHub and OSV, as of December 5, 2026
What it can do
Read from the public tool definitions in the source, not from a live run. A capability marked "yes" means at least one tool can do it.
- Reads: yes
- Writes: yes
- Deletes: yes
- Runs code: yes
- Network: yes
- Sends: no
Because it can set cookies and storage and run JavaScript, it can act as a signed-in user in whatever profile you point it at.
| Tool | What it can do | Notes |
|---|---|---|
browser_run_code_unsafe | Runs code | Name says unsafe. Runs code in the Playwright context. |
browser_evaluate | Runs code | Runs JavaScript in the page. |
browser_navigate | Network | |
browser_file_upload | Reads | Uploads a file from disk to a page. |
browser_pdf_save | Writes | Needs the pdf capability. |
browser_take_screenshot | Writes | |
browser_cookie_set | Writes | |
browser_localstorage_set | Writes | |
browser_set_storage_state | Writes | |
browser_cookie_list | Reads | |
browser_storage_state | Reads | Exports cookies and storage. |
browser_route | Writes | Intercepts and rewrites network requests. |
| Cookie, localStorage and sessionStorage tools 15 tools | Reads, Writes, Deletes | Read, set, delete and clear browser storage. browser_cookie_clear, browser_cookie_delete, browser_localstorage_clear |
| Mouse tools 6 tools | Writes | Coordinate-based input. browser_mouse_click_xy, browser_mouse_drag_xy |
| Recording, tracing and video tools 9 tools | Writes | Write recordings and traces. browser_start_tracing, browser_start_video |
Counted from the tool list in the README. Some tools need a capability enabled with --caps.
Credentials and least privilege
No credential by default. The two optional inputs are files you choose.
| Credential | What it is for | Least privilege |
|---|---|---|
--secrets / PLAYWRIGHT_MCP_SECRETS_FILE | Optional dotenv file of secrets the browser tools can use. | Put only the logins this task needs in it, and keep the file out of the repo. |
--storage-state | Optional saved cookies and storage for isolated sessions. | Use a test account state, not your daily login. |
Public security advisories
Advisories published on GitHub or OSV for this project, as of December 5, 2026. Fixed issues are a normal part of a maintained project. What matters is that the version you run is not in an affected range.
| Advisory | Severity | Summary | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-6fg3-hvw7-2fwq · CVE-2025-9611 | High | Microsoft Playwright MCP Server vulnerable to DNS Rebinding Attack; Allows Attackers Access to All Server Tools | n/a | 0.0.40 |
What stands out
- The README says
--allowed-originsis not a security boundary and does not affect redirects. - By default file access is restricted to workspace roots.
--allow-unrestricted-file-accessremoves that and also allowsfile://URLs. --extensionconnects to a running Edge or Chrome with the Playwright extension, which exposes that browser's logins.browser_run_code_unsafeis named for what it does.
Safe-install checklist
Install command from the project's docs: npx @playwright/mcp@latest.
- Pin the version. Use an exact version, not
latest:npx @playwright/mcp@0.0.86 --isolated. `--isolated` keeps the profile in memory. - Scope the credential. Put only the logins this task needs in it, and keep the file out of the repo.
- Use
--isolatedwith a test account's storage state, not your real profile. - Do not use
--extensionor--allow-unrestricted-file-accessunless you need them. - Deny
browser_run_code_unsafeandbrowser_evaluateunless the task is test generation. - Deny the tools you do not need. In Claude Code, deny rules in
.claude/settings.jsonuse the formmcp__<server name>__<tool>, where the server name is whatever you called it in your config. Example, if you named itplaywright-mcp:{ "permissions": { "deny": [ "mcp__playwright-mcp__browser_run_code_unsafe", "mcp__playwright-mcp__browser_evaluate", "mcp__playwright-mcp__browser_pdf_save", "mcp__playwright-mcp__browser_take_screenshot", "mcp__playwright-mcp__browser_cookie_set", "mcp__playwright-mcp__browser_localstorage_set", "mcp__playwright-mcp__browser_set_storage_state", "mcp__playwright-mcp__browser_route" ] } } - Snapshot the tool list. Save the
tools/listoutput right after you install, then compare it before every upgrade with the free PTS MCP tool diff checker. It runs in your browser and flags new tools and changed descriptions or schemas. - Watch for fixes. Watch the project's security advisories and upgrade on purpose, after the diff.
For the general version of this list, see the MCP server security checklist. Not sure about a server that is not listed here? Read Is an MCP server safe to install?
Quick follow-ups
What can Playwright MCP server do on my machine or accounts?
Based on its public tool definitions, it can: reads local files or data; creates or changes files, records or settings; deletes or destroys data; runs commands, scripts or code; reaches the open web or a third-party service beyond the account you connect it to. Because it can set cookies and storage and run JavaScript, it can act as a signed-in user in whatever profile you point it at.
Does Playwright MCP server need a token or API key?
Yes, depending on setup: --secrets / PLAYWRIGHT_MCP_SECRETS_FILE, --storage-state. No credential by default. The two optional inputs are files you choose.
Has Playwright MCP server had public security advisories?
Yes. 1 public advisory (GitHub or OSV) listed for it as of December 5, 2026. Each one is linked on this page with its affected and fixed versions, so you can check the version you run. Fixed issues are normal for active projects. Running a current, pinned version is what matters.
How do I keep Playwright MCP server from changing under me?
Pin the version, for example npx @playwright/mcp@0.0.86 --isolated. Then save its tool list (name, description, input schema) with the free PTS MCP tool diff checker and compare it before each upgrade.
Sources
This page is a factual summary of public information about the software. It is not a verdict on the maintainers and not an audit. Check the project's own docs for your version before you rely on it. Educational, not legal or security advice.
