Skip to main content

Chrome Integration

Claude Code integrates with the Chrome browser extension to provide browser automation capabilities. After writing code, you can test and debug it in the browser directly from the terminal.

Beta Feature

Chrome integration is currently in beta. It is only supported on Google Chrome and Microsoft Edge. Other Chromium-based browsers such as Brave and Arc, as well as WSL, are not yet supported.

Prerequisitesโ€‹

Chrome integration requires the following:

ItemRequirement
BrowserGoogle Chrome or Microsoft Edge
ExtensionClaude in Chrome v1.0.36 or later
Claude Codev2.0.73 or later
PlanAnthropic paid plan (Pro, Max, Teams, Enterprise)
Third-Party Provider Limitation

If you use Claude through a third-party provider such as Amazon Bedrock, Google Cloud Vertex AI, or Microsoft Foundry, you need a separate claude.ai account for Chrome integration.

Getting Startedโ€‹

Step 1: Install the Chrome Extensionโ€‹

  1. Search for Claude in Chrome in the Chrome Web Store
  2. Install the official Anthropic extension
  3. Verify it is enabled at chrome://extensions

Step 2: Launch Chrome from Claude Codeโ€‹

# Start with the --chrome flag
claude --chrome

Or activate it in an existing session using the /chrome command:

/chrome

Step 3: Request a Browser Actionโ€‹

Go to localhost:3000, fill the login form with test data,
and check if the validation works correctly

Claude opens a new tab and performs browser actions. All actions run in a visible Chrome window in real time.

Enable by Defaultโ€‹

If adding the --chrome flag every time is cumbersome, run /chrome and select "Enabled by default".

Watch Your Context Usage

When enabled by default, browser tools are always loaded, which increases context usage. If context consumption is a concern, launching with --chrome only when needed is more efficient.

Main Capabilitiesโ€‹

Once Chrome is connected, you can link browser and coding tasks in a single workflow:

CapabilityDescription
Live DebuggingRead console errors and DOM state directly, then fix the source code on the spot
Design VerificationBuild UI from a Figma mockup, then verify it matches in the browser
Web App TestingForm validation, visual regression testing, user flow verification
Authenticated AppsInteract with logged-in apps like Google Docs, Gmail, Notion
Data ExtractionExtract structured information from web pages and save it locally
Task AutomationAutomate data entry, form filling, multi-site workflows
Session RecordingRecord browser actions as GIFs for documentation or sharing
Shared Login State

Claude shares the browser's login state. You can work on sites you are already logged into without any extra API setup. If Claude encounters a login page or CAPTCHA, it pauses and asks you to handle it manually.

Practical Workflowsโ€‹

Local Web App Testingโ€‹

I updated the login form validation. Go to localhost:3000,
submit with invalid data, and check that error messages appear correctly

Debugging with Console Logsโ€‹

Open the dashboard page and check if there are any
console errors when the page loads

Form Automationโ€‹

I have customer contacts in contacts.csv. For each row,
go to the CRM (crm.example.com), click "Add Contact",
and fill in the name, email, and phone number

Writing in Google Docsโ€‹

Write a project update based on recent commits and add it
to the Google Doc at docs.google.com/document/d/abc123

Data Extractionโ€‹

Extract each product's name, price, and stock status
from the product listing page and save it as a CSV file

GIF Recordingโ€‹

Record the entire process of adding a product to the cart
and completing checkout as a GIF

Site Permission Managementโ€‹

Per-site permissions are managed in the Chrome extension settings. You can control which sites Claude is allowed to navigate, click, and type on.

To see the full list of available browser tools, go to /mcp and select claude-in-chrome.

Troubleshootingโ€‹

Extension Not Detectedโ€‹

If you see the "Chrome extension not detected" message:

  1. Check that the extension is installed and enabled at chrome://extensions
  2. Verify your Claude Code version with claude --version
  3. Make sure Chrome is running
  4. Go to /chrome โ†’ "Reconnect extension" to reconnect
  5. If the issue persists, restart both Claude Code and Chrome
First-Time Connection

When you first activate Chrome integration, a native messaging host configuration file is installed. Chrome reads this file at startup, so if it is not detected on the first try, restart Chrome.

Native messaging host configuration file locations:

Chrome:

  • macOS: ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json
  • Linux: ~/.config/google-chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json
  • Windows: HKCU\Software\Google\Chrome\NativeMessagingHosts\ (registry)

Edge:

  • macOS: ~/Library/Application Support/Microsoft Edge/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json
  • Linux: ~/.config/microsoft-edge/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json
  • Windows: HKCU\Software\Microsoft\Edge\NativeMessagingHosts\ (registry)

Browser Not Respondingโ€‹

  1. Check whether a modal dialog (alert, confirm, prompt) is blocking the page โ€” close it manually
  2. Ask Claude to open a new tab
  3. Disable and re-enable the extension at chrome://extensions

Connection Drops (Long Sessions)โ€‹

The Chrome extension's service worker can become idle during inactivity. If browser tools stop working, go to /chrome โ†’ "Reconnect extension" to reconnect.

Windows Issuesโ€‹

  • Named pipe conflict (EADDRINUSE): Another Claude Code session may be using Chrome. Restart Claude Code.
  • Native messaging host error: Reinstall Claude Code to regenerate the host configuration.

Common Error Messagesโ€‹

ErrorCauseSolution
"Browser extension is not connected"Native messaging host cannot connect to the extensionRestart Chrome and Claude Code, then reconnect with /chrome
"Extension not detected"Extension not installed or disabledInstall and enable at chrome://extensions
"No tab available"Action attempted before a tab is readyRequest a new tab, then retry
"Receiving end does not exist"Service worker is idle/chrome โ†’ "Reconnect extension"

Key Takeawaysโ€‹

  • Chrome integration connects code writing and browser testing in a single workflow
  • Activate with claude --chrome or /chrome
  • Work with logged-in sites (Google Docs, Gmail, etc.) without any extra API setup
  • Currently in beta โ€” only Chrome and Edge are supported
  • Requires an Anthropic paid plan (third-party providers need a separate account)