MCP server · Microsoft
Playwright MCP
Pick it to let the agent drive a real browser for E2E checks; it can reach any site the browser can.
Tools: 25, ~3,745 tokens of tool definitions loaded into the model's context (default configuration; measured 2026-10-27, v0.0.83). Compare all servers →
All 25 tools, by token cost
- browser_take_screenshot309
- browser_emulate_media254
- browser_fill_form229
- browser_find226
- browser_drop212
- browser_network_request190
- browser_run_code_unsafe182
- browser_click180
- browser_type172
- browser_snapshot169
- browser_evaluate168
- browser_network_requests168
- browser_console_messages165
- browser_drag157
- browser_select_option136
- browser_tabs128
- browser_wait_for108
- browser_hover96
- browser_file_upload86
- browser_handle_dialog85
- browser_press_key83
- browser_resize80
- browser_navigate64
- browser_navigate_back53
- browser_close45
Same server, other documented flags (measured 2026-10-27):
--caps=vision,pdf,devtools,network,storage,testing,config(all opt-in capabilities (README --caps)): 72 tools, ~8,173 tokens (118% more than the default)
Install
Add `npx @playwright/mcp@latest` to your client MCP config (README has per-client steps). Official install docs ↗
Credentials: None
What it can access
Controls a real browser: navigates, clicks, fills forms, can access any site the browser can.
Minimal safe setup
- Use
--isolated(profile kept in memory) and, if you need a login,--storage-state=<file>instead of your everyday profile. source ↗ --allowed-origins/--blocked-originshelp keep the browser on target, but the README states they are not a security boundary and do not affect redirects. Leave--capsoff unless you need those tools. source ↗
Common setup errors
- A second agent or IDE window cannot start the browser.
- The default persistent profile can be used by only one browser instance at a time; start additional clients with
--isolatedor a distinct--user-data-dir. source ↗ - Screenshots/PDF/network or cookie tools are missing.
- They are opt-in capabilities: enable them with
--caps(e.g. vision, pdf, devtools, network, storage, testing, config). Each one adds tools to the context, see the measured numbers above. source ↗ - The agent cannot open local files or file:// URLs.
- By default file access is restricted to the workspace roots and file:// navigation is blocked;
--allow-unrestricted-file-accesslifts that (only do it deliberately). source ↗
How it differs from alternatives
- Chrome DevTools MCP: Chrome-only (officially Chrome and Chrome for Testing) but adds performance traces with CrUX field data and source-mapped console errors; Playwright MCP drives Chrome, Firefox, WebKit or Edge. Measured: 32 tools, ~6,185 tokens.
- Playwright CLI + skills: Microsoft's README recommends it for coding agents because CLI calls avoid loading large tool schemas and accessibility trees into context; MCP remains the better fit for long, stateful browser loops. source ↗
Notes written from the official sources linked above, checked 2026-10-27.
Details
- Type
- MCP server
- Tasks
- Browser & E2E testingWeb fetching & scraping
- Compatible agents
- Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Codex, Gemini CLI, GitHub Copilot, Cline, Goose (source: clients with a setup heading or install/config instructions in the official README)
- Maintenance
- Release v0.0.83 on 2026-09-28 (npm @playwright/mcp 0.0.83); last commit 2026-10-22
- License
- Apache-2.0
- Source
- https://github.com/microsoft/playwright-mcp
- Verified on
- 2026-10-26
No independent security audit: entries summarize official sources only. Review permissions and code before installing.
Compared in: Best MCP servers for Web fetching & scraping
Badge for your README (maintainers)
The badge only says it's listed; it is not a security review or an endorsement.