Skip to content

Puppeteer MCP fails to launch Chromium in Ubuntu (WSL) due to sandbox/X display issues #819

Description

@lincbal4

Describe the Bug:
I'm running Claude Code in a Ubuntu (WSL) terminal inside VS Code. Whenever Claude Code attempts to use the installed Puppeteer MCP, I receive the following error:

MCP error -32603: Failed to launch the browser process! undefined
[34032:34032:0312/155258.924001:ERROR:zygote_host_impl_linux.cc(101)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://pptr.dev/troubleshooting

Steps to Reproduce:

  1. Open VS Code and launch the Ubuntu (WSL) terminal.
  2. Install the Puppeteer MCP with:
    claude mcp add puppeteer -- npx @modelcontextprotocol/server-puppeteer
  3. Start Claude Code by running:
    claude
  4. Notice that the MCP servers are listed as connected
  5. Use Puppeteer (e.g., navigate to http://localhost:3001/).
  6. The error regarding "Running as root without --no-sandbox" appears.

Expected Behavior:
I expect Puppeteer to launch Chromium successfully—ideally in headless mode or with the proper sandbox flags—so that the browser process starts without error.

Logs:
MCP error -32603: Failed to launch the browser process! undefined
[34032:34032:0312/155258.924001:ERROR:zygote_host_impl_linux.cc(101)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://pptr.dev/troubleshooting

Additional Context:

  • I'm using Ubuntu (WSL) within VS Code's terminal.
  • The Puppeteer MCP was installed using:
    claude mcp add puppeteer -- npx @modelcontextprotocol/server-puppeteer
  • I have tried removing and reinstalling the MCP server, and even attempted running as a non-root user (by creating a new user in WSL and re-adding the MCP).
  • I also attempted to force headless mode by setting the environment variable with:
    claude mcp add puppeteer -e DOCKER_CONTAINER=true -- npx @modelcontextprotocol/server-puppeteer
    but either I still get the sandbox error or, if it switches to headful mode, I get an error about a missing X server ($DISPLAY).
  • Both MCP servers (brave-search and puppeteer) are shown as connected, yet Puppeteer fails when used.

Any help resolving this issue would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions