Why Chrome DevTools MCP Keeps Asking to Allow Remote Debugging
The dialog is not a bug and your config is not broken. Since Chrome 144, any outside program that wants to attach to the browser you are already using has to ask, every time. Once you see what it is guarding, the fix becomes a different question: which browser profile should the agent own?
- Chrome for Developers, “Let your coding agent debug your browser session”: introduces the consent flow added in Chrome M144 and states that Chrome shows a dialog every time the server requests a remote debugging session.
https://developer.chrome.com/blog/chrome-devtools-mcp-debug-your-browser-session - chrome-devtools-mcp, docs/configuration.md: definitions and defaults for
--autoConnect,--browserUrl,--wsEndpoint,--userDataDirand--isolated.
https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/configuration.md - The repository README: default launch behaviour and supported browsers.
https://github.com/ChromeDevTools/chrome-devtools-mcp
Which dialog are you seeing
“It keeps popping up” can mean three different things, and each has a different fix. Match your case first:
| Symptom | Likely cause | Read |
|---|---|---|
| You click Allow, it works, then it asks again in the next session | You are on the auto-connect path, which asks by design | Setup C |
| You never configured autoConnect, yet it still asks | Leftover arguments in a config file, or a second client connecting in the background | Amplifiers |
| Several dialogs stack up and stay after you click | The client retries after a timeout; each retry is a fresh request | Checklist |
| The banner “Chrome is being controlled by automated test software” | A different thing: a session is already active | Next section |
What the prompt is guarding
Since Chrome 136, a Chrome launched with the default user data directory ignores --remote-debugging-port. That closed a real attack: any program on your machine could start a debuggable browser and read cookies and sessions out of it. The official docs therefore require a custom user data directory whenever you open a debugging port by hand.
The side effect is that “let the agent use my current login” stopped working the easy way. Chrome's answer, added in M144, is a new channel: the MCP server can request a debugging session against an already running Chrome, and you approve it on the spot. One line from the official post carries the whole design:
In other words, the dialog guards the act of an external process taking over your browser. It asks every time because Chrome offers no “remember this choice” — from the browser's side, today's MCP process cannot prove it is the same trusted thing as tomorrow's.
That reframes the problem. It is not “how do I dismiss this dialog” but “how do I make the browser not need to ask”. And there is exactly one case where it does not need to ask: the browser instance was created for debugging in the first place, with a debugging port and its own profile in the launch command.
Three setups, one variable
These are not three tricks. They are three answers to one question: who owns the browser profile? If the MCP owns it, no consent is needed. If you own it, consent is required.
| Setup | Prompt? | Your logins? | Best for |
|---|---|---|---|
| A. Default: MCP launches Chrome itself | No | No — a fresh profile | Public pages, performance traces, screenshots |
B. Manual instance: own profile + debugging port, MCP connects via --browser-url |
No | Yes, inside that profile only | Needs a login but not a click each time — the usual best answer |
C. Auto-connect: --autoConnect against your daily browser |
Every session | Full reuse, including extensions | Taking over the current window, one-off debugging |
A: change nothing, use the MCP's own profile
The default is already the low-friction path. When a tool first needs a browser, the server launches Chrome with its own user data directory at ~/.cache/chrome-devtools-mcp/chrome-profile (the folder name gains a suffix on non-stable channels). Because the server started it with a debugging port, there is no request against a running instance, and no consent dialog.
The trade-off is clean and blunt: no cookies, no extensions, no signed-in state. If the task requires a login, you are stuck. Add --isolated if you want a temporary directory that is wiped when the browser closes — useful for repeated audits that should not leave state behind.
B: a dedicated instance, connected by browser-url (recommended)
This is the only answer that gives you both a persistent login and no dialog. Start the browser with the debugging port yourself; the MCP just attaches as a client. Because the port comes from the launch arguments rather than an outside request, the consent flow never runs.
Step 1. Launch Chrome with a separate profile directory. The custom directory is mandatory — the default one is ignored on current versions:
Step 2. Confirm the port is live. You want JSON containing webSocketDebuggerUrl:
Step 3. Point the MCP at that port, without --autoConnect:
That profile persists. Log in once and the session is there next time, fully separate from your daily browser, so a mistake cannot touch your main accounts. Give it an obvious theme colour: you want to recognise at a glance that this window belongs to the agent.
C: stay on autoConnect, accept one click per session
If you genuinely need the current window — the bug only reproduces behind a login, or you want to continue from a manual debugging session — --autoConnect is the right tool and the dialog is the price of the ticket.
One prerequisite people miss: remote debugging must be enabled first, at chrome://inspect/#remote-debugging. Skip that and the request is refused, the client retries, and you get a stack of dialogs instead of one.
On this path you can only reduce the number of requests, not the confirmation itself: run fewer clients that attach to the browser at once; keep a long task in one session instead of splitting it into ten; where possible, have several clients share a single --wsEndpoint so one connection to the browser serves them all. There is no official switch beyond that.
Why it feels constant: four amplifiers
“Once per session” and “five times a minute” are different experiences, and the difference usually comes from these four:
Work backwards: confirm which config file the client actually reads, then whether remote debugging is enabled on the Chrome side, and only then suspect the version. Most “I never configured this” cases turn out to be one stale file somewhere with --autoConnect still in it.
Three bad fixes
“There's a hidden flag that turns it off for good”
There isn't. The official post presents the per-request dialog as the goal, and the configuration reference has no “remember this consent” option. When you see that claim, check whether the author actually changed the connection method and described it as disabling the prompt. The symptoms look identical; what happened is not.
“Just install a tool that clicks Allow for you”
It removes friction by turning a security gate into an automatic yes. While a debugging port is open, any local process that can reach it can read page content, cookies and sessions without asking you again. Inside a dedicated profile the risk is bounded; with your daily browser it means handing your main accounts to every local program. Such tools are usually third-party and outside official support, so there is nobody to fall back on.
“Disable remote debugging and it stops”
It stops because the MCP can no longer connect either. That is not a fix, it is a broken feature. Keep the capability inside a dedicated instance instead: start it when needed, quit it when done.
Troubleshooting list
- Check the configs. Search every MCP config file for
chrome-devtoolsand confirm there is exactly one entry, with the arguments you expect. - Count the processes. Look for multiple
chrome-devtools-mcpor npx child processes — that is several clients competing. - Test the port.
curl http://127.0.0.1:9222/json/versionmust return JSON. Empty or refused means Chrome was not started with the debugging flag, or the default-directory restriction blocked it. - Verify the directory. The launch command must include
--user-data-dirpointing at a separate folder, never the default User Data. - Clear stale sessions. The port can stay briefly occupied after Chrome exits; restarting the client beats clicking Allow repeatedly.
- Do not mix connection flags.
--browserUrland--autoConnectare different entry points; together the behaviour is unpredictable. Keep one.
Limits and verification
- Version dependent. Auto-connection requires Chrome 144 or newer, with remote debugging enabled at
chrome://inspect/#remote-debugging. Older builds have no such channel; use A or B. - Official support is Google Chrome and Chrome for Testing. The README says other Chromium browsers may work but are not guaranteed, so the conclusions here do not necessarily apply to them.
- No permanent off switch is given here because none exists officially. Anything claiming otherwise either changed the connection method or clicks Allow on your behalf.
- Verified 2026-11-20. This consent flow is still evolving; if a future version adds “remember this choice”, this article needs an update.
- Security note. A Chrome with a debugging port open exposes its contents to every local process. Do not sign into work email or admin consoles inside the dedicated profile.
Further reading
- Chrome for Developers · Let your coding agent debug your browser session
- chrome-devtools-mcp · Configuration reference
- chrome-devtools-mcp · README
On this site: MCP explained · Coding agents compared · What is an agent harness · All posts.