Skip to main content
Claude Code integrates with the Claude in Chrome browser extension to give you browser automation capabilities from the CLI or the VS Code extension. Build your code, then test and debug in the browser without switching contexts. Claude opens new tabs for browser tasks and shares your browser’s login state, so it can access any site you’re already signed into. Browser actions run in a visible Chrome window in real time. When Claude encounters a login page or CAPTCHA, it pauses and asks you to handle it manually.
Chrome integration works with Google Chrome and Microsoft Edge. Claude Code also detects the extension and sets up the connection in other Chromium-based browsers, including Brave, Arc, Vivaldi, and Opera. Chrome integration isn’t supported in Windows Subsystem for Linux (WSL).

Capabilities

With Chrome connected, you can chain browser actions with coding tasks in a single workflow:
  • Live debugging: read console errors and DOM state directly, then fix the code that caused them
  • Design verification: build a UI from a Figma mock, then open it in the browser to verify it matches
  • Web app testing: test form validation, check for visual regressions, or verify user flows
  • Authenticated web apps: interact with Google Docs, Gmail, Notion, or any app you’re logged into without API connectors
  • Data extraction: pull structured information from web pages and save it locally
  • Task automation: automate repetitive browser tasks like data entry, form filling, or multi-site workflows
  • File uploads: attach files from your machine to upload fields on web pages
  • Session recording: record browser interactions as GIFs to document or share what happened

Prerequisites

Before using Claude Code with Chrome, you need: Chrome integration also requires signing in with /login. If you authenticate with an API key or a long-lived token from claude setup-token, Claude Code keeps Chrome integration off, even when you pass --chrome, because the browser extension can’t authenticate with those credentials. Before v2.1.216, these sessions could enable Chrome integration, but every attempt to connect to the browser extension failed with a 403 error.
Chrome integration is not available through third-party providers like Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. If you access Claude exclusively through a third-party provider, you need a separate claude.ai account to use this feature.

Get started in the CLI

1

Launch Claude Code with Chrome

Start Claude Code with the --chrome flag:
The first time you launch with Chrome, Claude Code shows a one-time dialog that introduces the integration and explains how site permissions work. Press Enter to continue.To enable Chrome for future sessions without the flag, see Enable Chrome by default.
2

Ask Claude to use the browser

This example navigates to a page, interacts with it, and reports what it finds, all from your terminal or editor:
If Claude Code asks for permission before a browser action, approve it. The dialog starts with Claude in Chrome wants to and offers an option to allow all actions on that site for the session. Claude opens a new tab and starts the task.
Run /chrome at any time to check the connection status, manage permissions, reconnect the extension, or choose which connected browser to use. The integration is working when the status panel shows “Status: Enabled” and “Extension: Installed”. If more than one browser is connected, you choose which one Claude uses. When a browser action starts before you’ve chosen, Claude prompts you to pick one. To switch browsers later, run /chrome and select Select browser…. Claude keeps using your choice even when another browser connects. Browser selection requires Claude Code v2.1.154 or later. For VS Code, see browser automation in VS Code.

Install the extension when Claude asks

When Claude needs your browser in an interactive session and Claude Code doesn’t detect the extension, Claude Code shows an install prompt titled “Claude wants to use your browser”. Claude Code asks at most once per session. The prompt offers three choices:
  • Install extension: opens the extension install page in your browser and starts a guided setup. Claude Code waits for the install, connects the extension, and enables browser tools in the same session. When the connection is ready, select “Continue with browser tools” and Claude resumes the task in your browser. You can leave setup by selecting “Continue without browser tools” and finish later with /chrome.
  • Not now: continues the task without browser tools. Claude Code can ask again in a later session.
  • Don’t ask again: stops the prompt in future sessions. You can still set up the integration anytime with /chrome.
If your organization blocks the claude-in-chrome MCP server with the deniedMcpServers managed setting, Claude Code doesn’t show the install prompt.

Enable Chrome by default

To avoid passing --chrome each session, run /chrome and select “Enabled by default”. Claude Code starts normally when Chrome isn’t running. Before v2.1.211, startup could hang when Chrome integration was enabled but Chrome wasn’t running. In the VS Code extension, Chrome is available whenever the Chrome extension is installed. No additional flag is needed.
Enabling Chrome by default in the CLI increases context usage since browser tools are always loaded. If you notice increased context consumption, disable this setting and use --chrome only when needed.

Manage site permissions

Site-level permissions are inherited from the Chrome extension. Manage permissions in the Chrome extension settings to control which sites Claude can browse, click, and type on.

Browser tools in plan mode

In plan mode, browser tool calls that only read the page or browser state run without a permission prompt, and calls that change state prompt for approval.
  • Read-only calls: read_page, get_page_text, find, reading console messages or network requests, and taking a screenshot
  • State-changing calls: clicks, typing, navigation, tab and window management, and recording a GIF
An otherwise read-only call also prompts for approval when it sets a state-changing input flag, such as createIfEmpty on tabs_context_mcp, clear on the console and network readers, or save_to_disk on a screenshot. A browser_batch call runs without a prompt only when every action inside it is read-only.

Example workflows

These examples show common ways to combine browser actions with coding tasks. Run /mcp, select claude-in-chrome, then select View tools to see the full list of available browser tools.

Test a local web application

When developing a web app, ask Claude to verify your changes work correctly:
Claude navigates to your local server, interacts with the form, and reports what it observes.

Debug with console logs

Claude can read console output to help diagnose problems. Tell Claude what patterns to look for rather than asking for all console output, since logs can be verbose:
Claude reads the console messages and can filter for specific patterns or error types.

Automate form filling

Speed up repetitive data entry tasks: