Releases: microsoft/playwright-mcp
v0.0.68
v0.0.67
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.
v0.0.64
🕶️ 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-dataNew 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.
v0.0.63
🗄️ 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.jsonInspect 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-clearWork 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-clearPerfect 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,authorizationManage active routes:
> playwright-cli route-list
> playwright-cli unroute "**/*.jpg"
> playwright-cli unrouteUse 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-skillsOther
Browser installation (renamed)
> playwright-cli install-browserEphemeral browser contexts (renamed)
> playwright-cli config --in-memoryRenamed from --isolated to better reflect behavior:
- Browser profile lives only in memory
- Nothing persisted to disk
- Clean state on every run
v0.0.62
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.devCountless 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 --extensionShare the tab and have fun!
v0.0.61
- Internal: release the "mcp" binary and scope it to playwright in NPX world
v0.0.60
Bugfixes
- Fixing the Windows CLI
v0.0.59
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 --helpDemo
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-climanual
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.mdHeaded 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 --headedSessions
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-listYou 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 profilesCommands
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 windowNavigation
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 pageKeyboard
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 keyboardMouse
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 wheelSave as
playwright-cli screenshot [ref] # screenshot of the current page or element
playwright-cli pdf # save page as pdfTabs
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 tabDevTools
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 recordingv0.0.58
📣 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 --helpDemo
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-climanual
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.mdHeaded 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 --headedSessions
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-listYou 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 profilesCommands
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 windowNavigation
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 pageKeyboard
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 keyboardMouse
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 wheelSave as
playwright-cli screenshot [ref] # screenshot of the current page or element
playwright-cli pdf # save page as pdfTabs
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 tabDevTools
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