How to Let Claude Code, Codex or Cursor Use Your Logged-In Chrome (Without Copying Cookies)
If you want an AI agent to check your Gmail, update a CRM record or test a page that sits behind your login, the simplest route is to connect the agent to the Chrome you already use, not to copy your cookies into a new browser. On Claude Code with a paid Claude plan, that means installing the Claude in Chrome extension and starting Claude Code with Chrome turned on. In the ChatGPT desktop app, it means installing the ChatGPT browser extension from Settings > Computer Use and then typing @Chrome in a Codex or Work chat. For Cursor and most other agents, you switch on one toggle in Chrome and ask the agent to add Google’s Chrome DevTools MCP server. This guide walks through all three, using each vendor’s own documentation, and covers the permission settings, the error messages you are most likely to hit, and the safety habits worth adopting before you let an agent click around as you.
Key facts (checked against official docs on October 26, 2026):
- Claude Code: needs the Claude in Chrome extension (version 1.0.36 or later), a direct Anthropic plan (Pro, Max, Team or Enterprise) and a sign-in with
/login. It stays off if you use an API key, aclaude setup-tokentoken, or Claude through Amazon Bedrock, Google Cloud or Microsoft Foundry, and it isn’t supported in WSL (Claude Code docs).- ChatGPT / Codex: the ChatGPT extension works with Chrome, Edge, Brave, Opera and Vivaldi. By default ChatGPT asks before it acts on each new website (ChatGPT Learn).
- Any other agent: Chrome DevTools MCP can attach to the Chrome you’re running if you’re on Chrome 144 or later and turn on remote debugging at
chrome://inspect/#remote-debugging(Chrome DevTools MCP).- Why not copy cookies: since Chrome 136, the old
--remote-debugging-porttrick no longer works on your normal Chrome profile, because attackers were using it to steal cookies (Chrome for Developers).
Which option should you pick?
Start with the agent you already use. You don’t need all three.
| You use | Easiest way into your signed-in Chrome | What it costs | Main limit |
|---|---|---|---|
| Claude Code (terminal or VS Code) | Claude in Chrome extension, then claude --chrome or /chrome | Included with Pro, Max, Team or Enterprise | Off with API keys, Bedrock, Google Cloud, Foundry and in WSL |
| Codex or Work chats in the ChatGPT desktop app | ChatGPT browser extension, installed from Settings > Computer Use | Comes with the app; availability can depend on rollout and workspace settings | Asks before each new website unless you allow more |
| Cursor, Codex CLI, Gemini CLI or another MCP-capable agent | Chrome DevTools MCP in auto-connect mode | Free and open source | Sees every open window of the Chrome profile it connects to; needs Chrome 144+ and Node.js |
A quick note on words: an extension is the small add-on you install from the Chrome Web Store. An MCP server is a plug-in that gives an AI agent new tools; you add it by pasting a short config block or by asking the agent to add it for you.
Why copying your cookies into a fresh browser is the wrong fix
The tempting shortcut is to export your cookies and load them into a separate automation browser. It often fails, and the reasons are worth knowing so you don’t lose an afternoon:
- The old remote-debugging shortcut is closed. Google says that from Chrome 136,
--remote-debugging-portand--remote-debugging-pipe“will no longer be respected if attempting to debug the default Chrome data directory.” They now need a separate--user-data-dir, which means a separate, logged-out profile. Google made the change after seeing “an increase in attackers using Chrome Remote Debugging to extract cookies” (Chrome for Developers). - A fresh profile starts signed out of everything. You redo every login and every second-factor prompt, and some sites treat the new browser as an unknown device.
All three methods below work inside your real browser instead, so your existing logins stay where they are.
Option 1: Claude Code with Claude in Chrome
Claude in Chrome is Anthropic’s browser extension. When Claude Code connects to it, Claude opens new tabs in a visible Chrome window, shares your browser’s login state, and pauses to let you handle login pages and CAPTCHAs yourself (Claude Code docs).
Before you start
Check these four things; most setup failures come from one of them:
- Browser: Google Chrome or Microsoft Edge. Claude Code also detects the extension in Brave, Arc, Vivaldi and Opera.
- Extension: Claude in Chrome version 1.0.36 or later, from the Chrome Web Store.
- Plan: a direct Anthropic plan: Pro, Max, Team or Enterprise.
- Sign-in: you signed in to Claude Code with
/login. If you use an API key or a token fromclaude setup-token, Claude Code keeps Chrome off even if you ask for it, because the extension can’t authenticate with those credentials.
If your company uses Claude only through Amazon Bedrock, Google Cloud or Microsoft Foundry, this option isn’t available; Anthropic says you’d need a separate claude.ai account. On Enterprise plans with HIPAA enabled, Claude in Chrome is off until an Owner turns it on in Organization settings > Claude in Chrome (Claude Code docs).
Step-by-step setup
- Install the extension in the Chrome profile you want Claude to use, and sign in to it with the same claude.ai account and organization you use in Claude Code.
- Start Claude Code with Chrome on. In the terminal, run
claude --chrome. The first time, Claude Code shows a one-time explanation of how site permissions work; press Enter. - Give it a simple first task, in plain English. Anthropic’s own example is: “Go to code.claude.com/docs, click on the search box, type “hooks”, and tell me what results appear.”
- Approve the first action. A prompt starting “Claude in Chrome wants to” appears, with an option to allow all actions on that site for the session.
- Confirm it’s connected. Type
/chrome. You should see “Status: Enabled” and “Extension: Installed.”
You can also skip the manual install: if Claude needs your browser and doesn’t find the extension, Claude Code shows a prompt titled “Claude wants to use your browser” with an Install extension button that walks you through setup in the same session.
In VS Code: type /chrome in the Claude Code prompt box, or type @browser to connect for that session.
Turn it on for every session (and when not to)
Run /chrome and pick Enabled by default. The CLI and the VS Code extension share this setting. The trade-off: Anthropic notes that keeping it on “increases context usage since the browser tools and their instructions are always loaded.” If you only use the browser now and then, leave it off and start with --chrome when you need it. Our guide to trimming Claude Code’s token overhead covers other settings that add up the same way.
One thing a project can’t do: a repository’s .claude/settings.json can’t switch Chrome on for you. If you see a warning that Claude Code “ignored CLAUDE_CODE_ENABLE_CFC in this project’s settings,” that is a safety rule, not a bug. Use /chrome or --chrome yourself.
Things worth asking Claude to do
These examples come straight from Anthropic’s documentation and show the range:
- “Open the dashboard page and check the console for any errors when the page loads.”
- “For each row in contacts.csv, go to the CRM, click Add Contact, and fill in the name, email, and phone fields.”
- “Draft a project update based on the recent commits and add it to my Google Doc.”
- “Record a GIF showing how to complete the checkout flow.”
File uploads work too, with limits: up to 10 MB per upload, and Claude refuses files in places where credentials usually live, such as .env, .pem or .key files and anything under .ssh.
Permissions
Which sites Claude may browse, click and type on is controlled in the Chrome extension’s settings, not in Claude Code. Anthropic’s permissions guide lists three modes in the extension: Manually approve (asks before each action), Automatically approve (Claude reviews each action for safety and pauses when needed) and Skip all approvals (no checks at all) (Claude Help Center). Regardless of mode, Claude in Chrome won’t make purchases, create accounts, handle card or ID data, permanently delete emails or files, or follow instructions it finds in emails or web pages. If you already run Claude Code in auto mode, our Claude Code permissions and auto mode guide explains how the two layers interact.
Fixes for common Claude in Chrome errors
| What you see | Likely cause | What to do |
|---|---|---|
| ”Browser extension is not connected” | Extension not running, or signed in to a different claude.ai account or organization | Check /status for your organization, sign the extension in to the same one, restart Chrome and Claude Code, then /chrome |
”Not detected” in /chrome | Extension disabled or missing | Enable it in chrome://extensions |
| Not detected on the very first try | Chrome hadn’t loaded Claude Code’s connection file yet | Restart Chrome once |
| ”Receiving end does not exist” | The extension went idle in a long session | /chrome, then Reconnect extension |
| ”No tab available” | Claude acted before a tab was ready | Ask Claude to open a new tab and retry |
| Commands stop working mid-task | A pop-up alert or confirm box is blocking the page | Dismiss it yourself, then tell Claude to continue |
All of these come from the troubleshooting section of the Claude Code Chrome docs. If you belong to more than one organization, be careful: Anthropic warns that logging out of the extension deletes the shortcuts and scheduled tasks saved in it.
Option 2: Codex and ChatGPT Work with the ChatGPT browser extension
OpenAI’s ChatGPT extension lets the ChatGPT desktop app read and act on sites where you’re already signed in, such as Gmail, LinkedIn, Salesforce or internal tools. It works in Chrome, Edge, Brave, Opera and Vivaldi (ChatGPT Learn).
Step-by-step setup
- Update the ChatGPT desktop app first. OpenAI’s first troubleshooting step is the same, and if you have more than one ChatGPT or Codex desktop app installed, update each one.
- Open Settings > Computer Use in the desktop app. If your browser isn’t listed, expand More browsers.
- Select your browser and follow any prompt to install the required plugin.
- Click Install next to the browser. This opens the extension’s store page. Install it and review Chrome’s permission prompts.
- Go back to Computer Use and check that the browser now shows Manage, not Install.
- Start a new Codex or Work chat and pick the browser with an
@-mention, for example:@Chrome open Salesforce and update the account from these call notes.
Use the same Chrome profile where you installed the extension. That is the profile ChatGPT will act in, with its logins.
Chrome vs. the built-in browser: the desktop app also has its own browser (@Browser, or Command+Shift+B on macOS and Ctrl+Shift+B on Windows). OpenAI recommends it for local development and public pages, and the extension when a task needs your existing Chrome profile, signed-in sessions, open tabs or Chrome extensions (OpenAI Help Center).
Website permissions
By default, ChatGPT asks before it interacts with each new website, based on its host name such as example.com. You can answer Allow once, Allow for this site, Allow for all sites or Decline. OpenAI marks “Allow for all sites” and browser-history access as Elevated Risk; history access always asks and has no always-allow option. To review what you’ve allowed, go to Settings > Computer Use > Manage next to your browser, where there is an allowlist and a blocklist (ChatGPT Learn).
A practical default: allow sites one at a time for the first week. Only move a site to the allowlist once you’ve watched a few tasks on it go the way you expected.
Fixes for common ChatGPT extension problems
- ChatGPT can’t connect to the browser: first check the site isn’t on your blocklist. Then restart the browser and reopen ChatGPT from the toolbar to confirm the side chat loads.
- Browser missing from the
@menu: in Settings > Computer Use, turn on that browser’s toggle. - Still shows Install: run the setup flow again, or reinstall through Settings > Computer Use.
- Wrong account or no logins: you’re probably in a different Chrome profile. Install and enable the extension in the profile you’re actually using.
- Uploads fail: in Chrome, open Manage Extensions, click Details on the ChatGPT extension, and turn on Allow access to file URLs. Then start the task again.
- A chat seems stuck: start a new Codex or Work chat; OpenAI says this can clear chat-specific connection state.
If you’re setting up an always-on ChatGPT assistant, our ChatGPT dots setup guide covers which connections are worth giving it.
Option 3: Cursor and other agents with Chrome DevTools MCP
Cursor, Codex CLI, Gemini CLI and many other agents don’t have a first-party “use my Chrome” extension, but they all support MCP servers. Google’s Chrome DevTools MCP server normally starts its own Chrome with a dedicated profile. With its auto-connect option, it attaches to the Chrome you already have open instead (Chrome DevTools MCP). It was built for debugging (performance traces, network requests, console messages), so it’s especially good for “why is my site broken when I’m logged in” jobs.
Step 1: switch on remote debugging in Chrome
You need Chrome 144 or later. In the address bar, open chrome://inspect/#remote-debugging, turn on remote debugging, and follow the dialog that asks whether to allow incoming debugging connections.
Step 2: have your agent add the server
You don’t have to edit files by hand. Tell the agent:
“Add the Chrome DevTools MCP server, using
chrome-devtools-mcp@latestwith the--autoConnectflag, so you can use my running Chrome. Add--no-usage-statisticstoo.”
Under the hood, this is the configuration Google documents:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["chrome-devtools-mcp@latest", "--autoConnect"]
}
}
}
Where it goes depends on the agent:
- Cursor: in
.cursor/mcp.jsoninside a project, or~/.cursor/mcp.jsonin your home folder to make it available everywhere (Cursor docs). - Codex CLI: Codex adds MCP servers with
codex mcp add <name> -- <command>(OpenAI Codex docs). - Claude Code (if you can’t use Claude in Chrome, for example because you use an API key): Claude Code adds servers with
claude mcp add; adding--scope usermakes it available in every project (Claude Code docs).
The server needs Node.js (an LTS version) and npm on your computer. If you don’t have them, ask your agent to install Node.js first.
Step 3: test it and click Allow
Restart the agent so it picks up the new server, then ask it something simple, such as Google’s suggested first prompt: “Check the performance of https://developers.chrome.com.” Chrome shows a dialog asking permission for the connection. Click Allow; Google says the server then opens the page and records a performance trace.
What to know before you rely on it
- It sees the whole profile. Google’s docs say that if you have several profiles open, the server connects to Chrome’s default profile and “has access to all open windows” of that profile.
- You start Chrome yourself. Auto-connect doesn’t launch Chrome for you.
- Usage statistics are on by default. Google collects things like tool success rates and latency; the
--no-usage-statisticsflag turns that off, and it’s separate from Chrome’s own usage-statistics setting. - It exposes the page to your agent. The README warns that it “exposes content of the browser instance to the MCP clients,” so avoid having sensitive pages open while it’s connected.
- Turn remote debugging back off when you’re done at
chrome://inspect/#remote-debugging, so nothing can attach to your Chrome while you aren’t using an agent.
Safety: set this up before your first real task
An agent working in your signed-in Chrome can do roughly what you can do there. The vendors are unusually direct about the risks.
- Use a separate Chrome profile for agent work. Anthropic recommends “a separate browser profile without access to sensitive accounts,” because Claude takes screenshots of the tabs it works in and “can’t filter sensitive content out of what it sees” (Claude Help Center). Make a profile that’s signed in only to the tools the agent needs, such as your work email, CRM and docs, and keep banking, healthcare and government accounts out of it. Install the extension only there.
- Treat web pages as untrusted. Anthropic calls prompt injection, meaning hidden instructions in a page, email or document, “the biggest risk facing browser-using AI tools,” and says the risk “is not zero” even with its safety classifiers. OpenAI likewise tells you to treat page content as untrusted and to avoid sending secrets through browser tasks unless you’re present to review each prompt (ChatGPT Learn).
- Keep approvals on for anything that sends, pays or deletes. Use Manually approve in Claude in Chrome for sensitive work, and per-site permission in ChatGPT rather than Allow for all sites.
- Stop the task if it wanders. If the agent suddenly opens sites you didn’t mention or asks for information it doesn’t need, stop it. Anthropic lists exactly these as signs of a prompt-injection attempt.
- Don’t paste passwords into the chat. OpenAI says to enter credentials only in the browser, never in the chat. For logins inside Claude tasks, see our 1Password for Claude setup guide, which fills passwords without them ever reaching Claude.
FAQ
Can I use Claude in Chrome with an Anthropic API key?
No. Claude Code keeps the Chrome integration off with API keys and claude setup-token tokens, even if you pass --chrome. Use Chrome DevTools MCP instead (Option 3).
Does it work on Windows? Yes, in both Claude Code and the ChatGPT desktop app. Claude in Chrome isn’t supported inside WSL, though, so run Claude Code natively on Windows. If you see a “named pipe” (EADDRINUSE) error, close other Claude Code sessions using Chrome and restart.
Will the agent take over the tab I’m using? Claude in Chrome opens its own tabs and groups them into a Chrome tab group for the session. OpenAI’s Chrome Web Store listing says the ChatGPT extension works in the background “without ever taking over your active browsing session.” Chrome DevTools MCP can reach every window of the profile it connects to.
Does Claude close the tabs when I’m finished?
Typing /clear closes the tab group, including open pages. Exiting or switching sessions closes it only if it contains nothing but empty new tabs, so pages you may still be reading stay open.
Can the agent solve CAPTCHAs or log in for me? Claude in Chrome pauses at login pages and CAPTCHAs for you to handle, and is prohibited from bypassing CAPTCHAs. The ChatGPT built-in browser can wait while you sign in.
Which option is safest? None removes the risk. The safest setup is the one with the narrowest reach: a dedicated Chrome profile, per-site approvals, and the browser connection switched on only when you need it.
Bottom line
If you pay for Claude and use Claude Code, install Claude in Chrome and run claude --chrome. If you live in the ChatGPT desktop app, install the extension from Settings > Computer Use and @Chrome your way into Codex or Work chats. For Cursor and everything else, turn on remote debugging in Chrome 144+ and ask your agent to add Chrome DevTools MCP with --autoConnect. Whichever you pick, give the agent its own Chrome profile first. For more hands-on guides like this, see the 7minai homepage or our Claude Code daily-driver setup.