@playwright/mcp
0.0.86 · 18 Nov 2026Apache-2.011.3M / weekRepositoryHomepagenpmAtom feed
79 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
0.0.86
18 Nov 2026🗂️ Resume extension tab groups — the connection page now lets you select a whole tab group or several individual tabs, rather than one tab at a time. When a client disconnects, its group stays open and turns gray; select that group on the next connection to continue with the same tabs. The new Manage clients page replaces the status page and lists connected clients and their tabs, with controls to disconnect clients and rotate the token. Each tab has one owner, and dragging it between client groups transfers control. Browser-wide changes such as setting or clearing cookies and granting permissions are now refused, although clients can still read browser-wide data such as cookies. Requires the updated Playwright browser extension. (microsoft/playwright#44047)
🎨 Name and color extension sessions — distinguish clients working in the same browser with
--session-name <name>(configsessionName, envPLAYWRIGHT_MCP_SESSION_NAME) and--session-color <color>(configsessionColor, envPLAYWRIGHT_MCP_SESSION_COLOR) alongside--extension. Supported colors are blue, red, yellow, green, pink, purple, cyan and orange. Without overrides, new groups usePlaywright · <client name>and the first unused color. Requires the updated Playwright browser extension. (microsoft/playwright#44047)
Highlights
🗂️ Resume extension tab groups — the connection page now lets you select a whole tab group or several individual tabs, rather than one tab at a time. When a client disconnects, its group stays open and turns gray; select that group on the next connection to continue with the same tabs. The new Manage clients page replaces the status page and lists connected clients and their tabs, with controls to disconnect clients and rotate the token. Each tab has one owner, and dragging it between client groups transfers control. Browser-wide changes such as setting or clearing cookies and granting permissions are now refused, although clients can still read browser-wide data such as cookies. Requires the updated Playwright browser extension. (microsoft/playwright#44047)
🎨 Name and color extension sessions — distinguish clients working in the same browser with
--session-name <name>(configsessionName, envPLAYWRIGHT_MCP_SESSION_NAME) and--session-color <color>(configsessionColor, envPLAYWRIGHT_MCP_SESSION_COLOR) alongside--extension. Supported colors are blue, red, yellow, green, pink, purple, cyan and orange. Without overrides, new groups usePlaywright · <client name>and the first unused color. Requires the updated Playwright browser extension. (microsoft/playwright#44047)🐧 Install stable Chrome on Linux ARM64 — Playwright's Chrome installer now supports Linux ARM64 instead of rejecting that architecture. Install Chrome with
npx @playwright/mcp@0.0.86 install-browser chrometo use it with the server. (microsoft/playwright#44020)
Fixes
fix(mcp): keep downloads with the same filename— downloads triggered by browser tools no longer overwrite earlier files with the same suggested name. Collisions receive numeric suffixes, such asreport-1.pdf, including when the original file already exists. (microsoft/playwright#44011)fix(mcp): do not wait for busy pages longer than 10s when connecting over CDP— a tab with an unresponsive renderer no longer blocks--cdp-endpointconnections indefinitely; attachment to that page is limited to 10 seconds so responsive tabs remain usable (microsoft/playwright#44052). (microsoft/playwright#44105)fix(locator): select among visible elements in first/last/nth with locateOnlyVisible— withbrowser.contextOptions.locateOnlyVisible: true, targets and locators inbrowser_run_code_unsafeapply.first(),.last()and.nth()to the visible matches instead of selecting a hidden match and then filtering it out. Explicit visibility filters still take priority. (microsoft/playwright#44083)fix(mcp): validate run-code input—browser_run_code_unsafereturns an explicit error when neithercodenorfilenameis supplied (microsoft/playwright#44080). (microsoft/playwright#44087)fix(mcp): do not generate setFiles(undefined) when file chooser is cancelled— callingbrowser_file_uploadwithoutpathscancels the chooser without emitting invalid upload code or clearing the previously selected files (microsoft/playwright#44091). (microsoft/playwright#44104)fix(mcp): clarify browser_close closes all tabs— thebrowser_closedescription now states that it closes the browser and all open tabs, and its reported code isawait browser.close();rather thanpage.close(). This corrects the description and output, not the existing browser-wide behavior; usebrowser_tabswithaction: "close"to close one tab (#1864). (microsoft/playwright#44157)fix(mcp): suggest the matching FFmpeg installer for video recording— whenbrowser_start_video(opt-in via--caps=devtools) cannot find FFmpeg, its error retains the expected executable path and points tonpx @playwright/mcp install-browser ffmpeg. (microsoft/playwright#44088)fix(chromium): apply timezone to service workers— Chromium service workers now honorbrowser.contextOptions.timezoneId, keeping their dates and times consistent with the pages controlled by the server. (microsoft/playwright#44021)- Security
fix(docker): refresh the runtime image— the image now uses Ubuntu Noble with a pinned Node.js 26 runtime, installslibatomic1required by Node.js, and upgrades base packages during the build to pick up available security fixes. (#1852, #1857, #1866, #1867)
Upgrading
Node.js 20 or later is required. The package now declares the same minimum Node.js version as its Playwright dependencies, rather than advertising Node.js 18 support.
Configs that use
@playwright/mcp@latestpick this release up on the next client restart. To pin it:npx @playwright/mcp@0.0.86
0.0.85
9 Nov 2026Summary· from the note as AI read it
Read before upgrading: 2 changes to make.
Highlights
🌙 Keep the browser in the background (microsoft/playwright#42973) — connecting through the extension activated the tab and focused the browser window, taking the screen from the app you were working in. Pass
--backgroundalongside--extension(configbackground: true, envPLAYWRIGHT_MCP_BACKGROUND=1) to leave the connected tab inactive and its window unfocused, and to open the client's new tabs in the background. WithPLAYWRIGHT_MCP_EXTENSION_TOKENset, the connect page opens in the background too (Chrome 158.0.8127.2 or later, with the browser already running). Requires extension 0.5.0 or later. Chrome throttles timers and animation frames in background tabs. (microsoft/playwright#43864)🗂️ Leave tabs out of the Playwright tab group (microsoft/playwright#43038) — the extension always moved the tabs a client controls into its own tab group. Pass
--no-tab-groupalongside--extension(configtabGroup: false, envPLAYWRIGHT_MCP_NO_TAB_GROUP=1) to keep the selected tab and the tabs the client opens in their existing groups, if any. Connection approval is unchanged, each controlled tab still belongs to one client, and the extension's status page lists the controlled tabs. Requires extension 0.5.0 or later. (microsoft/playwright#43814)👁️ Match only visible elements (microsoft/playwright#43855) — a locator could resolve to a hidden element, or fail because a hidden duplicate matched as well. Set
browser.contextOptions.locateOnlyVisible: truein the config file to restrict locators to visible elements, both in thetargetof element tools such asbrowser_clickand inbrowser_run_code_unsafe, as if.filter({ visible: true })ended each of them. A locator that ends with its own visibility filter keeps it. Off by default. (microsoft/playwright#43903)🏷️ Keep container names in snapshots (microsoft/playwright#43809) — dialogs, landmarks and tables could appear unnamed even when their heading or caption was visible.
browser_snapshotnow retains identifying names on containers and table headers when the text supplying the name also appears among their children. (microsoft/playwright#43810)🎯 Find custom form controls by label (microsoft/playwright#43898) — native
<label>associations were ignored for form-associated custom elements. Element tools now recognize these controls through targets such asgetByLabel('City'), and accessible names use the associated labels too. Bothforattributes and nested labels are supported. (microsoft/playwright#43900)
Fixes
fix(aria): restore snapshot visibility rules for inert and modal content— the filtering announced in v0.0.84 is reverted:browser_snapshotno longer hides content solely because it is inert or outside a modal dialog. Click, fill and select actions still wait for explicitly inert targets to become non-inert (microsoft/playwright#43792). (microsoft/playwright#43850, microsoft/playwright#43851)fix(mcp): preserve non-JSON evaluation results—browser_evaluatereturns readable representations of values such as BigInt,NaN,Infinity,undefinedand circular objects instead of losing values or failing JSON serialization. JSON-compatible results keep their existing format (#1838). (microsoft/playwright#43973)fix(mcp): resolve config file paths relative to their source— profile, executable, storage-state, output and other file paths in a config resolve against that file's directory, or its target's directory for a symlink. CLI and environment paths remain relative to the working directory. Extension connections also honor the merged executable-path configuration (#1836). (microsoft/playwright#43970)fix(extension): report lost tab instead of crashing— tool responses report when a page closes before its snapshot can be captured. Extension connections also explain that Chrome may have detached the debugger because of an unsupported frame, rather than crashing response rendering (microsoft/playwright#43230). (microsoft/playwright#43863)fix(mcp): bound settle waits when page timers cannot run— tool calls no longer hang during their settling delay when page timers are throttled, paused or otherwise unable to run (microsoft/playwright#43752). (microsoft/playwright#43767)fix(mcp): report event listener exceptions as console errors— exceptions from page and context listeners installed throughbrowser_run_code_unsafeappear in tool responses andbrowser_console_messagesinstead of escaping as unhandled errors (microsoft/playwright#43770). (microsoft/playwright#43686)fix(mcp): validate device names and preserve device descriptors— unknown--devicevalues produce an explicit error, and per-client overrides no longer mutate shared device presets (#1834). (microsoft/playwright#43971)fix(mcp): report one-based console source lines— source locations inbrowser_console_messagesand console entries in tool responses now use editor-style line numbers starting at 1 (#1839). (microsoft/playwright#43975)fix(mcp): clarify screenshot actions with vision tools— thebrowser_take_screenshotdescription no longer rules out acting on a screenshot.browser_snapshotstays the default for actions; with--caps=vision, the description points to the coordinate-based mouse tools for elements that the snapshot does not expose, such as canvas content (#1816). (microsoft/playwright#43857)fix(aria): match mixed-case selected options in accessible names— snapshots and role locators include the selected option's text when a custom listbox uses a mixed-case value such asaria-selected="TRUE"(microsoft/playwright#43785). (microsoft/playwright#43787)fix(chromium): preserve fonts when connecting with noDefaults— extension connections no longer overwrite the existing browser's font settings, avoiding unexpected changes to page rendering (microsoft/playwright#43715). (microsoft/playwright#43773)fix(chromium): honor Linux config directories for channel connections— extension profile lookup respectsCHROME_USER_DATA_DIR,CHROME_CONFIG_HOMEandXDG_CONFIG_HOME. Channel-based--cdp-endpointconnections also use the WebSocket path advertised inDevToolsActivePort(microsoft/playwright#43880). (microsoft/playwright#43884)fix(chromium): preserve HTTP navigations across HTTPS upgrade modes— in browsers launched by the server,browser_navigatekeeps HTTP URLs on HTTP instead of Chrome automatically upgrading them to HTTPS (microsoft/playwright#43871). (microsoft/playwright#43877)fix(chromium): account for tabs and toolbar in the new headless mode— with--headless, Chrome and Edge now size their window to fit the viewport below the tab strip and toolbar, so videos frombrowser_start_video(opt-in via--caps=devtools) no longer lose the bottom of the page. (microsoft/playwright#43904)fix(screenshot): support full-page SVG documents—browser_take_screenshotwithfullPage: trueworks on standalone SVG documents instead of waiting for a nonexistent HTML body (microsoft/playwright#43962). (microsoft/playwright#43972)
0.0.84
31 Oct 2026👥 Separate sessions in one browser — work with multiple accounts without sharing their cookies or storage.
browser_tabswithaction: "new"now acceptsisolatedContext: "<name>": tabs with the same name share a context, while different names stay isolated. Omit it or use"default"for the default context. Cookie and storage tools operate on the current tab's context. (microsoft/playwright#43087)🙈 Redact runtime values in URLs (#1791) — session and grant values minted at runtime cannot be listed in a secrets file ahead of time.
--redact-url-params=access_token,code(configredactUrlParams, envPLAYWRIGHT_MCP_REDACT_URL_PARAMS) replaces the named query and fragment parameter values with<redacted>in tool responses. Likesecrets, this is a convenience, not a security feature. The extension also removes its connection token from the connect page URL after reading it. (microsoft/playwright#43258)🔎 Bound find results (microsoft/playwright#42077) — common search terms no longer have to fill the response with every match.
browser_findaccepts a positive integermaxResults, returns the first matching items with their context, and reports the total match count. Omit it to keep returning all matches; ancestor paths are unchanged. (microsoft/playwright#42947)
Highlights
👥 Separate sessions in one browser — work with multiple accounts without sharing their cookies or storage.
browser_tabswithaction: "new"now acceptsisolatedContext: "<name>": tabs with the same name share a context, while different names stay isolated. Omit it or use"default"for the default context. Cookie and storage tools operate on the current tab's context. (microsoft/playwright#43087)🙈 Redact runtime values in URLs (#1791) — session and grant values minted at runtime cannot be listed in a secrets file ahead of time.
--redact-url-params=access_token,code(configredactUrlParams, envPLAYWRIGHT_MCP_REDACT_URL_PARAMS) replaces the named query and fragment parameter values with<redacted>in tool responses. Likesecrets, this is a convenience, not a security feature. The extension also removes its connection token from the connect page URL after reading it. (microsoft/playwright#43258)🔎 Bound find results (microsoft/playwright#42077) — common search terms no longer have to fill the response with every match.
browser_findaccepts a positive integermaxResults, returns the first matching items with their context, and reports the total match count. Omit it to keep returning all matches; ancestor paths are unchanged. (microsoft/playwright#42947)🌐 Inspect requests across navigations (microsoft/playwright-cli#479) — requests from the previous page are no longer lost as soon as a flow navigates.
browser_network_requestsacceptsall: trueto include retained history, keeping up to 200 requests from earlier navigations. Request indexes stay stable across navigations forbrowser_network_request.browser_console_messagesalso reports counts consistent with its existingalloption. (microsoft/playwright#43526)🎯 Use locators in your language (#1797) — element tools such as
browser_clicknow accept JavaScript, Python, Java and C# locators intarget, alongside snapshot refs and CSS selectors. Invalid targets get an actionable error, including a reminder to pass the bare ref rather thanbutton [ref=e5]. (microsoft/playwright#43539)📂 Skip unsupported workspace-root requests (#1798) — clients that advertise roots but cannot answer
roots/listcan stall the first tool call. Pass--ignore-roots(configignoreRoots: true, envPLAYWRIGHT_MCP_IGNORE_ROOTS=true) to skip that request and use the server's current working directory as the workspace root. (microsoft/playwright#43532)🍪 Delete cookies by domain and path — deleting a cookie by name no longer has to remove every cookie with that name.
browser_cookie_delete(opt-in via--caps=storage) accepts optionaldomainandpathfilters to leave other domains and paths untouched. (microsoft/playwright#43319)
Fixes
fix(mcp): allow combining time, text and textGone in browser_wait_for— when combined with a text condition,timeis its timeout (capped at 30 seconds), not a delay before checking it. Supplying bothtextandtextGonenow waits for the first condition to happen, rather than both in sequence. (microsoft/playwright#43011)fix(mcp): allow loopback hosts by default for all bind addresses— HTTP clients can connect throughlocalhost,127.0.0.1or[::1]regardless of the bind address. Other hosts still require--allowed-hosts; binding to0.0.0.0prints a usable localhost URL. (microsoft/playwright#42993)fix(mcp): pass credentials from --proxy-server as proxy username/password— credentials embedded in the proxy URL are now passed to the browser as proxy authentication settings. (microsoft/playwright#43071)fix(mcp): race browser_navigate_back against modal states—browser_navigate_backreports a dialog opened during history navigation instead of timing out. (microsoft/playwright#43252)fix(mcp): normalize bare host URLs and loopback IP addresses—browser_navigatehandles scheme-less hosts with ports and uses HTTP for loopback addresses such as127.0.0.1:3000and[::1]:3000. (microsoft/playwright#43264)fix(mcp): do not close the browser twice when the client disconnects— stdio disconnects let the browser close gracefully instead of force-killing it through a second close request. Dashboard annotation processes also exit when their parent goes away. (microsoft/playwright#43174)fix(mcp): give each isolated client its own idle timer— with HTTP transport and--isolated, an idle client's context now expires even while another client keeps the shared browser busy. (microsoft/playwright#43527)fix(mcp): apply route headers without bypassing origin filters—browser_route(opt-in via--caps=network) matches added request header names case-insensitively, includes custom headers in mocked responses, and preserves origin filters and other routes when modifying request headers. (microsoft/playwright#43227, microsoft/playwright#43244, microsoft/playwright#43637)fix(mcp): correct cookie filtering and missing-domain errors—browser_cookie_list(opt-in via--caps=storage) matches domain and path boundaries instead of unrelated names such asnotexample.comor/apiary.browser_cookie_setasks for an explicitdomainwhen the current page has no hostname, such asabout:blank. (microsoft/playwright#43316, microsoft/playwright#43368, microsoft/playwright#43318)fix(mcp): accept Windows paths in browser_resume location—browser_resume(opt-in via--caps=devtools) no longer mistakes a Windows drive-letter colon for the line-number separator. (microsoft/playwright#43349)fix(mcp): report run-code route handler exceptions once and verbatim—browser_run_code_unsafereports a route handler's thrown value without duplicating it or wrapping non-Error values in another error. (microsoft/playwright#43203)fix(extension): release debugger when attach completes after connection close— disconnecting whilebrowser_tabsattaches to a new tab no longer leaves that tab attached to the extension's debugger. (microsoft/playwright#43025)fix(chromium): close pages that crashed before connecting over CDP— connecting through--cdp-endpointno longer stalls on an already crashed or discarded page; those pages are omitted from the tab list. (microsoft/playwright#43075)fix(aria): skip text nodes that are not rendered—browser_snapshotand accessible names omit unrendered text, including unslotted shadow-host text and text directly inside closed<details>. (microsoft/playwright#43150)fix(a11y): treat inert elements and content outside of modal dialogs as hidden— snapshots exclude inert content and content outside the topmost modal<dialog>. Click and fill actions wait for targets to stop being inert instead of silently misfiring. (microsoft/playwright#43211)fix(aria): do not count whitespace-only contributors as name sources— snapshots retain button names when whitespace around a hidden icon previously caused the name to disappear. (microsoft/playwright#43317)fix(aria): resolve label references consistently— snapshots and role locators recognize tab- or newline-separated label IDs and labels assigned throughariaLabelledByElements, while retaining attribute-based labels in older browsers. (microsoft/playwright#43361, microsoft/playwright#43577, microsoft/playwright#43722)fix(aria): quote ~, .inf and .nan in aria snapshots— YAML-like names remain strings rather than being parsed as null or special floating-point values. (microsoft/playwright#43469)fix(aria): preserve iframe snapshots with fallback text— snapshots retain an iframe's contents when the iframe element also contains fallback text. (microsoft/playwright#43635)fix(aria): match mixed-case roles and states— snapshots and role locators recognize mixed-caseroleand ARIA state values, including checked, pressed and expanded states. (microsoft/playwright#43727)
Upgrading
Configs that use
@playwright/mcp@latestpick this release up on the next client restart. To pin it:npx @playwright/mcp@0.0.84
0.0.83
28 Sep 2026browser_findtakesfilenameto save matches to a file instead of the response (microsoft/playwright#42077). (microsoft/playwright#42968)browser_navigateandbrowser_reloadreport a dialog opened during page load instead of timing out (microsoft/playwright#42817). (microsoft/playwright#42908)The server no longer crashes when the browser is closed during a download (microsoft/playwright#42831). (microsoft/playwright#42922)
Bug Fixes
browser_findtakesfilenameto save matches to a file instead of the response (microsoft/playwright#42077). (microsoft/playwright#42968)browser_navigateandbrowser_reloadreport a dialog opened during page load instead of timing out (microsoft/playwright#42817). (microsoft/playwright#42908)The server no longer crashes when the browser is closed during a download (microsoft/playwright#42831). (microsoft/playwright#42922)
browser_wait_forreports whentimeis capped at 30 seconds (#1767). (microsoft/playwright#42932)WebMCP tools no longer stay bound to a stale tab or frame (microsoft/playwright#42816). (microsoft/playwright#42821)
WebMCP tool calls work with Chromium 155+. (microsoft/playwright#42915)
Snapshots quote accessible names that look like regexes, e.g.
"/home/"(microsoft/playwright#42807). (microsoft/playwright#42811)The Docker image reaps orphaned browser processes (#1769).
0.0.82
18 Sep 2026🎬 Smooth 60 fps, styleable videos —
browser_start_video(opt-in via--caps=devtools) takesfps, sofps: 60records smooth 60 fps videos instead of the default 25, andcursor: truerenders an animated mouse cursor that travels to each action point and stays visible between actions.browser_video_show_actionstakes astylewithpoint,highlightandtitleCSS declarations; the action point marker and the target highlight are now only shown when styled. (microsoft/playwright#42752, microsoft/playwright#42758)🧰 WebMCP tools become real MCP tools — the tools a page registers through the WebMCP API now show up right in the tool list as
webmcp_<tool>, with the page's own input schema and annotations, so an agent can call them directly and let the page do the work instead of driving its UI. The list follows the current tab, and clients get atools/list_changednotification when it changes. This replacesbrowser_webmcp_list/browser_webmcp_callfrom v0.0.81, which are no longer exposed over MCP. Tool names, descriptions, schemas and results come from the page, so treat them as untrusted input. Pass--no-webmcp(configwebmcp: false, envPLAYWRIGHT_MCP_WEBMCP=false) to opt out. WebMCP is experimental, see WebMCP in Chrome for how to enable it. (microsoft/playwright#42671)🌗 Switch between light and dark color scheme (microsoft/playwright#42243) — an agent working on a dark theme had no way to see it mid-session. The new
browser_emulate_mediatool emulates media features on the fly:colorScheme,reducedMotion,forcedColors,contrastand themediatype (screen / print). Omitted parameters are left unchanged,nullclears an override. (microsoft/playwright#42668)
Highlights
🎬 Smooth 60 fps, styleable videos —
browser_start_video(opt-in via--caps=devtools) takesfps, sofps: 60records smooth 60 fps videos instead of the default 25, andcursor: truerenders an animated mouse cursor that travels to each action point and stays visible between actions.browser_video_show_actionstakes astylewithpoint,highlightandtitleCSS declarations; the action point marker and the target highlight are now only shown when styled. (microsoft/playwright#42752, microsoft/playwright#42758)🧰 WebMCP tools become real MCP tools — the tools a page registers through the WebMCP API now show up right in the tool list as
webmcp_<tool>, with the page's own input schema and annotations, so an agent can call them directly and let the page do the work instead of driving its UI. The list follows the current tab, and clients get atools/list_changednotification when it changes. This replacesbrowser_webmcp_list/browser_webmcp_callfrom v0.0.81, which are no longer exposed over MCP. Tool names, descriptions, schemas and results come from the page, so treat them as untrusted input. Pass--no-webmcp(configwebmcp: false, envPLAYWRIGHT_MCP_WEBMCP=false) to opt out. WebMCP is experimental, see WebMCP in Chrome for how to enable it. (microsoft/playwright#42671)🌗 Switch between light and dark color scheme (microsoft/playwright#42243) — an agent working on a dark theme had no way to see it mid-session. The new
browser_emulate_mediatool emulates media features on the fly:colorScheme,reducedMotion,forcedColors,contrastand themediatype (screen / print). Omitted parameters are left unchanged,nullclears an override. (microsoft/playwright#42668)📁 Absolute paths in results (microsoft/playwright#42497) — links to snapshots, screenshots, console logs and downloads are relative to the workspace root, which a client without one cannot resolve. Pass
--file-paths=absolute(configfilePaths: "absolute", envPLAYWRIGHT_MCP_FILE_PATHS=absolute) to get absolute paths instead. (microsoft/playwright#42673)
Fixes
fix(mcp): keep upload modal and reject bad headers— a failedbrowser_file_upload(e.g. a missing file) reports the error and keeps the file chooser open so it can be retried, andbrowser_route(opt-in via--caps=network) returns an error for a header that is not in theName: Valueform instead of setting a header named"". (microsoft/playwright#42713)fix(chromium): bypass service workers on the storage state page—browser_storage_state(opt-in via--caps=storage) no longer runs the site's own scripts, or fails when they redirect, for origins with an active service worker (microsoft/playwright#42656). (microsoft/playwright#42664, microsoft/playwright#42741)
Upgrading
Configs that use
@playwright/mcp@latestpick this release up on the next client restart. To pin it:npx @playwright/mcp@0.0.82
0.0.81
14 Sep 2026browser_webmcp_list/browser_webmcp_call— List and call the tools a page registers through the WebMCP API, letting the page do the work instead of driving its UI. When a page has WebMCP tools, the page status reports how many are available (#42613). WebMCP is experimental, see WebMCP in Chrome for how to enable it.New
--profile-dir-name <name>option (envPLAYWRIGHT_MCP_PROFILE_DIR_NAME) selects the Chrome profile to connect to in extension mode when the extension is installed in several profiles, for example"Profile 1"Headless browsers launched by the server are now closed after one hour without tool calls; the next tool call launches a new one. Use
--idle-timeout <ms>(configtimeouts.idle, envPLAYWRIGHT_MCP_IDLE_TIMEOUT) to change the timeout,0disables it. Headed and attached browsers are not closed unless a timeout is set explicitly (#42663, #42676)
What's New
New Tools
browser_webmcp_list/browser_webmcp_call— List and call the tools a page registers through the WebMCP API, letting the page do the work instead of driving its UI. When a page has WebMCP tools, the page status reports how many are available (#42613). WebMCP is experimental, see WebMCP in Chrome for how to enable it.
Other Changes
New
--profile-dir-name <name>option (envPLAYWRIGHT_MCP_PROFILE_DIR_NAME) selects the Chrome profile to connect to in extension mode when the extension is installed in several profiles, for example"Profile 1"Headless browsers launched by the server are now closed after one hour without tool calls; the next tool call launches a new one. Use
--idle-timeout <ms>(configtimeouts.idle, envPLAYWRIGHT_MCP_IDLE_TIMEOUT) to change the timeout,0disables it. Headed and attached browsers are not closed unless a timeout is set explicitly (#42663, #42676)--image-responsesacceptsonly: a response that carries an image consists of the image parts alone, without the text part
Bug Fixes
browser_closereturns an error when the browser context is shared (--shared-browser-context) instead of breaking the calling client's session. This supersedes the v0.0.80 change that dropped the backend afterbrowser_closeWith
--shared-browser-context,browser_start_recording/browser_stop_recording(opt-in via--caps=devtools) keep each client's recording separate instead of delivering one client's recorded actions to another (#42622, #42627)The file access check follows symlinks, so a symlink inside the workspace can no longer be used to read or write files outside the allowed roots
Explicitly named output files in a nested directory (e.g.
sub/shot.png) no longer fail withENOENT;browser_file_uploadandbrowser_dropresolve relative paths against the workspace rootIn extension mode with
PLAYWRIGHT_MCP_EXTENSION_TOKENset, a connection that never completes (e.g. the token belongs to another Chrome profile) now fails after 30 seconds with a hint instead of hanging the tool call foreverDisable the Chromium sandbox by default on Linux for the bundled Chromium build, which lacks the setuid sandbox helper
0.0.80
1 Sep 2026browser_start_recording/browser_stop_recording(opt-in via--caps=devtools) — Record actions that the user performs manually in the browser and return them as Playwright code. Useful when the user wants to demonstrate a flow instead of describing itThe default
--codegenlanguage is inferred from the environmentHonor
--user-data-dirin extension mode
What's New
New Tools
browser_start_recording/browser_stop_recording(opt-in via--caps=devtools) — Record actions that the user performs manually in the browser and return them as Playwright code. Useful when the user wants to demonstrate a flow instead of describing it
Bug Fixes
The default
--codegenlanguage is inferred from the environmentHonor
--user-data-dirin extension modeDo not treat orphaned browser preferences entries as an installed extension
browser_take_screenshotreturns the original screenshot bytes instead of silently downscaling them to model-specific limitsDrop the cached browser backend after
browser_closewith a shared browser context, so subsequent tool calls from the same client no longer failWhen connected to a remote endpoint,
browserInforeports the browser actually running remotely instead of the configured oneDo not clobber the
chromiumSandboxsetting from the config fileDo not run the heartbeat for HTTP clients that have not opened an event stream
The internal
/killkillkillendpoint is no longer registered outside of tests
0.0.79
6 Aug 2026- Removed
Removed the stale
--output-modeCLI option - Removed
Removed support for extension protocol v1
browser_take_screenshot— WebP format — Newtypeoption to pick the image format (png,jpegorwebp); when unset, the format is inferred from the filename extension
What's New
Tool Improvements
browser_take_screenshot— WebP format — Newtypeoption to pick the image format (png,jpegorwebp); when unset, the format is inferred from the filename extension--codegen— more languages — Code generation now supportspython,javaandcsharpin addition totypescriptConfigurable settle delay — New
--timeout-settleflag (andtimeouts.settleconfig option) to control how long to wait after each action for triggered work (navigations, requests) to settle, defaults to 500ms
Fixes
Aria snapshot capture is skipped when the response discards it
New
--snapshot-boxesflag (andsnapshot.boxesconfig option) to enable bounding boxes in snapshots globally — previously this was only available per commandReconnect to the browser after a disconnect
Report malformed JSON config instead of silently falling back to INI parsing
Clear the dialog modal state when a dialog is closed out of band
Detect downloads via the download event instead of guessing from
net::ERR_ABORTEDnavigation errorsSurface the missing executable path when a browser isn't installed
Escape user input in codegen output
- Removed
Removed the stale
--output-modeCLI option
Browser Extension
Validate
HostandOriginheaders on CDP relay WebSocket upgradesLaunch the Chrome profile that has the extension installed
Pass
noDefaultsfor extension CDP connectionsMention
PLAYWRIGHT_MCP_EXECUTABLE_PATHin the error shown when the browser executable is not found- Removed
Removed support for extension protocol v1
0.0.78
9 Jul 2026browser_find— Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref (#41605, #41654)Less verbose snapshots — Accessibility snapshots are distilled to reduce noise and token usage
Mobile & device emulation — New
--mobileflag and--deviceoption to emulate mobile devices from the CLI
What's New
New Tools
browser_find— Search the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref (#41605, #41654)
Tool Improvements
Less verbose snapshots — Accessibility snapshots are distilled to reduce noise and token usage
Mobile & device emulation — New
--mobileflag and--deviceoption to emulate mobile devices from the CLINavigation status —
browser_navigatenow surfaces non-2xx navigation status codes
Bug Fixes
browser_navigateno longer crashes the response when navigation closes the last tab (e.g. privileged pages likechrome://)Await page initialization before taking a screenshot immediately after opening
Enable the chromium sandbox for the default browser
Preserve the configured output directory for additional tab videos
Always pass
noDefaultsfor CDP connections so attaching no longer applies unwanted default context optionsClose the isolated HTTP client context on disconnect
Wait for the client event stream before sending server→client requests
0.0.77
29 Jun 2026browser_take_screenshot—scaleoption — Choose between CSS-pixel screenshots (smaller, device-consistent) and device-pixel screenshots (high resolution)Configurable heartbeat timeout — The heartbeat ping timeout is now configurable
Redact secrets in console log artifacts
What's New
Tool Improvements
browser_take_screenshot—scaleoption — Choose between CSS-pixel screenshots (smaller, device-consistent) and device-pixel screenshots (high resolution)Configurable heartbeat timeout — The heartbeat ping timeout is now configurable
Bug Fixes
Redact secrets in console log artifacts
Never include
data:URL payloads in snapshot or network outputList a failed network request only once
Wait for the next pause or context closure in
browser_resumePass the action timeout to
browser_wait_forwaitFor callsCheck the tracing state before stopping in
browser_stop_tracingAssign caps as an array for the legacy
--visionflagUse optional chaining for the nullable browser on disposal
Add a missing
.catch()on the sessionLog write queue
0.0.76
10 Jun 2026browser_video_show_actions/browser_video_hide_actions— Overlay action annotations on the recorded video, or hide them againRemote endpoint —
remoteEndpointnow accepts aConnectOptionsobject, not just a URL string--output-max-size— Cap the size of tool responses, with post-response disk eviction of oversized output
What's New
New Tools
browser_video_show_actions/browser_video_hide_actions— Overlay action annotations on the recorded video, or hide them again
Tool Improvements
Remote endpoint —
remoteEndpointnow accepts aConnectOptionsobject, not just a URL string--output-max-size— Cap the size of tool responses, with post-response disk eviction of oversized output--browser— Supportmoz-firefoxBiDi channels
Bug Fixes
Support
remoteHeadersfor the remote browser endpoint (#40828, #41156)Use
waitUntil: 'commit'when navigating back/forwardReport invalid tool arguments instead of failing opaquely
Use a writable cache directory for MCP user data instead of the browsers path
Disconnect the tracked browser when the browser tracker is disposed
Report a missing
ffmpegdistinctly from a missing browserDon't mark the response as closed when there are no open tabs
Validate user-provided regex patterns in MCP tools
Pass the
timeparameter topage.evaluatewhen waiting for a timeoutAdd path-traversal checks to static file serving routes
0.0.75
7 May 2026Serialize shared browser launch in
--isolatedmodeForward browser-level CDP commands in extension mode
0.0.74
6 May 2026The extension now supports managing multiple tabs when used with
--extensionbrowser_take_screenshot— Skip the base64 image in the response whenfilenameis explicitly providedAuto-recover when the remote browser disconnects mid-session
What's New
Browser Extension
The extension now supports managing multiple tabs when used with
--extension
Tool Improvements
browser_take_screenshot— Skip the base64 image in the response whenfilenameis explicitly provided
Bug Fixes
Auto-recover when the remote browser disconnects mid-session
Recover from page renderer crash
Anchor aria-ref regex in target resolution
Propagate abort signal to stop test execution
0.0.73
1 May 2026Playwright MCP is now published to the official MCP Registry on each release
Resolve extension
channelandexecutablePathfrom CLI flags and environment variablesPropagate
--browserchannel on the--extensionpath
What's New
Distribution
Playwright MCP is now published to the official MCP Registry on each release
Bug Fixes
Resolve extension
channelandexecutablePathfrom CLI flags and environment variablesPropagate
--browserchannel on the--extensionpathHandle null viewport in dashboard annotate-screenshot
0.0.72
30 Apr 2026browser_run_code→browser_run_code_unsafe— Renamed to make the sandbox-escape implication explicitSurface unhandled rejections in
browser_run_code_unsafeinstead of crashing the server
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
Bug Fixes
Surface unhandled rejections in
browser_run_code_unsafeinstead of crashing the serverDetect the installed extension in non-default Chrome profiles
Ignore browser config (channel, headless, viewport, etc.) when attaching to the extension
0.0.71
27 Apr 2026browser_drop— ExposeLocator.dropas an MCP tool for completing drag-and-drop operations onto a targetbrowser_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
What's New
New Tools
browser_drop— ExposeLocator.dropas an MCP tool for completing drag-and-drop operations onto a target
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
Browser Extension
Bug Fixes
Disable CDP timeout for extension connection so long handshakes don't fail
Ensure
--proxy-serveroverrides the proxy set in the config fileMerge user-supplied
ignoreDefaultArgswith persistent mode defaults instead of replacing them
0.0.70
1 Apr 2026Maintenance release off 1.59 branch point
0.0.69
30 Mar 2026browser_network_state_set— Toggle network offline mode for testing connectivity scenariosbrowser_video_chapter— Add a chapter marker to the video recording, showing a full-screen chapter card with blurred backdrop
What's New
New Tools
browser_network_state_set— Toggle network offline mode for testing connectivity scenariosbrowser_video_chapter— Add a chapter marker to the video recording, showing a full-screen chapter card with blurred backdrop
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 responsesNon-ref selectors — Tools now accept plain CSS/text selectors in addition to aria-ref handles
Other Changes
Added
mcpNamefield to package for MCP Registry ownership verificationChrome extension: inject public key into release zip to preserve Web Store extension ID
Bug Fixes
Fix verify tools not working inside iframes
Fix fs-based lock file not respected for Chromium family browsers
Fix console entries being printed when
--snapshot-mode=noneis setFix non-deterministic right-click behavior due to contextmenu/mouseup ordering
Fix header value parsing when header contains colons in value
Fix persistent context incorrectly using per-session isolation
Fix navigation protocol allowlist replaced with blocklist for better coverage
Fix malformed Unicode characters in MCP tool responses
Fix
toWellFormed()compatibility with Node.js 18Fix empty
cdpHeadersfrom environment overriding config file valuesFix file path validation in
browser_set_storage_statetoolFix Chrome for Testing executable location resolution in browser extension
Fix extension inactivity timers not armed for pending tabs
0.0.68
14 Feb 2026Revert
--no-sandbox→--no-chromium-sandboxrename.
The CLI flag name is restored to--no-sandbox.
0.0.67
14 Feb 2026Our Google Chrome extension is now available in the Chrome Web Store:
Playwright MCP BridgeRename
--[no-]sandboxto--[no-]chromium-sandboxfor clarity and to avoid ambiguity with other browsers.
0.0.64
6 Feb 2026Browser profiles are now in-memory by default — every session starts clean with no leftover state.
Incognito by default
Browser profiles are now in-memory by default — every session starts clean with no leftover state.
Use
--persistentto 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
--sessionflag 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.
0.0.63
4 Feb 2026Persisting login sessions
Debugging auth and feature flags
Sharing reproducible browser state across runs
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,authorizationManage 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 matchingAdvanced request handling with
run-codeFor 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
--isolatedto better reflect behavior:Browser profile lives only in memory
Nothing persisted to disk
Clean state on every run
0.0.62
31 Jan 2026Install Playwright browser extension
Infrastructure for Playwright CLI is in, so we are ready to cook the features and skills!
Lightning fast Playwright CLI executable (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=devtoolsflag 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!
0.0.61
26 Jan 2026Maintenance only: docs, tests, build or refactoring. Nothing changes in how you use it.
0.0.60
26 Jan 2026Fixing the Windows CLI
0.0.59
25 Jan 2026Support config file in
playwright-cli.jsonSupport environment configuration
Support non-Chrome browsers
Full Playwright CLI configuration
Support config file in
playwright-cli.jsonSupport environment configuration
Support non-Chrome browsers
See 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!
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 --helpon 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
--headedtoopen: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
--sessionto
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_SESSIONenvironment variable:PLAYWRIGHT_CLI_SESSION=todo-app claude .
Or instruct it to prepend
--sessionto 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
0.0.58
24 Jan 2026We 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.
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!
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 --helpon 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
--headedtoopen: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
--sessionto
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_SESSIONenvironment variable:PLAYWRIGHT_CLI_SESSION=todo-app claude .
Or instruct it to prepend
--sessionto 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
0.0.57
24 Jan 20260.0.56
16 Jan 2026Added
cdpTimeoutconfiguration option for CDP connections, allowing control over connection timeouts (default: 30s,0disables timeout).Improved error handling when browser launch fails:
0.0.55
9 Jan 2026- Security
MCP now enforces protocol and filesystem access restrictions by default:
- Security
Added
--allow-unrestricted-file-access(andallowUnrestrictedFileAccessconfig) to explicitly opt out, allowing: MCP-recorded videos are now saved under
outputDir/videos
0.0.53
20 Dec 2025Fixed persistence of
saveVideoin configs (#38621)Fixed issue with empty snapshots sometimes written into .md files (#38583)
Removed 50 MB upload limit when uploading files in the Playwright extension (github.com/microsoft/playwright/pull/38614)-
0.0.52
11 Dec 2025browser_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.
0.0.51
8 Dec 2025--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'.browser_console_messages now accepts
{ level: 'error' | 'warning' | 'info' | 'debug' }to include messages up to the given severity level.
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.
0.0.48
21 Nov 2025We are bringing back the
--allow-originsflag! Please make sure you point at the trusted origins only.0.0.47
14 Nov 2025Start 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.❗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.
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_codecommand 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-originsand--blocked-originsflags are gone. Please use--proxyas a safer alternative or rely upon the underlying OS policies instead.0.0.46
7 Nov 2025Fresh Playwright under the hood
Maintenance release
Fresh Playwright under the hood
0.0.44
24 Oct 20250.0.43
16 Oct 2025Incremental page snapshots:
pageStatenow supports diffs. Unchanged subtrees are collapsed as- ref=<id> [unchanged]. Reduces noise and payload size. microsoft/playwright#37795Encourage 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
0.0.41
1 Oct 20250.0.40
25 Sep 2025Features
c813e9c feat(mcp): allow saving videos for sessions #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
fff0658 feat(mcp): add --init-script option #37507
# the code in web-mocks.js will run on page initialization npx @playwright/mcp --init-script=./web-mocks.js
1313fbd chore(mcp): introduce allowed-hosts #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
0.0.38
18 Sep 20250.0.37
8 Sep 2025🔥 Secrets 🔥 - dea31d8
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. - b37caaa
Clicks with keyboard modifiers - cc69e07
"Shift+click the last todo item"
🔥 Secrets 🔥 - dea31d8
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. - b37caaa
Clicks with keyboard modifiers - cc69e07
"Shift+click the last todo item"
Cdp connection headers for the browsers in the ☁️ 3e4efe9
0.0.36
31 Aug 2025
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.