Skip to content

[Feature]: Official support for loading extensions in Playwright MCP #39569

@hsm207

Description

@hsm207

🚀 Feature Request

Support for loading Chrome extensions (e.g., --load-extension) directly and officially through the Playwright MCP configuration.

While Playwright's core chromium.launchPersistentContext fully supports browser extensions, this functionality is currently undocumented and difficult to configure within the Playwright MCP server.

Example

A developer should be able to load an unpacked extension in the Playwright MCP configuration file like this:

{
  "browser": {
    "launchOptions": {
      "args": ["--disable-extensions-except=./dist", "--load-extension=./dist"]
    }
  }
}

Motivation

Playwright is a premier tool for browser automation and testing, and workflows like debugging extension-based tools require loading unpacked extensions.

In my investigation of the source code, I discovered that achieving this currently requires a complex, undocumented set of configurations:

  1. Setting allowUnrestrictedFileAccess: true to bypass the _checkUrlAllowed protocol guard for chrome-extension://.
  2. Bypassing the default "chrome" channel by passing an empty string (channel: "") to use the hermetic Chromium binary.
  3. Manually overriding the forced assistantMode: true (which injects --disable-extensions) by using ignoreDefaultArgs: ['--disable-extensions'].

I am unsure if this is the "official" or intended way to handle extensions in MCP. Making this a first-class, documented feature would bring the MCP server in line with the rest of the Playwright ecosystem.

References: See my original documentation discussion here: #39560

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions