From bf873bb6f692829d9100323743ec91fe267c612a Mon Sep 17 00:00:00 2001 From: gnezim Date: Fri, 17 Apr 2026 17:30:02 +0300 Subject: [PATCH] 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. --- .mcp.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .mcp.json diff --git a/.mcp.json b/.mcp.json new file mode 100644 index 00000000..013eb3c4 --- /dev/null +++ b/.mcp.json @@ -0,0 +1,11 @@ +{ + "mcpServers": { + "playwright": { + "command": "npx", + "args": ["@playwright/mcp@latest"], + "env": { + "PLAYWRIGHT_MCP_SANDBOX": "true" + } + } + } +}