Feature Request: Environment variable to control default bringToFront behavior
Problem
When using Chrome DevTools MCP on macOS with multiple desktops/Spaces, the select_page tool brings Chrome to the front by default. This causes macOS to switch desktops, interrupting the user's workflow.
While the bringToFront parameter exists and can be set to false per-call, there's no way to configure this as a default behavior.
Proposed Solution
Add support for an environment variable like CHROME_DEVTOOLS_BRING_TO_FRONT=false that sets the default behavior for the bringToFront parameter.
This would allow users to configure it once in their MCP server config:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"],
"env": {
"CHROME_DEVTOOLS_BRING_TO_FRONT": "false"
}
}
}
}
Use Case
- Users on macOS with Chrome assigned to a separate desktop/Space
- AI coding assistants (Claude Code, Cursor, etc.) that interact with Chrome in the background
- Automated testing scenarios where window focus changes are disruptive
Current Workaround
Manually passing bringToFront: false on every select_page call, which requires the AI/tool to remember to do this consistently.
Thank you for considering this enhancement!
@OrKoN I think we are already working on this, right?
No, we are not. But the default for the bringToFront param is false and not true as the issue states. So I think there is a misunderstanding about the default behavior. I do not think we need a flag and especially not an environmental variable.