Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Nov 15, 2025

This PR contains the following updates:

Package Change Age Confidence
@playwright/mcp (source) 0.0.46 -> 0.0.47 age confidence

Release Notes

microsoft/playwright-mcp (@​playwright/mcp)

v0.0.47

Compare Source

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.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions
Copy link

🔒 MCP Security Scan Results

✅ playwright-mcp

  • Status: Passed
  • Tools scanned: 22
  • Result: No security issues detected

Summary: Scanned 1 MCP server(s), all passed security checks. ✅

@JAORMX JAORMX merged commit 8447547 into main Nov 17, 2025
12 checks passed
@JAORMX JAORMX deleted the renovate/playwright-mcp-0.x branch November 17, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants