Add project .mcp.json to enable Chromium sandbox for Playwright MCP

Playwright MCP v0.0.70 defaults to launching Chrome with --no-sandbox
because its sandbox-inference code in playwright-core mcp/config.js
only sets the default when browser.browserName is explicitly 'chromium';
the MCP leaves it undefined, so the default-to-true branch is skipped
and Playwright core pushes --no-sandbox into chromeArguments.

Chrome surfaces this as a yellow warning bar on every Playwright-driven
tab. Setting PLAYWRIGHT_MCP_SANDBOX=true via the MCP server env forces
chromiumSandbox=true, which skips the --no-sandbox push and removes the
warning. The override is scoped to this project; the plugin's own
.mcp.json is unchanged.
This commit is contained in:
2026-04-17 17:30:02 +03:00
parent 2ae59d2074
commit bf873bb6f6
+11
View File
@@ -0,0 +1,11 @@
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"],
"env": {
"PLAYWRIGHT_MCP_SANDBOX": "true"
}
}
}
}