Start Canary when --autoConnect is used, but Canary isn't running. #734
richardkmichael
started this conversation in
General
Replies: 2 comments 1 reply
-
|
Thanks a lot for this! //cc @OrKoN |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I think an autostart would be fine. It is a deliberate decision to only accept a remote connection on explicit user consent, so that's a no-go. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
--autoConnectfeature is handy, since I do occasionally have Canary running when I'm debugging myself.But, I don't always have it running before using the LLM, and so I'd like it to auto-start, and without asking me to "Accept remote debugging", for smoother workflow.
I wrote a small patch for this, but discovered it's an intentional design-decision to not auto-start.
If it's helpful for anyone, here's a fair amount of glue to make it happen.
.mcp.json
{ "mcpServers": { "chrome-devtools": { "type": "stdio", "command": "npx", "args": [ "chrome-devtools-mcp@latest", "--autoConnect", "--channel=canary", "--userDataDir=/path/to/.cache/chrome-devtools-mcp/chrome-profile-canary" ] } } }Chrome start script for the LLM: `chrome-canary.sh`
LLM instructions
Claude Code permissions (including the MCP)
{ "permissions": { "allow": [ "Bash(./chrome-canary.sh:*)", "mcp__chrome-devtools" ] }, "enabledMcpjsonServers": [ "chrome-devtools" ] }macOS osascript to compile for an app shortcut (Spotlight, etc.)
Beta Was this translation helpful? Give feedback.
All reactions