Intermediate · Elective · about 15 minutes · Needs: Connect a tool with MCP · Verified against Claude Code v2.1.292 (stable) on 2026-10-15
By the end of this Elective you can connect Claude Code to your own browser, and have Claude check a page you changed: its console, what it shows, and a screenshot.
- Google Chrome or Microsoft Edge with the Claude in Chrome extension, version 1.0.36 or later (Prerequisites).
- A Pro, Max, Team or Enterprise plan, signed in with
/login. With an API key, Claude Code keeps Chrome integration off. - macOS, Linux or native Windows: Chrome integration isn't supported in WSL.
- One of your own repositories with its
.practice/folder, andpython3to serve a page locally. - Usage: light.
Claude in Chrome connects Claude Code to the browser you use every day, through its extension. Claude opens its own tabs in a visible window, so you watch it work, and it stops to let you handle a login page or a CAPTCHA.
Unlike lesson 7's Chrome DevTools MCP server, which you ran with a temporary profile, it shares your browser's login state: Claude can reach any site you're signed in to. The extension's site permissions decide which sites Claude may browse, click and type on.
Warning
Claude acts with your logins. Keep it to the sites the task needs, and read each Claude in Chrome wants to prompt before you allow a site.
-
Save a page with a bug in it, then serve the folder to this computer only:
cat > .practice/ui-demo.html <<'EOF' <!doctype html> <title>Linkcheck status</title> <h1>Linkcheck status</h1> <p id="status">Loading...</p> <script>document.getElementById('stauts').textContent = 'Ready';</script> EOF python3 -m http.server 8000 --bind 127.0.0.1 --directory .practice
-
In a second terminal, start Claude Code with Chrome:
claude --chrome. The first time, a dialog explains the integration; pressEnter. -
Run
/chrome. When it showsStatus: EnabledandExtension: Installed, the integration works. If not, quit Claude Code, restart Chrome, and runclaude --chromeagain: the first time, Claude Code installs a connection file that Chrome reads only at startup (Extension not detected). -
Ask:
Open http://127.0.0.1:8000/ui-demo.html and tell me what the page shows. Read its console for errors, reloading the page if you need to catch errors from page load, and save a screenshot of it to disk.Approve each prompt that starts with
Claude in Chrome wants to; for the site, you can allow all its actions for the session. Claude opens a tab, tells you the page still saysLoading...and what the console shows, and gives the screenshot's path. Your wording will differ.
Fix the bug, and have Claude prove the fix in the browser.
- Ask Claude to fix the script in
.practice/ui-demo.htmlso the page saysReady. - Ask it to reload the page in Chrome, read the console again, and save a new screenshot.
You are done when all of these are true:
-
/chromeshowsStatus: EnabledandExtension: Installed. - Both screenshots exist:
ls -lon each path Claude reported. - Self-check (not tested): after the fix, the console showed no errors, and the new screenshot shows
Ready.
If Claude doesn't use the browser, start the session with --chrome, or run /chrome and select Enabled by default. That keeps the browser tools loaded in every session, which uses more context.
- Use Claude Code with Chrome: more workflows, from filling forms to recording a GIF, and troubleshooting.
- Get started with Claude in Chrome: the extension itself, including its shortcuts and permissions.
Sources: Use Claude Code with Chrome
Back to the Intermediate index · Topic: MCP · Stuck on this lesson?