Connect Claude Code to Chrome in WSL
Let Claude Code inspect pages in WSL. Install Chrome for Testing, connect the Chrome DevTools MCP server, and check that it works.
This setup lets Claude inspect pages, check console errors and test browser interactions in WSL.
- Claude CodeVS Code extension
- stdio
- chrome-devtools-mcpMCP server, started with npx
- DevTools protocol
- Chrome for TestingLinux build, temporary profile
- opens
- Your local appPages, console, interactions
Claude can then Inspect pagesCheck console errorsTest interactions
Dated examples
These examples date from November 2025. Check the linked documentation for current options and requirements.
What you need
- WSL 2
- Node.js
- npm
- VS Code
- Claude Code extension
Setup
- 01Install Chrome for Testing
- 02Configure the MCP server
- 03Set permissions
- 04Reload VS Code
- 05Check the connection
1. Install Chrome for Testing
WSL terminal
npx -y @puppeteer/browsers install chrome@stable --path ~/.local/share/chrome-for-testing
Save the executable path printed by the installer. Step 2 needs it.
2. Configure MCP Server
Add this server entry under your project:
~/.claude.json
{
"projects": {
"/path/to/your/project": {
"mcpServers": {
"chrome-devtools": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@latest",
"-e",
"/home/username/.local/share/chrome-for-testing/chrome/linux-VERSION/chrome-linux64/chrome",
"--isolated"
],
"env": {}
}
}
}
}
}
What to change, and what the flags do
- /path/to/your/projectReplace with your project path
- /home/username/…/chromeReplace with the Chrome path from step 1
-eSelects the executable--isolatedUses a temporary browser profile
3. Set permissions
To allow these tools without individual prompts, add the wildcard. It covers all Chrome DevTools tools.
~/.claude/settings.json
{
"permissions": {
"allow": [
"mcp__chrome-devtools__*"
]
}
}
4. Reload VS Code
Press Ctrl Shift P, then run Developer: Reload Window.
5. Check the connection
WSL terminal
claude mcp list
chrome-devtools: ... - ✓ ConnectedWhat you should see
If it does not connect
Symptom, then what to check
- Chrome not foundCheck the installed version folder and update the
-epath. - Target closedCheck whether Chrome starts. If you are launching Windows Chrome, try the Linux installation above.
- Server missingCheck the JSON syntax, reload VS Code and inspect the extension logs.
- Permission deniedCheck the allow list in your global or project settings.
Try it
Ask Claude
Open my local app, report console errors and take a screenshot.
Once that works, try a complete workflow such as signing in or submitting a test form.