Skip to content

Releases: microsoft/playwright-mcp

v0.0.54

Choose a tag to compare

@yury-s yury-s released this 29 Dec 19:03
075397e

Bug Fixes

v0.0.53

Choose a tag to compare

@yury-s yury-s released this 20 Dec 02:32
0a6f1c4

Bug Fixes

v0.0.52

Choose a tag to compare

@yury-s yury-s released this 11 Dec 19:01
10c340c

Highlights

  • browser_run_code now takes a function and supports return statements.
  • browser_snapshot now accepts an optional filename parameter. 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.

v0.0.51

Choose a tag to compare

@pavelfeldman pavelfeldman released this 08 Dec 16:13
b717a2a

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.

v0.0.50

Choose a tag to compare

@pavelfeldman pavelfeldman released this 05 Dec 21:25
ff9544d

Maintenance release

v0.0.49

Choose a tag to compare

@pavelfeldman pavelfeldman released this 30 Nov 19:29
0fcb25d

Maintenance release

v0.0.48

Choose a tag to compare

@pavelfeldman pavelfeldman released this 21 Nov 22:35
64f65cc

Maintenance release

We are bringing back the --allow-origins flag! Please make sure you point at the trusted origins only.

v0.0.47

Choose a tag to compare

@pavelfeldman pavelfeldman released this 14 Nov 20:24
c016643

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-dir argument. This will persist all browser data between the sessions.
  • Start with a storage state file using the --storage-state argument. This will load cookies and local storage from the file into an isolated browser context.

For the page state, you can use:

  • ❗NEW❗ --init-page to 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-script to point to a JavaScript file that will be added as an initialization script. The script will be evaluated in every page before any of the page's scripts.
    This is useful for overriding browser APIs or setting up the environment.
// init-script.js
window.isPlaywrightMCP = true;

New run-code command to save tokens

There now is a new browser_run_code command that allows LLM to run Playwright APIs as well. LLM can call it with a batch of Playwright APIs:

{
    name: 'browser_run_code',
    arguments: {
      code: `
        await page.getByRole("checkbox", { name: "Accept" }).check();
        await page.getByRole("button", { name: "Submit" }).click();
      `;
    }
  }

This way LLM can speed up repetitive operations and save on context tokens.

Breaking changes

--allowed-origins and --blocked-origins flags are gone. Please use --proxy as a safer alternative or rely upon the underlying OS policies instead.

v0.0.46

Choose a tag to compare

@pavelfeldman pavelfeldman released this 07 Nov 21:56
8cc557d

Maintenance release

v0.0.45

Choose a tag to compare

@pavelfeldman pavelfeldman released this 31 Oct 23:15
e72701b

Maintenance release

  • fix(mcp): do not fail on wsl client w/ windows server - (#38063)