Chrome-Devtools-MCP Error on Linux
What version of Codex is running?
0.46.0
Which model were you using?
gpt-5-codex high
What platform is your computer?
Linux 5.15.146.1-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
Attempting to open Chrome DevTools through the Codex CLI with a headful browser immediately fails. The runtime lacks an X server, so Chromium can’t create a display. The DevTools API returns: Missing X server to start the headful browser. Either set headless to true or use xvfb-run to run your Puppeteer script.
What is the expected behavior?
output form claude code :
● I'll list the pages currently open in Chrome for you.
⎿ # list_pages response
## Pages
0: about:blank [selected]
What do you see instead?
Called chrome-devtools.list_pages({}) └ Missing X server to start the headful browser. Either set headless to true or use xvfb-run to run your Puppeteer script.
Additional information
No response
I don't think this is Codex related but if it works in another agentic coding tool and not in Codex, feel free to reopen.
Same thing happens to me as well, I can use chrome-devtools with copilot and claude code but not with codex
Same thing here - works in Gemini and Claude Code, but reports the aforementioned error in Codex CLI (Full Permissions granted).
Could it be related to sandboxing? https://github.com/openai/codex/issues/1124 ?
But there are no more .ts code its written so it could be related to https://github.com/openai/codex/blob/774892c6d7ddbe55bf8862748f9507b03b75c92f/codex-rs/core/src/landlock.rs#L16
- Configure the
browser-urlparameter for chrome-devtools mcp - Run the following command to open Chrome. nohup google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug-headful --no-first-run --disable-gpu about:blank >/tmp/chrome-launch.log 2>&1 & A workaround to bypass the codex sandbox, even when I use --yolo.
I was able to get the following successful result form the Chrome MCP using the prompt:
Please check the LCP of web.dev.
which was suggested by their docs. Could somebody provide more specific set of examples/cases of what isn't working.
The Chrome MCP server is what will execute its chrome commands, not our sandboxed exec tool so the sandbox shouldn't be in play here.
same thing on ubuntu
same thing on ubuntu
Does it work with other coding agents?
Same thing on Linux Mint, works fine with Claude Code
LMDE7 is the same; both Codex and Claude Code have this issue.
Same thing here - works in Gemini and Claude Code, but reports the aforementioned error in Codex CLI (Full Permissions granted).
- Configure the
browser-urlparameter for chrome-devtools mcp- Run the following command to open Chrome. nohup google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug-headful --no-first-run --disable-gpu about:blank >/tmp/chrome-launch.log 2>&1 & A workaround to bypass the codex sandbox, even when I use --yolo.
Thanks, It worked
@LittleTurtle2333 are you also on Linux?
@LittleTurtle2333 are you also on Linux?
Yes, I also use a Linux-based system.
- Configure the
browser-urlparameter for chrome-devtools mcp- Run the following command to open Chrome. nohup google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug-headful --no-first-run --disable-gpu about:blank >/tmp/chrome-launch.log 2>&1 & A workaround to bypass the codex sandbox, even when I use --yolo.
Thanks, It worked
What parameter should be used for the browser-url?
Just gotta it: "--browser-url=http://127.0.0.1:9222"
Using the following to set up the mcp seems to work
[mcp_servers.chrome-devtools] command = "bash" args = [ "-lc", "DISPLAY=:1 XAUTHORITY=$HOME/.Xauthority npx -y chrome-devtools-mcp@latest --isolated" ]
[mcp_servers.chrome-devtools]
command = "npx"
args = ["chrome-devtools-mcp@latest", "--executablePath", "/usr/bin/chromium", "--headless", "--isolated"]
env = {}
This is what worked for me on opensuse. It seems to work fine with headless.
I have same issue on wayland ... seem like mcp exec in sandbox and no idea to lanuch chrome
Same issue on wayland. I'm using Manjaro.