Fixed serialization of shared browser launches and forwarding of CDP commands in isolated and extension modes.
Release history
microsoft/playwright-mcp releases
Playwright MCP server
All releases
46 shown
- Extension supports managing multiple tabs with `--extension` flag
- `browser_take_screenshot` skips base64 response when filename is provided
- Playwright MCP now published to the official MCP Registry on each release
Full changelog
What's New
Distribution
- Playwright MCP is now published to the official MCP Registry on each release (#1585)
Bug Fixes
- `browser_run_code` renamed to `browser_run_code_unsafe`
- `browser_network_requests` now returns a numbered list of requests
- Both `browser_network_requests` and `browser_network_request` accept a `filename` option to write output to a file
Full changelog
What's New
Tool Improvements
browser_network_requests— Now returns a numbered list of requests; use the newbrowser_network_requesttool with the index to fetch full details (headers/body) or a single part. Both tools accept afilenameoption to write the output to a file (#40447, #40454)browser_run_code→browser_run_code_unsafe— Renamed to make the sandbox-escape implication explicit (#40496)
Bug Fixes
- browser_drop tool
- browser_network_requests responseBody/responseHeaders
- browser_evaluate plain expressions
Full changelog
What's New
New Tools
browser_drop— ExposeLocator.dropas an MCP tool for completing drag-and-drop operations onto a target (#40367)
Tool Improvements
browser_network_requests— AddedresponseBodyandresponseHeadersoptions; binary bodies are rendered as a placeholder using mime-type detection (microsoft/playwright@f0be0b17)browser_evaluate— Accept plain expressions in addition to function bodies (#39979)
Browser Extension
Bug Fixes
Minor fixes and improvements.
Changelog
- Maintenance release off 1.59 branch point
- browser_network_state_set tool
- browser_video_chapter tool
- browser_mouse_click_xy options
Full changelog
What's New
New Tools
browser_network_state_set— Toggle network offline mode for testing connectivity scenarios (#39459)browser_video_chapter— Add a chapter marker to the video recording, showing a full-screen chapter card with blurred backdrop (#39891)
Tool Improvements
browser_mouse_click_xy— Addedbutton,clickCount, anddelayoptions for more precise mouse interaction control (#39368, #39465)browser_network_requests— Added filtering support and optionalheaders/bodyfields in responses (#39672)- Non-ref selectors — Tools now accept plain CSS/text selectors in addition to aria-ref handles (#39581)
Other Changes
- Added
mcpNamefield to package for MCP Registry ownership verification (#1432) - Chrome extension: inject public key into release zip to preserve Web Store extension ID (#1462)
Bug Fixes
- Fix verify tools not working inside iframes (#39374)
- Fix fs-based lock file not respected for Chromium family browsers (#39377)
- Fix console entries being printed when
--snapshot-mode=noneis set (#39378) - Fix non-deterministic right-click behavior due to contextmenu/mouseup ordering (#39416)
- Fix header value parsing when header contains colons in value (#39401)
- Fix persistent context incorrectly using per-session isolation (#39601)
- Fix navigation protocol allowlist replaced with blocklist for better coverage (#39600)
- Fix malformed Unicode characters in MCP tool responses (#39625)
- Fix
toWellFormed()compatibility with Node.js 18 (#39674) - Fix empty
cdpHeadersfrom environment overriding config file values (#39866) - Fix file path validation in
browser_set_storage_statetool (#39881) - Fix Chrome for Testing executable location resolution in browser extension (#39936)
- Fix extension inactivity timers not armed for pending tabs (#1443)
Minor fixes and improvements.
Full changelog
Quick follow-up bug fix
- Revert
--no-sandbox→--no-chromium-sandboxrename.
The CLI flag name is restored to--no-sandbox.
- --[no-]sandbox renamed to --[no-]chromium-sandbox
- Chrome extension available in Chrome Web Store
Full changelog
Extension
- Our Google Chrome extension is now available in the Chrome Web Store:
Playwright MCP Bridge
Bug Fixes
- Rename
--[no-]sandboxto--[no-]chromium-sandboxfor clarity and to avoid ambiguity with other browsers.
- Browser profiles in-memory by default
- --session flag replaced with -s=
- Session lifecycle simplified—no stopped state
- --persistent flag for persistent profiles
- --profile=<path> for custom directories
- Workspace-scoped daemon process
Full changelog
🕶️ Incognito by default
Browser profiles are now in-memory by default — every session starts clean with no leftover state.
Use --persistent to opt into a persistent profile, or --profile=<path> to specify a custom profile directory:
> playwright-cli open example.com # incognito, clean slate
> playwright-cli open example.com --persistent # persistent profile
> playwright-cli open example.com --profile=./my-data # custom profile directory
🔀 Simplified session management
The --session flag has been replaced with the shorter -s=. Session lifecycle is simplified — there is no longer a "stopped" state; sessions are either running or gone.
> playwright-cli -s=myapp open example.com
> playwright-cli -s=myapp click e5
> playwright-cli -s=myapp close
> playwright-cli -s=myapp delete-data
New session management commands replace the old session-* family:
> playwright-cli list # list all sessions
> playwright-cli close-all # close all browsers
> playwright-cli kill-all # forcefully kill all browser processes
🏗️ Workspace-scoped daemon
Each workspace now gets its own daemon process, preventing cross-project interference and enabling direct daemon startup for faster, more reliable operation.
- Browser storage introspection and manipulation
- CLI-based network request mocking
- Conditional response logic via run-code
Full changelog
🗄️ Browser storage & authentication state control
Full introspection and manipulation of browser storage, enabling reproducible auth flows, debugging, and stateful automation.
> playwright-cli state-save auth.json
> playwright-cli state-load auth.json
Inspect and manage cookies:
> playwright-cli cookie-list
> playwright-cli cookie-get session_id
> playwright-cli cookie-set session_id abc123 --domain=example.com
> playwright-cli cookie-delete session_id
> playwright-cli cookie-clear
Work directly with Web Storage APIs:
# LocalStorage
> playwright-cli localstorage-list
> playwright-cli localstorage-get theme
> playwright-cli localstorage-set theme dark
> playwright-cli localstorage-clear
# SessionStorage
> playwright-cli sessionstorage-list
> playwright-cli sessionstorage-set wizardStep 3
> playwright-cli sessionstorage-clear
Perfect for:
- Persisting login sessions
- Debugging auth and feature flags
- Sharing reproducible browser state across runs
🌐 Powerful network & API request mocking
Intercept, mock, modify, or block network requests directly from the CLI — no test harness required.
Simple CLI-based request mocking
Mock responses by URL pattern with custom status codes, bodies, headers, or request mutations.
# Mock with custom status
> playwright-cli route "**/*.jpg" --status=404
# Mock with JSON body
> playwright-cli route "**/api/users" \
--body='[{"id":1,"name":"Alice"}]' \
--content-type=application/json
# Mock with custom headers
> playwright-cli route "**/api/data" \
--body='{"ok":true}' \
--header="X-Custom: value"
# Strip sensitive headers from outgoing requests
> playwright-cli route "**/*" --remove-header=cookie,authorization
Manage active routes:
> playwright-cli route-list
> playwright-cli unroute "**/*.jpg"
> playwright-cli unroute
Use cases:
- Frontend development without a backend
- Offline and error-state testing
- Snapshot stability and deterministic rendering
Flexible URL pattern matching
Routes support glob-style patterns for precise targeting:
**/api/users Exact path match
**/api/*/details Wildcards within paths
**/*.{png,jpg,jpeg} File extension matching
**/search?q=* Query parameter matching
🧠 Advanced request handling with run-code
For conditional logic, request inspection, response mutation, or timing control, drop down to raw Playwright routing via run-code.
Conditional responses based on request data
> playwright-cli run-code "async page => {
await page.route('**/api/login', route => {
const body = route.request().postDataJSON();
if (body.username === 'admin') {
route.fulfill({ body: JSON.stringify({ token: 'mock-token' }) });
} else {
route.fulfill({ status: 401, body: JSON.stringify({ error: 'Invalid' }) });
}
});
}"
Modify real backend responses
> playwright-cli run-code "async page => {
await page.route('**/api/user', async route => {
const response = await route.fetch();
const json = await response.json();
json.isPremium = true;
await route.fulfill({ response, json });
});
}"
Simulate network failures
> playwright-cli run-code "async page => {
await page.route('**/api/offline', route =>
route.abort('internetdisconnected')
);
}"
🧠 SKILLS
Local SKILLS installation
> playwright-cli install-skills
Other
Browser installation (renamed)
> playwright-cli install-browser
Ephemeral browser contexts (renamed)
> playwright-cli config --in-memory
Renamed from --isolated to better reflect behavior:
- Browser profile lives only in memory
- Nothing persisted to disk
- Clean state on every run
- Playwright CLI executable
- On-demand video recording
- Persistent session configuration
Full changelog
Infrastructure for Playwright CLI is in, so we are ready to cook the features and skills!
⚡ Lightning fast Playwright CLI executable (http://github.com/microsoft/playwright-cli)
> playwright-cli open example.com
> time playwright-cli snapshot
0.03s user 0.01s system cpu 0.055 total
🎥 On-demand video recording
> playwright-cli video-start
> playwright-cli open playwright.dev
> playwright-cli video-stop
### Result
- [Video](.playwright-cli/video-2026-01-31T00-49-47-976Z.webm)
Also available with the --caps=devtools flag in Playwright MCP.
🔧 Persistent session configuration
> playwright-cli config --headed --config=config.json
> playwright-cli open playwright.dev
Countless configuration options
☁️ Isolated (ephemeral) browser context, non-chromium browser shortcuts
> playwright-cli install --browser=firefox
> playwright-cli config --isolated --browser=firefox --headed
> playwright-cli open playwright.dev
🔌 Playwright Chrome extension + Playwright CLI = ❤️
- Install Playwright browser extension
> playwright-cli --session=real-browser snapshot --extension
Share the tab and have fun!
Minor fixes and improvements.
Changelog
- Internal: release the "mcp" binary and scope it to playwright in NPX world
Minor fixes and improvements.
Changelog
Bugfixes
- Fixing the Windows CLI
- Playwright CLI with extensive command set
- Configuration file support
- Environment variable configuration
Full changelog
Full Playwright CLI configuration:
- Support config file in
playwright-cli.json - Support environment configuration
- Support non-Chrome browsers
- See https://github.com/microsoft/playwright-cli for more info
📣 Playwright CLI
We are adding a new token-efficient CLI mode of operation to Playwright with the skills located at playwright-cli. This brings the long-awaited official SKILL-focused CLI mode to our story and makes it more coding agent-friendly.
It is the first snapshot with the essential command set (which is already larger than the original MCP!), but we expect it to grow rapidly. Unlike the token use, that one we expect to go down since snapshots are no longer forced into the LLM!
Installation
npm install -g @playwright/mcp@latest
playwright-cli --help
Demo
Your agent will be running those, but it does not mean you can't play with it:
playwright-cli open https://demo.playwright.dev/todomvc/ --headed
playwright-cli type "Buy groceries"
playwright-cli press Enter
playwright-cli type "Water flowers"
playwright-cli press Enter
playwright-cli check e21
playwright-cli check e35
playwright-cli press screenshot
Skills-less operation
Point your agent at the CLI and let it cook. It'll read the skill off playwright-cli --help on its own:
Test the "add todo" flow on https://demo.playwright.dev/todomvc using playwright-cli.
Check playwright-cli --help for available commands.
Installing skills
Claude Code, GitHub copilot and others will let you install the Playwright skills into the agentic loop.
plugin (recommended)
/plugin marketplace add microsoft/playwright-cli
/plugin install playwright-cli
manual
mkdir -p .claude/skills/playwright-cli
curl -o .claude/skills/playwright-cli/SKILL.md \
https://raw.githubusercontent.com/microsoft/playwright-cli/main/skills/playwright-cli/SKILL.md
Headed operation
Playwright CLI is headless by default. If you'd like to see the browser, pass --headed to open:
playwright-cli open https://playwright.dev --headed
Sessions
Playwright CLI will use a dedicated persistent profile by default. It means that
your cookies and other storage state will be preserved between the calls. You can use different
instances of the browser for different projects with sessions.
Following will result in two browsers with separate profiles being available. Pass --session to
the invocation to talk to a specific browser.
playwright-cli open https://playwright.dev
playwright-cli --session=example open https://example.com
playwright-cli session-list
You can run your coding agent with the PLAYWRIGHT_CLI_SESSION environment variable:
PLAYWRIGHT_CLI_SESSION=todo-app claude .
Or instruct it to prepend --session to the calls.
Manage your sessions as follows:
playwright-cli session-list # list all sessions
playwright-cli session-stop [name] # stop session
playwright-cli session-stop-all # stop all sessions
playwright-cli session-delete [name] # delete session data along with the profiles
Commands
Core
playwright-cli open <url> # open url
playwright-cli close # close the page
playwright-cli type <text> # type text into editable element
playwright-cli click <ref> [button] # perform click on a web page
playwright-cli dblclick <ref> [button] # perform double click on a web page
playwright-cli fill <ref> <text> # fill text into editable element
playwright-cli drag <startRef> <endRef> # perform drag and drop between two elements
playwright-cli hover <ref> # hover over element on page
playwright-cli select <ref> <val> # select an option in a dropdown
playwright-cli upload <file> # upload one or multiple files
playwright-cli check <ref> # check a checkbox or radio button
playwright-cli uncheck <ref> # uncheck a checkbox or radio button
playwright-cli snapshot # capture page snapshot to obtain element ref
playwright-cli eval <func> [ref] # evaluate javascript expression on page or element
playwright-cli dialog-accept [prompt] # accept a dialog
playwright-cli dialog-dismiss # dismiss a dialog
playwright-cli resize <w> <h> # resize the browser window
Navigation
playwright-cli go-back # go back to the previous page
playwright-cli go-forward # go forward to the next page
playwright-cli reload # reload the current page
Keyboard
playwright-cli press <key> # press a key on the keyboard, `a`, `arrowleft`
playwright-cli keydown <key> # press a key down on the keyboard
playwright-cli keyup <key> # press a key up on the keyboard
Mouse
playwright-cli mousemove <x> <y> # move mouse to a given position
playwright-cli mousedown [button] # press mouse down
playwright-cli mouseup [button] # press mouse up
playwright-cli mousewheel <dx> <dy> # scroll mouse wheel
Save as
playwright-cli screenshot [ref] # screenshot of the current page or element
playwright-cli pdf # save page as pdf
Tabs
playwright-cli tab-list # list all tabs
playwright-cli tab-new [url] # create a new tab
playwright-cli tab-close [index] # close a browser tab
playwright-cli tab-select <index> # select a browser tab
DevTools
playwright-cli console [min-level] # list console messages
playwright-cli network # list all network requests since loading the page
playwright-cli run-code <code> # run playwright code snippet
playwright-cli tracing-start # start trace recording
playwright-cli tracing-stop # stop trace recording
- Playwright CLI command set
- Configuration file support
- Environment variable configuration
Full changelog
📣 Playwright CLI
We are adding a new token-efficient CLI mode of operation to Playwright with the skills located at playwright-cli. This brings the long-awaited official SKILL-focused CLI mode to our story and makes it more coding agent-friendly.
It is the first snapshot with the essential command set (which is already larger than the original MCP!), but we expect it to grow rapidly. Unlike the token use, that one we expect to go down since snapshots are no longer forced into the LLM!
Installation
npm install -g @playwright/mcp@latest
playwright-cli --help
Demo
Your agent will be running those, but it does not mean you can't play with it:
playwright-cli open https://demo.playwright.dev/todomvc/ --headed
playwright-cli type "Buy groceries"
playwright-cli press Enter
playwright-cli type "Water flowers"
playwright-cli press Enter
playwright-cli check e21
playwright-cli check e35
playwright-cli press screenshot
Skills-less operation
Point your agent at the CLI and let it cook. It'll read the skill off playwright-cli --help on its own:
Test the "add todo" flow on https://demo.playwright.dev/todomvc using playwright-cli.
Check playwright-cli --help for available commands.
Installing skills
Claude Code, GitHub copilot and others will let you install the Playwright skills into the agentic loop.
plugin (recommended)
/plugin marketplace add microsoft/playwright-cli
/plugin install playwright-cli
manual
mkdir -p .claude/skills/playwright-cli
curl -o .claude/skills/playwright-cli/SKILL.md \
https://raw.githubusercontent.com/microsoft/playwright-cli/main/skills/playwright-cli/SKILL.md
Headed operation
Playwright CLI is headless by default. If you'd like to see the browser, pass --headed to open:
playwright-cli open https://playwright.dev --headed
Sessions
Playwright CLI will use a dedicated persistent profile by default. It means that
your cookies and other storage state will be preserved between the calls. You can use different
instances of the browser for different projects with sessions.
Following will result in two browsers with separate profiles being available. Pass --session to
the invocation to talk to a specific browser.
playwright-cli open https://playwright.dev
playwright-cli --session=example open https://example.com
playwright-cli session-list
You can run your coding agent with the PLAYWRIGHT_CLI_SESSION environment variable:
PLAYWRIGHT_CLI_SESSION=todo-app claude .
Or instruct it to prepend --session to the calls.
Manage your sessions as follows:
playwright-cli session-list # list all sessions
playwright-cli session-stop [name] # stop session
playwright-cli session-stop-all # stop all sessions
playwright-cli session-delete [name] # delete session data along with the profiles
Commands
Core
playwright-cli open <url> # open url
playwright-cli close # close the page
playwright-cli type <text> # type text into editable element
playwright-cli click <ref> [button] # perform click on a web page
playwright-cli dblclick <ref> [button] # perform double click on a web page
playwright-cli fill <ref> <text> # fill text into editable element
playwright-cli drag <startRef> <endRef> # perform drag and drop between two elements
playwright-cli hover <ref> # hover over element on page
playwright-cli select <ref> <val> # select an option in a dropdown
playwright-cli upload <file> # upload one or multiple files
playwright-cli check <ref> # check a checkbox or radio button
playwright-cli uncheck <ref> # uncheck a checkbox or radio button
playwright-cli snapshot # capture page snapshot to obtain element ref
playwright-cli eval <func> [ref] # evaluate javascript expression on page or element
playwright-cli dialog-accept [prompt] # accept a dialog
playwright-cli dialog-dismiss # dismiss a dialog
playwright-cli resize <w> <h> # resize the browser window
Navigation
playwright-cli go-back # go back to the previous page
playwright-cli go-forward # go forward to the next page
playwright-cli reload # reload the current page
Keyboard
playwright-cli press <key> # press a key on the keyboard, `a`, `arrowleft`
playwright-cli keydown <key> # press a key down on the keyboard
playwright-cli keyup <key> # press a key up on the keyboard
Mouse
playwright-cli mousemove <x> <y> # move mouse to a given position
playwright-cli mousedown [button] # press mouse down
playwright-cli mouseup [button] # press mouse up
playwright-cli mousewheel <dx> <dy> # scroll mouse wheel
Save as
playwright-cli screenshot [ref] # screenshot of the current page or element
playwright-cli pdf # save page as pdf
Tabs
playwright-cli tab-list # list all tabs
playwright-cli tab-new [url] # create a new tab
playwright-cli tab-close [index] # close a browser tab
playwright-cli tab-select <index> # select a browser tab
DevTools
playwright-cli console [min-level] # list console messages
playwright-cli network # list all network requests since loading the page
playwright-cli run-code <code> # run playwright code snippet
playwright-cli tracing-start # start trace recording
playwright-cli tracing-stop # stop trace recording
Routine maintenance release for microsoft/playwright-mcp.
Changelog
Prep for v0.0.58
- cdpTimeout configuration option
- improved error messages
Full changelog
Features
- Added
cdpTimeoutconfiguration option for CDP connections, allowing control over connection timeouts (default: 30s,0disables timeout).
Fixes
- Improved error handling when browser launch fails:
- Clearer messaging when the browser profile is already in use (including Windows-specific exit cases).
- Better diagnostics for missing system dependencies, with a suggestion to run
playwright install-deps.
- file:// URL navigation blocked by default
- file uploads restricted to workspace roots
- enforce protocol and filesystem access restrictions by default
Full changelog
🔐 Security & Safety
- MCP now enforces protocol and filesystem access restrictions by default:
- Browser navigation and API requests are limited to
http:,https:,about:, anddata:URLs;file://is blocked. - File uploads (
setInputFiles, file choosers, MCP file tools) are restricted to workspace root directories (orcwdif no roots are configured).
- Browser navigation and API requests are limited to
- Added
--allow-unrestricted-file-access(andallowUnrestrictedFileAccessconfig) to explicitly opt out, allowing:- Access to files outside workspace roots.
- Navigation and requests to
file://URLs.
📁 Artifacts & Output
- MCP-recorded videos are now saved under
outputDir/videos
- restrict MCP extension to same-machine connections
Full changelog
Bug Fixes
- MCP extension now only connects to MCP server running on the same machine (https://github.com/microsoft/playwright/pull/38626)
- removed fifty MB upload limit
Full changelog
Bug Fixes
- Fixed persistence of
saveVideoin configs (https://github.com/microsoft/playwright/pull/38621) - Fixed issue with empty snapshots sometimes written into .md files (https://github.com/microsoft/playwright/pull/38583)
- Removed 50 MB upload limit when uploading files in the Playwright extension (https://github.com/microsoft/playwright/pull/38614)-
- browser_run_code function support
- browser_snapshot filename parameter
Full changelog
Highlights
- browser_run_code now takes a function and supports
returnstatements. - browser_snapshot now accepts an optional
filenameparameter. When provided, the snapshot is saved to disk and a link appears in the Files section. This avoids inlining large snapshots and keeps MCP payloads smaller.
- --console-level configuration
- --snapshot output mode
- network request filtering
Full changelog
New config options
--console-level=<'error' | 'warning' | 'info' | 'debug'>configure the console severity level that is included in the replies. Defaults to 'info'.--snapshot=<'incremental' | 'full' | 'none'>configure snapshot output mode. Defaults to 'incremental'.
New params
- browser_console_messages now accepts
{ level: 'error' | 'warning' | 'info' | 'debug' }to include messages up to the given severity level. - browser_network_requests no longer returns successfully downloaded static resources by default, pass
{ includeStatic: boolean }to include them.
Minor fixes and improvements.
Changelog
Maintenance release
Minor fixes and improvements.
Changelog
Maintenance release
- The --allow-origins flag is now available; ensure configured origins are trusted.
Full changelog
Maintenance release
We are bringing back the --allow-origins flag! Please make sure you point at the trusted origins only.
- --allowed-origins flag removed
- --blocked-origins flag removed
- --init-page TypeScript support
- --init-script JavaScript support
- browser_run_code batch operations
Full changelog
New ways to provide initial state
There are now multiple ways to provide the initial state to the browser context or a page.
For the storage state, you can either:
- Start with a user data directory using the
--user-data-dirargument. This will persist all browser data between the sessions. - Start with a storage state file using the
--storage-stateargument. This will load cookies and local storage from the file into an isolated browser context.
For the page state, you can use:
- ❗NEW❗
--init-pageto point to a TypeScript file that will be evaluated on the Playwright page object. This allows you to run arbitrary code to set up the page. You can use various Playwright APIs there, perform necessary steps, etc.
// init-page.ts
export default async ({ page }) => {
await page.context().grantPermissions(['geolocation']);
await page.context().setGeolocation({ latitude: 37.7749, longitude: -122.4194 });
await page.setViewportSize({ width: 1280, height: 720 });
};
--init-scriptto point to a JavaScript file that will be added as an initialization script. The script will be evaluated in every page before any of the page's scripts.
This is useful for overriding browser APIs or setting up the environment.
// init-script.js
window.isPlaywrightMCP = true;
New run-code command to save tokens
There now is a new browser_run_code command that allows LLM to run Playwright APIs as well. LLM can call it with a batch of Playwright APIs:
{
name: 'browser_run_code',
arguments: {
code: `
await page.getByRole("checkbox", { name: "Accept" }).check();
await page.getByRole("button", { name: "Submit" }).click();
`;
}
}
This way LLM can speed up repetitive operations and save on context tokens.
Breaking changes
--allowed-origins and --blocked-origins flags are gone. Please use --proxy as a safer alternative or rely upon the underlying OS policies instead.
- tool response logging
Full changelog
Maintenance release
- fresh Playwright under the hood
- chore(mcp): log tool responses for debugging - https://github.com/microsoft/playwright/pull/38110
Fixes WSL client compatibility with Windows servers.
Full changelog
Maintenance release
- fix(mcp): do not fail on wsl client w/ windows server - (#38063)
Minor fixes and improvements.
Changelog
Maintenance release
- incremental page snapshots with diffs
- image size limits
Full changelog
MCP Changes Since Last Release
- Incremental page snapshots:
pageStatenow supports diffs. Unchanged subtrees are collapsed as- ref=<id> [unchanged]. Reduces noise and payload size. microsoft/playwright#37795 - Encourage relative path usage — MCP now suggests using relative paths for portability microsoft/playwright#37857
- Image size cap — Added limits on rendered image sizes to prevent resource overuse microsoft/playwright#37856
- test-id-attribute option
Full changelog
- https://github.com/microsoft/playwright/commit/47f3da37a27217f16c36669261cb214864413209 feat(mcp): support test-id-attribute option (https://github.com/microsoft/playwright/pull/37760)
- faster console error detection
- cross-filesystem video support
Full changelog
- https://github.com/microsoft/playwright/commit/86a00d091808b9637e3b9ffd91c217ec3fec700d chore(mcp): handle cross-fs video moves (https://github.com/microsoft/playwright/pull/37663)
- https://github.com/microsoft/playwright/commit/52b2da831b47ba55b16cf5e62168c46361f4d885 chore(mcp): support --allowed-hosts=* (https://github.com/microsoft/playwright/pull/37657)
- https://github.com/microsoft/playwright/commit/9f371ad5e386f2f0afdca479400257b1ff5ea80f feat(mcp): console error and faster wait (https://github.com/microsoft/playwright/pull/37618)
- https://github.com/microsoft/playwright/commit/2d33cddd44098ff9c479355152569e360497cf41 chore: do not rename video files outside --save-videos (https://github.com/microsoft/playwright/pull/37616)
- --save-video option
- --init-script option
- --allowed-hosts option
Full changelog
Features
-
https://github.com/microsoft/playwright/commit/c813e9cf5 feat(mcp): allow saving videos for sessions https://github.com/microsoft/playwright/issues/37531
# video is saved from the creation of the page to the closure of the context (browser_close call). npx @playwright/mcp --save-video=800x600 -
https://github.com/microsoft/playwright/commit/fff065816 feat(mcp): add --init-script option https://github.com/microsoft/playwright/issues/37507
# the code in web-mocks.js will run on page initialization npx @playwright/mcp --init-script=./web-mocks.js -
https://github.com/microsoft/playwright/commit/1313fbd47 chore(mcp): introduce allowed-hosts https://github.com/microsoft/playwright/issues/37541
# Runs MCP server only accessible on 192.168.1.10, defense from DNS rebind npx @playwright/mcp --allowed-hosts=192.168.1.10:8080 --port=8080
Bugfixes
- https://github.com/microsoft/playwright/commit/da333232e fix(mcp): snapshot for ai fixes https://github.com/microsoft/playwright/issues/37527
- https://github.com/microsoft/playwright/commit/499d084a5 fix(session): an extra check for session log https://github.com/microsoft/playwright/issues/37508
- https://github.com/microsoft/playwright/commit/2f820cb20 fix(mcp): lax file path sanitization https://github.com/microsoft/playwright/issues/37502
- Shared browser context support
Full changelog
https://github.com/microsoft/playwright/commit/afb59a0ec fix(mcp): tolerate malformed roots https://github.com/microsoft/playwright/issues/37492
https://github.com/microsoft/playwright/commit/0574514a0 feat(mcp): support shared browser context https://github.com/microsoft/playwright/issues/37463
- --grant-permissions option
- extension token via environment
Full changelog
https://github.com/microsoft/playwright/commit/29fb93479 fix(mcp): use single output dir https://github.com/microsoft/playwright/pull/37436
https://github.com/microsoft/playwright/commit/f07c8c0ac chore(mcp): --grant-permissions cli option https://github.com/microsoft/playwright/pull/37431
https://github.com/microsoft/playwright/commit/eb39131eb fix(mcp): --allowed/blocked-origins accept origins not hosts https://github.com/microsoft/playwright/pull/37408
https://github.com/microsoft/playwright/commit/b3d666428 chore: fetch roots lazily https://github.com/microsoft/playwright/pull/37399
https://github.com/microsoft/playwright/commit/4968bc611 chore(mcp): allow to pass extension token via env variable https://github.com/microsoft/playwright/pull/37371
- secrets management
- keyboard modifiers for clicks
- configurable timeouts
Full changelog
-
🔥 Secrets 🔥 - https://github.com/microsoft/playwright/commit/dea31d86d
When user prompts
"Authenticate using X-USERNAME / X-PASSWORD"the secret values for
X-USERNAMEandX-PASSWORDare not sent to the LLM.# secrets.env X-USERNAME=<secret_value> X-PASSWORD=<secret_value> -
Action and navigation timeouts can be configured to go beyond standard 5s/60s. - https://github.com/microsoft/playwright/commit/b37caaaf5
-
Clicks with keyboard modifiers - https://github.com/microsoft/playwright/commit/cc69e0773
"Shift+click the last todo item" -
Cdp connection headers for the browsers in the ☁️ https://github.com/microsoft/playwright/commit/3e4efe9d7
- verification tools
- custom executablePath support
Full changelog
b176111 chore: roll Playwright to latest (#971)
29d468d chore: add verification tools section (#957)
78298c3 chore: introduce verification tools (#951)
7fb8b0d fix: browser_tabs select action with index 0 failing due to falsy check (#964)
7774ad9 chore(extension): support custom executablePath (#947)
- navigate_forward command removed
- form filling tool
Full changelog
3d1a60b chore: introduce form filling tool (#935)
86eba22 chore: remove navigate_forward due to low usage counts (#934)
2521a67 chore: merge tabs tool into one (#933)
- Default Chrome profile connection
- Companion extension
Full changelog
🔥 Default profile support 🔥
Connect to the default Chrome profile using the companion extension
Fixes
91d5d24 chore: handle list roots in the server, with timeout (#898)
3f148a4 docs: add opencode installation instructions (#895)
53c6b6d fix: backtick quote escaping (#871)
24f81a7 fix: emit code for waitfor (#862)
Minor fixes and improvements.
Full changelog
16f3523 chore: do not return fullPage screenshots to the LLM (#849)
3f6837b fix: cursor does not respond to listRoots (#826)
a60d7b8 chore: slice profile dirs by root in vscode (#814)
2a86ac7 chore: use pngs by default for screenshots (#797)
f600234 chore: record user actions in the session log (#798)
- FullPage screenshot mode
- Streamable HTTP client default
- Experimental session logging
Full changelog
- 2bf57e2 chore: do not snapshot on fill (#767) - // speed up form filling
- a9b9fb8 chore: ping streaming HTTP client and disconnect on connection termination (#764)
- da8a244 chore: one tool experiment (#746) - // experimental encapsulate action in subagent loops
- b1a0f77 chore: save session log (#740) - // experimental log trajectory extensively via CLI --save-session
- 468c84e chore: move page state to tab, do not cache snapshot (#730) - // modal states are local to tabs now
- eeeab4f fix: browser_take_screenshot to not require snapshot unless element is specified (#725)
- 29711d0 chore: use streamable http by default (#716) - // /mcp is now recommended by default
- 1eee30f feat: add fullPage mode to browser_take_screenshot (#704)
- 29ac29e fix: no-sandbox flag logic to only disable sandbox when explicitly passed (#709)
- generate_test tool removed
- --vision flag replaced with --caps=vision
- browser_pdf_save moved to --caps=pdf capability
- browser_evaluate tool
- Console logs in tool results
- Page errors in console
Full changelog
What's new
- 🔥 browser_evaluate tool was added. Evaluate on element to read styles, attributes or globally to run code 012c906
- 💻 Recent console logs are included in the tool results. Agents no longer need to poll for console messages 5bfff0a
- 💻 Page errors are included in console messages a5a57df
- 🏷️ Right click for your userland context menus c97bc6e
- 🖱️ (x,y) - based mouse actions available as opt-in (run mcp server with
--caps=visionargument) d61aa16
Misc
- 9545473 chore: remove image reply special case in cursor
- 3061d9a chore: resolve dialog races
- da818d1 chore: make tab indexes 0-based
- fe0c0ff chore: mirror cli options w/ env vars
Breaking
- 825a97d chore: remove generate_test tool for now - We received mixed feedback on the tool, manually prompting to generate tests after actions is still the best practice
- d61aa16
--visionmode has been deprecated and turned into--caps=visioncapability - d61aa16
browser_pdf_savehas been moved into a separate capability, run mcp server with--caps=pdfargument.
- Double click action support
Changelog
7fca8f5 chore: roll Playwright to 1.54.1 (#665)
59f1d67 feat(dblclick): add double click (#654)
Minor fixes and improvements.
Full changelog
Issues fixed
- ElementHandle can only be created from FrameDispatcher #538
- Error with CSS selector #537
- MCP Server crashes when a simple button is clicked #524
Notable changes
- docs(readme): fix connection method call in programmatic usage example #532
- Include Cursor One-Click in README.md #531
- Add instructions for MCP server in Qodo Gen #530
- chore: roll playwright to Jun 10th, v1.53 #542
Minor fixes and improvements.
Full changelog
6567795 chore: respect server settings from config (#502)
eec177d chore: reuse browser in server mode (#495)
54ed7c3 chore: refactor server, prepare for browser reuse (#490)