🚀 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:
- Setting
allowUnrestrictedFileAccess: true to bypass the _checkUrlAllowed protocol guard for chrome-extension://.
- Bypassing the default "chrome" channel by passing an empty string (
channel: "") to use the hermetic Chromium binary.
- 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
🚀 Feature Request
Support for loading Chrome extensions (e.g.,
--load-extension) directly and officially through the Playwright MCP configuration.While Playwright's core
chromium.launchPersistentContextfully 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:
allowUnrestrictedFileAccess: trueto bypass the_checkUrlAllowedprotocol guard forchrome-extension://.channel: "") to use the hermetic Chromium binary.assistantMode: true(which injects--disable-extensions) by usingignoreDefaultArgs: ['--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