MCP sounds great in theory, but real-world setup often fails at browser debugging: AI cannot reach Chrome, cannot inspect network requests, and cannot collect performance traces. This guide gives you a copy-paste setup that works on Windows + WSL.

Environment

  • Windows 11 + WSL2
  • Google Chrome on Windows
  • node / npx available inside WSL
  • Any MCP-capable client (for example, Codex CLI)

1) Enable port forwarding and firewall rule on Windows

Open PowerShell as Administrator and run:

netsh interface portproxy add v4tov4 `
  listenaddress=0.0.0.0 listenport=9222 `
  connectaddress=127.0.0.1 connectport=9222

New-NetFirewallRule `
  -DisplayName "Chrome DevTools MCP 9222" `
  -Direction Inbound `
  -Protocol TCP `
  -LocalPort 9222 `
  -Action Allow

This allows WSL to reach Chrome’s debugging endpoint.

2) Launch Chrome with remote debugging

& "C:\Program Files\Google\Chrome\Application\chrome.exe" `
  --user-data-dir="$env:USERPROFILE\ChromeProfiles\mcp" `
  --remote-debugging-port=9222 `
  --remote-debugging-address=127.0.0.1 `
  --no-first-run `
  --no-default-browser-check

Use a dedicated user data directory to avoid affecting your daily profile.

3) Configure DevTools MCP in WSL

Example configuration for Codex:

[mcp_servers.chrome-devtools]
command = "npx"
args = ["chrome-devtools-mcp@latest", "--browserUrl=http://172.31.240.1:9222/json"]

The gateway IP (172.31.240.1) is environment-specific. Find it via ipconfig on Windows (vEthernet (WSL...)).

4) Verify connectivity before asking AI to debug

curl http://172.31.240.1:9222/json

If you get JSON with webSocketDebuggerUrl, the pipeline is ready.

Now AI can automate:

  • Console error collection
  • Network bottleneck analysis
  • Performance tracing for LCP/INP diagnostics
  • Repeatable regression checks

Troubleshooting

curl times out

  • Recheck portproxy and firewall rule
  • Confirm Chrome is running with --remote-debugging-port=9222

MCP connects but no pages are visible

  • Use the /json endpoint, not just :9222
  • Ensure Chrome is running in the expected profile/session

Random disconnects

  • Sleep/resume can break old sessions
  • Restart Chrome first, then restart the MCP server

Why this matters for content/SEO sites

If you operate a blog, page quality affects indexing and engagement. With DevTools MCP connected, browser diagnostics become automation instead of manual QA, which makes technical SEO maintenance much more reliable.

Summary

Three essentials: expose 9222 correctly, launch Chrome with remote debugging, and connect from WSL using the gateway IP and /json. Once this is stable, AI-driven browser debugging finally becomes practical.