Claude in Chrome
Connect Claude Code to your own Chrome or Edge browser to test web apps, read console errors, fill forms, upload files, extract data and record GIFs.
With the Claude in Chrome extension installed, Claude Code can drive your actual browser from the CLI or the VS Code extension. That closes one of the most annoying gaps in AI-assisted web work: Claude changes the code, then opens the page, clicks through the flow, reads the console and checks the result itself.
A few things to understand up front:
- Claude opens new tabs for its work and shares your browser's logged-in state, so it can reach any site you are signed into.
- Everything happens in a visible Chrome window in real time. You can watch, and step in.
- When it hits a login page or CAPTCHA, it stops and asks you to deal with it.
- Its tabs are gathered into a tab group for the session. Running
/clearcloses that group (including open pages) unless work that survives the clear is still running. Switching sessions with/resume, exiting, or clearing while surviving work is running closes the group only if it contains nothing but empty new tabs, so pages you might still be reading stay put.
Note: It works with Google Chrome and Microsoft Edge, and Claude Code also detects the extension in other Chromium browsers including Brave, Arc, Vivaldi and Opera. It is not supported in WSL.
What you can do with it
- Debug live: read console errors and DOM state, then fix the code responsible.
- Check designs: build a UI from a mockup and compare it in the browser.
- Test flows: form validation, visual regressions, end-to-end user journeys.
- Use web apps without APIs: Google Docs, Gmail, Notion, your CRM, anything you are logged into.
- Extract data from pages and save it locally.
- Automate drudgery: data entry, form filling, multi-site routines.
- Upload files from your machine into web forms.
- Record GIFs of what happened, to document or share.
Requirements
- Chrome, Edge or another Chromium browser.
- The Claude in Chrome extension, version 1.0.36 or later, from the Chrome Web Store.
- Claude Code.
- A direct Anthropic plan: Pro, Max, Team or Enterprise.
- Signing in with
/login. If you authenticate with an API key or a long-lived token fromclaude setup-token, Chrome integration stays off even with--chrome, because the extension cannot authenticate with those credentials. (Before v2.1.216, such sessions could enable it but every connection failed with a 403.)
It is not available through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry; if that is your only access, you need a separate claude.ai account.
For Enterprise organisations with HIPAA enabled, the extension is off by default and an Owner can enable it under Organization settings > Claude in Chrome. A Business Associate Agreement does not cover data sent to third-party sites through the extension.
Getting started in the CLI
claude --chrome
The first launch shows a one-off dialog explaining the integration and site permissions; press Enter. Then ask for something:
open localhost:5173/pricing, switch the toggle to annual billing and tell me whether every plan's price updates
If you are asked to approve a browser action, the prompt begins Claude in Chrome wants to and offers to allow all actions on that site for the session.
Run /chrome whenever you need to check the connection, manage permissions, reconnect, or choose a browser. It is working when the panel shows "Status: Enabled" and "Extension: Installed". If several browsers are connected, Claude asks which to use the first time a browser action runs; change it later via /chrome and Select browser…. Your choice sticks even when another browser connects.
When Claude asks to install the extension
If Claude needs a browser in an interactive session and cannot find the extension, you get a prompt titled "Claude wants to use your browser" (at most once per session):
| Choice | What happens |
|---|---|
| Install extension | Opens the install page and runs a guided setup. Claude Code waits, connects, and enables browser tools in the same session. Choose "Continue with browser tools" to resume the task, or "Continue without browser tools" to finish setup later with /chrome |
| Not now | Carries on without the browser; may ask again in a later session |
| Don't ask again | Never prompts again; you can still set up via /chrome |
Organisations can suppress this prompt through managed MCP policy: by blocking the claude-in-chrome server with deniedMcpServers, or by deploying a managed-mcp.json that does not explicitly allow Claude in Chrome alongside the managed set. See managed MCP.
Turning it on by default
Run /chrome in the CLI and choose Enabled by default, or in VS Code type /chrome and flip Enabled by default. It is one shared setting for both.
With it on and v2.1.287 or later, each VS Code session connects to the browser at startup. On earlier versions, or with it off, VS Code connects when you type @browser. Claude Code still starts normally if Chrome is not running (before v2.1.211 it could hang).
Tip: Always-on Chrome keeps the browser tools and their instructions in context all the time. I leave it off and use
--chromeor@browserwhen I need it.
Permissions
Site permissions
Which sites Claude may browse, click and type on is controlled in the extension's own settings. In auto mode, when the classifier approves a browser call to a site, the extension skips its own per-site check for that call, unless your permission rules deny any site to Claude in Chrome.
VS Code sessions
- If you typed
@browser, the extension approves each browser action Claude Code would otherwise ask about. - If Enabled by default connected it at startup, Claude Code asks before acting on a site you have not allowed (in Manual, Edit automatically, Auto and Bypass permissions modes) until you type
@browserin that session.
Plan mode
In plan mode, you are prompted before Claude records a GIF, opens a new tab, or runs a shortcut, except in a VS Code session where you typed @browser. A tabs_context_mcp call that sets createIfEmpty also prompts, as does a browser_batch containing any of those actions. In an interactive CLI session where bypass permissions mode is available and feature-flag fetching is off, these run without a prompt.
To see every browser tool, run /mcp, select claude-in-chrome and choose View tools.
Worked examples
Check a change on your dev server
I've changed the signup form's password rules. open localhost:3000/signup, try "abc", "password123" and a strong password, and tell me which error messages appear for each
Hunt down console errors
Be specific about what you want from the console; logs get noisy.
load the reports page, then list any console errors or failed network requests that happen during the first five seconds
Bulk data entry
for each row in suppliers.csv, open the vendor portal at vendors.example.com, click "New supplier" and fill in company name, VAT number and contact email
Upload a file
Claude Code reads the file and sends its contents to the browser, so this works in local and remote sessions (v2.1.211 or later).
open the support portal, start a new ticket about the export bug, and attach exports/failed-run.csv
Restrictions: Claude can only upload files the session is allowed to read (a Read deny rule blocks uploads too); a single upload is capped at 10 MB in total; and files with multiple hard links (common inside node_modules and other package-manager stores) are refused, so copy the file and upload the copy.
Write into a web document
write a short release summary from this week's commits and paste it under the "Week 41" heading in my Google Doc at docs.google.com/document/d/<id>
This works in any logged-in web app: Gmail, Notion, Sheets and so on.
Scrape structured data
go to the conference speakers page and save each speaker's name, company and talk title to speakers.csv
Work across sites
look at tomorrow's meetings in my calendar. for every external attendee, check their company's website and add a one-line note to the meeting description about what they do
Record a GIF
record a GIF of adding two items to the basket and checking out, ending on the confirmation page
GIFs capture everything visible, including account details on logged-in pages, so check them before sharing outside your team.
Save a screenshot
screenshot the dashboard at 1440px wide and save it to disk
Claude reports the saved path. (Before v2.1.211, the save_to_disk option did not actually write a file.)
Troubleshooting
Extension not detected
- Check the extension is installed and enabled at
chrome://extensions. - Check Claude Code is current with
claude --version. - Make sure Chrome is running.
- Run
/chromeand choose "Reconnect extension". - Restart both Claude Code and the browser.
The first time you enable the integration, Claude Code installs a native messaging host configuration file, which the browser only reads at startup, so a restart is often all that is needed. Claude Code opens the "connect the extension" tab only on that first install, not when a later session rewrites the file (after switching builds or config directories, for example).
If it still fails, check the host file exists:
| Browser | OS | Location |
|---|---|---|
| Chrome | macOS | ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json |
| Chrome | Linux | ~/.config/google-chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json |
| Chrome | Windows | Registry key HKCU\Software\Google\Chrome\NativeMessagingHosts\ |
| Edge | macOS | ~/Library/Application Support/Microsoft Edge/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json |
| Edge | Linux | ~/.config/microsoft-edge/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json |
| Edge | Windows | Registry key HKCU\Software\Microsoft\Edge\NativeMessagingHosts\ |
Other Chromium browsers use the same file name in their own config directory. Brave on macOS, for instance, uses ~/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/, and on Windows HKCU\Software\BraveSoftware\Brave-Browser\NativeMessagingHosts\.
Browser stops responding
- Look for a JavaScript alert, confirm or prompt dialog. These block page events; dismiss it yourself and tell Claude to carry on.
- Ask Claude to open a new tab and retry.
- Disable and re-enable the extension at
chrome://extensions.
Connection drops in long sessions
The extension's service worker can go idle after a while. Run /chrome and choose "Reconnect extension".
Windows
EADDRINUSEnamed pipe conflicts: restart Claude Code and close other Claude Code sessions using Chrome.- Native messaging host crashes at startup: reinstall Claude Code to regenerate the host configuration.
- Setup pages will not open: update Claude Code (fixed in v2.1.211).
Error messages
| Error | Cause | Fix |
|---|---|---|
| "Browser extension is not connected" | The native host cannot reach the extension, or an organisation IP allowlist blocks bridge.claudeusercontent.com | Make sure the extension is signed into the same claude.ai account, restart both, and reconnect via /chrome. For allowlists, see network configuration |
"Not detected" in /chrome | Extension missing or disabled | Install or enable it at chrome://extensions |
| "No tab available" | Claude acted before a tab was ready | Ask it to open a new tab and retry |
| "Receiving end does not exist" | Service worker went idle | /chrome, then "Reconnect extension" |