Releases: microsoft/playwright-mcp
Releases · microsoft/playwright-mcp
Release list
v0.0.54
Bug Fixes
- MCP extension now only connects to MCP server running on the same machine (microsoft/playwright#38626)
v0.0.53
Bug Fixes
- Fixed persistence of
saveVideoin configs (microsoft/playwright#38621) - Fixed issue with empty snapshots sometimes written into .md files (microsoft/playwright#38583)
- Removed 50 MB upload limit when uploading files in the Playwright extension (microsoft/playwright#38614
v0.0.52
Highlights
- browser_run_code now takes a function and supports
returnstatements. - browser_snapshot now accepts an optional
filenameparameter. When provided, the snapshot is saved to disk and a link appears in the Files section. This avoids inlining large snapshots and keeps MCP payloads smaller.
v0.0.51
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
v0.0.49
v0.0.48
Maintenance release
We are bringing back the --allow-origins flag! Please make sure you point at the trusted origins only.
v0.0.47
New ways to provide initial state
There are now multiple ways to provide the initial state to the browser context or a page.
For the storage state, you can either:
- Start with a user data directory using the
--user-data-dirargument. This will persist all browser data between the sessions. - Start with a storage state file using the
--storage-stateargument. This will load cookies and local storage from the file into an isolated browser context.
For the page state, you can use:
- ❗NEW❗
--init-pageto point to a TypeScript file that will be evaluated on the Playwright page object. This allows you to run arbitrary code to set up the page. You can use various Playwright APIs there, perform necessary steps, etc.
// init-page.ts
export default async ({ page }) => {
await page.context().grantPermissions(['geolocation']);
await page.context().setGeolocation({ latitude: 37.7749, longitude: -122.4194 });
await page.setViewportSize({ width: 1280, height: 720 });
};--init-scriptto point to a JavaScript file that will be added as an initialization script. The script will be evaluated in every page before any of the page's scripts.
This is useful for overriding browser APIs or setting up the environment.
// init-script.js
window.isPlaywrightMCP = true;New run-code command to save tokens
There now is a new browser_run_code command that allows LLM to run Playwright APIs as well. LLM can call it with a batch of Playwright APIs:
{
name: 'browser_run_code',
arguments: {
code: `
await page.getByRole("checkbox", { name: "Accept" }).check();
await page.getByRole("button", { name: "Submit" }).click();
`;
}
}This way LLM can speed up repetitive operations and save on context tokens.
Breaking changes
--allowed-origins and --blocked-origins flags are gone. Please use --proxy as a safer alternative or rely upon the underlying OS policies instead.
v0.0.46
Maintenance release
- fresh Playwright under the hood
- chore(mcp): log tool responses for debugging - microsoft/playwright#38110
v0.0.45
Maintenance release
- fix(mcp): do not fail on wsl client w/ windows server - (#38063)