chrome-devtools MCP ignores user-specified command, args, and env configuration
Description
When using the chrome-devtools MCP server, Claude Code completely ignores the user-specified command, args, and env fields in the configuration. It always spawns npm exec chrome-devtools-mcp@latest with no additional arguments, regardless of what is configured.
This makes it impossible to run multiple Chrome DevTools MCP instances in parallel (e.g., across git worktrees), since every instance attempts to use the same default Chrome profile directory ($HOME/.cache/chrome-devtools-mcp/chrome-profile).
Steps to Reproduce
- Configure chrome-devtools MCP in
~/.claude.jsonwith custom--userDataDir:
{
"projects": {
"/path/to/worktree-1": {
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest", "--userDataDir", "/custom/path/chrome-profile-wt1"],
"env": {
"HOME": "/custom/home"
}
}
}
}
}
}
- Start Claude Code in the worktree
- Run
/mcpto connect - Observe that the spawned process is always
npm exec chrome-devtools-mcp@latest— without--userDataDir, without customenv
What Was Tried (All Ignored)
| Approach | Result |
|----------|--------|
| args with --userDataDir /path (separate args) | Ignored |
| args with --userDataDir=/path (= syntax) | Ignored |
| command set to sh, args ["-c", "npx -y chrome-devtools-mcp@latest --userDataDir /path"] | Ignored |
| command set to absolute path of a wrapper script | Ignored |
| Renaming MCP server key to chrome-devtools-wt1 | Ignored (still reconnects to chrome-devtools) |
| Adding env.HOME field | Ignored (HOME remains unchanged in process) |
| .mcp.json in project root with custom config | Ignored |
Verified by inspecting the actual spawned process:
$ ps aux | grep chrome-devtools-mcp | grep node
npm exec chrome-devtools-mcp@latest # <-- no --userDataDir, no custom args
And checking the process environment:
$ ps eww -p <PID> | tr ' ' '\n' | grep "^HOME="
HOME=/Users/byron # <-- not the custom HOME from env config
Expected Behavior
Claude Code should respect the user-specified command, args, and env fields for the chrome-devtools MCP server, the same way it does for other MCP servers. This would allow:
- Running multiple Chrome DevTools instances with separate
--userDataDirpaths - Connecting to pre-launched Chrome via
--browserUrl - Using
--isolatedmode - Any other chrome-devtools-mcp CLI options
Use Case
Running multiple Claude Code sessions in parallel using git worktrees, each needing its own Chrome DevTools browser instance for testing/verification. Currently, only one session can use chrome-devtools MCP at a time because all sessions fight over the same default Chrome profile.
Environment
- Claude Code version: latest (as of 2025-03-04)
- chrome-devtools-mcp:
@latestvia npx - OS: macOS (Darwin 25.2.0)
- Node: v22.x, npm 10.9.0
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗