Playwright
Multi-browser automation via Playwright — Chrome, Firefox, WebKit; richer than Puppeteer.
39,524 stars 3,423 forks Last commit today Language TypeScript License MIT
Install
npm install -g @playwright/mcp Maintain this server? Add the badge
Show your README readers it's in a curated directory — and give them a one-click path to install docs and config.
Markdown
[](https://prismix.dev/mcp/playwright) Theme-aware version (auto dark/light on GitHub) →
<a href="https://prismix.dev/mcp/playwright"><picture><source media="(prefers-color-scheme: dark)" srcset="https://prismix.dev/api/badge/mcp/playwright.svg?theme=dark"><img alt="Listed on Prismix" src="https://prismix.dev/api/badge/mcp/playwright.svg"></picture></a> Claude Desktop / Cursor config
Drop into your claude_desktop_config.json or Cursor MCP settings. Replace the ${…} placeholders with your own values.
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest"]
}
}
} About
Microsoft's official Playwright-based MCP server. Same shape as the Puppeteer reference server but with multi-browser support (Chrome, Firefox, WebKit), proper iframe + popup handling, and built-in trace recording for debugging.
Recent releases (5)
All releases →- v0.0.85 Latest Nov 9, 2026
## ✨ Highlights - **🌙 Keep the browser in the background** ([microsoft/playwright#42973](https://github.com/microsoft/playwright/issues/42973)) — connecting through the extension activated the tab and focused the browser window, taking the screen from the app you were working in. Pass `--background` alongside `--extension` (config `background: true`, env `PLAYWRIGHT_MCP_BACKGROUND=1`) to leave the connected tab inactive and its window unfocused, and to open the client's new tabs in the background. With `PLAYWRIGHT_MCP_EXTENSION_TOKEN` set, 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](https://github.com/microsoft/playwright/pull/43864)) - **🗂️ Leave tabs out of the Playwright tab group** ([microsoft/playwright#43038](https://github.com/microsoft/playwright/issues/43038)) — the extension always moved the tabs a client controls into its own tab group. Pass `--no-tab-group` alongside `--extension` (config `tabGroup: false`, env `PLAYWRIGHT_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](https://github.com/microsoft/playwright/pull/43814)) - **👁️ Match only visible elements** ([microsoft/playwright#43855](https://github.com/microsoft/playwright/issues/43855)) — a locator could resolve to a hidden element, or fail because a hidden duplicate matched as well. Set `browser.contextOptions.locateOnlyVisible: true` in the config file to restrict locators to visible elements, both in the `target` of element tools such as `browser_click` and in `browser_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](https://github.com/microsoft/playwright/pull/43903)) - **🏷️ Keep container names in snapshots** ([microsoft/playwright#43809](https://github.com/microsoft/playwright/issues/43809)) — dialogs, landmarks and tables could appear unnamed even when their heading or caption was visible. `browser_snapshot` now retains identifying names on containers and table headers when the text supplying the name also appears among their children. ([microsoft/playwright#43810](https://github.com/microsoft/playwright/pull/43810)) - **🎯 Find custom form controls by label** ([microsoft/playwright#43898](https://github.com/microsoft/playwright/issues/43898)) — native `<label>` associations were ignored for form-associated custom elements. Element tools now recognize these controls through targets such as `getByLabel('City')`, and accessible names use the associated labels too. Both `for` attributes and nested labels are supported. ([microsoft/playwright#43900](https://github.com/microsoft/playwright/pull/43900)) ## 🐛 Fixes - `fix(aria): restore snapshot visibility rules for inert and modal content` — the filtering announced in v0.0.84 is reverted: `browser_snapshot` no 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](https://github.com/microsoft/playwright/issues/43792)). ([microsoft/playwright#43850](https://github.com/microsoft/playwright/pull/43850), [microsoft/playwright#43851](https://github.com/microsoft/playwright/pull/43851)) - `fix(mcp): preserve non-JSON evaluation results` — `browser_evaluate` returns readable representations of values such as BigInt, `NaN`, `Infinity`, `undefined` and circular objects instead of losing values or failing JSON serialization. JSON-compatible results keep their existing format (View on GitHub ↗ - v0.0.84 Oct 31, 2026
## ✨ Highlights - **👥 Separate sessions in one browser** — work with multiple accounts without sharing their cookies or storage. `browser_tabs` with `action: "new"` now accepts `isolatedContext: "<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](https://github.com/microsoft/playwright/pull/43087)) - **🙈 Redact runtime values in URLs** ([#1791](https://github.com/microsoft/playwright-mcp/issues/1791)) — session and grant values minted at runtime cannot be listed in a secrets file ahead of time. `--redact-url-params=access_token,code` (config `redactUrlParams`, env `PLAYWRIGHT_MCP_REDACT_URL_PARAMS`) replaces the named query and fragment parameter values with `<redacted>` in tool responses. Like `secrets`, 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](https://github.com/microsoft/playwright/pull/43258)) - **🔎 Bound find results** ([microsoft/playwright#42077](https://github.com/microsoft/playwright/issues/42077)) — common search terms no longer have to fill the response with every match. `browser_find` accepts a positive integer `maxResults`, 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](https://github.com/microsoft/playwright/pull/42947)) - **🌐 Inspect requests across navigations** ([microsoft/playwright-cli#479](https://github.com/microsoft/playwright-cli/issues/479)) — requests from the previous page are no longer lost as soon as a flow navigates. `browser_network_requests` accepts `all: true` to include retained history, keeping up to 200 requests from earlier navigations. Request indexes stay stable across navigations for `browser_network_request`. `browser_console_messages` also reports counts consistent with its existing `all` option. ([microsoft/playwright#43526](https://github.com/microsoft/playwright/pull/43526)) - **🎯 Use locators in your language** ([#1797](https://github.com/microsoft/playwright-mcp/issues/1797)) — element tools such as `browser_click` now accept JavaScript, Python, Java and C# locators in `target`, alongside snapshot refs and CSS selectors. Invalid targets get an actionable error, including a reminder to pass the bare ref rather than `button [ref=e5]`. ([microsoft/playwright#43539](https://github.com/microsoft/playwright/pull/43539)) - **📂 Skip unsupported workspace-root requests** ([#1798](https://github.com/microsoft/playwright-mcp/issues/1798)) — clients that advertise roots but cannot answer `roots/list` can stall the first tool call. Pass `--ignore-roots` (config `ignoreRoots: true`, env `PLAYWRIGHT_MCP_IGNORE_ROOTS=true`) to skip that request and use the server's current working directory as the workspace root. ([microsoft/playwright#43532](https://github.com/microsoft/playwright/pull/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 optional `domain` and `path` filters to leave other domains and paths untouched. ([microsoft/playwright#43319](https://github.com/microsoft/playwright/pull/43319)) ## 🐛 Fixes - `fix(mcp): allow combining time, text and textGone in browser_wait_for` — when combined with a text condition, `time` is its timeout (capped at 30 seconds), not a delay before checking it. Supplying both `text` and `textGone` now waits for the first condition to happen, rather than both in sequence. ([microsoft/playwright#43011](https://github.com/microsoft/playwright/pull/43011)) - `fix(mcp): allow loopback hosts by default for all bind addresses` — HTTP clients can connect through `loc
View on GitHub ↗ - v0.0.83 Sep 28, 2026
## Bug Fixes - `browser_find` takes `filename` to save matches to a file instead of the response ([microsoft/playwright#42077](https://github.com/microsoft/playwright/issues/42077)). ([microsoft/playwright#42968](https://github.com/microsoft/playwright/pull/42968)) - `browser_navigate` and `browser_reload` report a dialog opened during page load instead of timing out ([microsoft/playwright#42817](https://github.com/microsoft/playwright/issues/42817)). ([microsoft/playwright#42908](https://github.com/microsoft/playwright/pull/42908)) - The server no longer crashes when the browser is closed during a download ([microsoft/playwright#42831](https://github.com/microsoft/playwright/issues/42831)). ([microsoft/playwright#42922](https://github.com/microsoft/playwright/pull/42922)) - `browser_wait_for` reports when `time` is capped at 30 seconds ([#1767](https://github.com/microsoft/playwright-mcp/issues/1767)). ([microsoft/playwright#42932](https://github.com/microsoft/playwright/pull/42932)) - WebMCP tools no longer stay bound to a stale tab or frame ([microsoft/playwright#42816](https://github.com/microsoft/playwright/issues/42816)). ([microsoft/playwright#42821](https://github.com/microsoft/playwright/pull/42821)) - WebMCP tool calls work with Chromium 155+. ([microsoft/playwright#42915](https://github.com/microsoft/playwright/pull/42915)) - Snapshots quote accessible names that look like regexes, e.g. `"/home/"` ([microsoft/playwright#42807](https://github.com/microsoft/playwright/issues/42807)). ([microsoft/playwright#42811](https://github.com/microsoft/playwright/pull/42811)) - The Docker image reaps orphaned browser processes ([#1769](https://github.com/microsoft/playwright-mcp/issues/1769)). ([#1771](https://github.com/microsoft/playwright-mcp/pull/1771))
View on GitHub ↗ - v0.0.82 Sep 18, 2026
## ✨ Highlights - **🎬 Smooth 60 fps, styleable videos** — `browser_start_video` (opt-in via `--caps=devtools`) takes `fps`, so `fps: 60` records smooth 60 fps videos instead of the default 25, and `cursor: true` renders an animated mouse cursor that travels to each action point and stays visible between actions. `browser_video_show_actions` takes a `style` with `point`, `highlight` and `title` CSS declarations; the action point marker and the target highlight are now only shown when styled. ([microsoft/playwright#42752](https://github.com/microsoft/playwright/pull/42752), [microsoft/playwright#42758](https://github.com/microsoft/playwright/pull/42758)) - **🧰 WebMCP tools become real MCP tools** — the tools a page registers through the [WebMCP](https://webmachinelearning.github.io/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 a `tools/list_changed` notification when it changes. This replaces `browser_webmcp_list` / `browser_webmcp_call` from 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` (config `webmcp: false`, env `PLAYWRIGHT_MCP_WEBMCP=false`) to opt out. WebMCP is experimental, see [WebMCP in Chrome](https://developer.chrome.com/docs/ai/webmcp) for how to enable it. ([microsoft/playwright#42671](https://github.com/microsoft/playwright/pull/42671)) - **🌗 Switch between light and dark color scheme** ([microsoft/playwright#42243](https://github.com/microsoft/playwright/issues/42243)) — an agent working on a dark theme had no way to see it mid-session. The new **`browser_emulate_media`** tool emulates media features on the fly: `colorScheme`, `reducedMotion`, `forcedColors`, `contrast` and the `media` type (screen / print). Omitted parameters are left unchanged, `null` clears an override. ([microsoft/playwright#42668](https://github.com/microsoft/playwright/pull/42668)) - **📁 Absolute paths in results** ([microsoft/playwright#42497](https://github.com/microsoft/playwright/issues/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` (config `filePaths: "absolute"`, env `PLAYWRIGHT_MCP_FILE_PATHS=absolute`) to get absolute paths instead. ([microsoft/playwright#42673](https://github.com/microsoft/playwright/pull/42673)) ## 🐛 Fixes - `fix(mcp): keep upload modal and reject bad headers` — a failed `browser_file_upload` (e.g. a missing file) reports the error and keeps the file chooser open so it can be retried, and `browser_route` (opt-in via `--caps=network`) returns an error for a header that is not in the `Name: Value` form instead of setting a header named `""`. ([microsoft/playwright#42713](https://github.com/microsoft/playwright/pull/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](https://github.com/microsoft/playwright/issues/42656)). ([microsoft/playwright#42664](https://github.com/microsoft/playwright/pull/42664), [microsoft/playwright#42741](https://github.com/microsoft/playwright/pull/42741)) ## 📦 Upgrading Configs that use `@playwright/mcp@latest` pick this release up on the next client restart. To pin it: ```bash npx @playwright/[email protected] ```
View on GitHub ↗ - v0.0.81 Sep 14, 2026
## What's New ### 🎉 New Tools - **`browser_webmcp_list` / `browser_webmcp_call`** — List and call the tools a page registers through the [WebMCP](https://webmachinelearning.github.io/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](https://github.com/microsoft/playwright/pull/42613)). WebMCP is experimental, see [WebMCP in Chrome](https://developer.chrome.com/docs/ai/webmcp) for how to enable it. ### Other Changes - New `--profile-dir-name <name>` option (env `PLAYWRIGHT_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"` ([#42527](https://github.com/microsoft/playwright/pull/42527)) - 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>` (config `timeouts.idle`, env `PLAYWRIGHT_MCP_IDLE_TIMEOUT`) to change the timeout, `0` disables it. Headed and attached browsers are not closed unless a timeout is set explicitly ([#42663](https://github.com/microsoft/playwright/pull/42663), [#42676](https://github.com/microsoft/playwright/pull/42676)) - `--image-responses` accepts `only`: a response that carries an image consists of the image parts alone, without the text part ([#42672](https://github.com/microsoft/playwright/pull/42672)) ## Bug Fixes - `browser_close` returns 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 after `browser_close` ([#42495](https://github.com/microsoft/playwright/pull/42495)) - With `--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](https://github.com/microsoft/playwright/pull/42622), [#42627](https://github.com/microsoft/playwright/pull/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 ([#42628](https://github.com/microsoft/playwright/pull/42628)) - Explicitly named output files in a nested directory (e.g. `sub/shot.png`) no longer fail with `ENOENT`; `browser_file_upload` and `browser_drop` resolve relative paths against the workspace root ([#42540](https://github.com/microsoft/playwright/pull/42540)) - In extension mode with `PLAYWRIGHT_MCP_EXTENSION_TOKEN` set, 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 forever ([#42525](https://github.com/microsoft/playwright/pull/42525)) - Disable the Chromium sandbox by default on Linux for the bundled Chromium build, which lacks the setuid sandbox helper ([#42490](https://github.com/microsoft/playwright/pull/42490))
View on GitHub ↗
Discussion (0)
Sign in to comment →No comments yet. Sign in to start the discussion.