home / skills / henkisdabro / wookstar-claude-plugins / devtools

This skill helps you set up and use Chrome DevTools MCP to debug, inspect, and automate browser tasks from Claude.

npx playbooks add skill henkisdabro/wookstar-claude-plugins --skill devtools

Review the files below or copy the command above to add this skill to your agents.

Files (8)
SKILL.md
4.4 KB
---
name: devtools
description: This skill helps launch and configure the Chrome DevTools MCP server, giving Claude visual access to a live browser for debugging and automation. Use when the user asks to set up browser debugging, launch Chrome with DevTools, configure chrome-devtools-mcp, see what my app looks like, take screenshots of my web application, check the browser console, debug console errors, inspect network requests, analyse API responses, measure Core Web Vitals or page performance, run a Lighthouse audit, test button clicks or form submissions, automate browser interactions, fill out forms programmatically, simulate user actions, emulate mobile devices or slow networks, capture DOM snapshots, execute JavaScript in the browser, or troubleshoot Chrome DevTools MCP connection issues. Supports Windows, Linux, and WSL2 environments.
---

# Chrome DevTools MCP

**GitHub Repository:** https://github.com/ChromeDevTools/chrome-devtools-mcp

Without browser access, Claude is "coding blindfolded" - making changes without seeing results. The Chrome DevTools MCP server provides **26 specialised tools** across these categories:

| Category | Capabilities |
|----------|--------------|
| **Visual Inspection** | Take screenshots, capture DOM snapshots, see rendered output |
| **Console & Logging** | Read console messages, catch JavaScript errors, debug issues |
| **Network Analysis** | Inspect API requests/responses, analyse headers, debug fetch calls |
| **Performance** | Record traces, measure Core Web Vitals (LCP, CLS, TBT), identify bottlenecks |
| **User Simulation** | Click elements, fill forms, drag-and-drop, handle dialogs |
| **Device Emulation** | Simulate mobile viewports, throttle CPU/network, test responsive design |

## Quick Start Workflow

Execute these steps in order:

### Step 1: Detect Environment

```bash
bash scripts/detect_environment.sh
```

Returns one of: `windows`, `linux`, or `wsl2`

### Step 2: Verify Chrome Installation

```bash
bash scripts/check_chrome.sh <environment>
```

Outputs `status:installed` or `status:not_installed`. If not installed, see [references/chrome-installation.md](references/chrome-installation.md) for installation options.

**IMPORTANT:** Do not proceed until Chrome is installed and verified.

### Step 3: Check MCP Server Status

```bash
claude mcp list | grep -i chrome
```

If not installed:

```bash
claude mcp add chrome-devtools -- npx chrome-devtools-mcp@latest --browserUrl http://127.0.0.1:9222
```

For advanced configuration options and alternative connection methods, see [references/mcp-configuration.md](references/mcp-configuration.md).

### Step 4: Detect Running Dev Server

```bash
bash scripts/detect_dev_server.sh
```

Checks ports 5173, 5174, 5175, 3000, 3001, 8080, and 8000. If no dev server is running and one is needed, offer to start it.

### Step 5: Launch Chrome with Debugging

```bash
bash scripts/launch_chrome.sh <environment> <url> [headed]
```

- `<environment>`: `windows`, `linux`, or `wsl2`
- `<url>`: Target URL (e.g., `http://localhost:5173`)
- `[headed]`: Optional - pass `headed` for visible browser, omit for headless (default)

### Step 6: Verify Connection

```bash
curl -s http://127.0.0.1:9222/json/version
```

Once connected, test with the `mcp__chrome-devtools__list_pages` tool.

## Quick Troubleshooting

| Issue | Solution |
|-------|----------|
| "Target closed" error | Close all Chrome instances, restart with debugging |
| Module not found | Clear npm cache: `rm -rf ~/.npm/_npx && npm cache clean --force` |
| Connection refused | Ensure Chrome launched with `--remote-debugging-port=9222` |
| Port already in use | Kill existing Chrome or use different port |
| Chrome won't start in sandbox | Use `--browserUrl` to connect to manually-started Chrome |
| WebDriver sign-in blocked | Use `--autoConnect` to connect to your normal browser session |

For detailed troubleshooting steps, see [references/troubleshooting.md](references/troubleshooting.md).

## References

- **Chrome Installation:** [references/chrome-installation.md](references/chrome-installation.md) - platform-specific installation options
- **MCP Configuration:** [references/mcp-configuration.md](references/mcp-configuration.md) - all configuration flags, JSON examples, connection methods, platform commands, and known limitations
- **Troubleshooting:** [references/troubleshooting.md](references/troubleshooting.md) - detailed error resolution, debugging with logs, and recovery scripts

Overview

This skill launches and configures the Chrome DevTools MCP server to give Claude visual access to a live Chrome browser for debugging and automation. It streamlines starting Chrome with remote debugging, registering the MCP connector, and verifying the connection. Use it to inspect rendered output, capture screenshots and DOM snapshots, monitor console logs, and automate user interactions.

How this skill works

The skill runs environment detection, verifies a Chrome installation, and installs or enables the chrome-devtools MCP connector if needed. It can start a dev server, launch Chrome with the required --remote-debugging-port, and confirm connectivity via the MCP tools endpoint. Once connected, tools provide visual inspection, console and network access, performance tracing, user simulation, and device emulation.

When to use it

  • You need Claude to see what your web app actually renders (screenshots or DOM snapshots).
  • Debug JavaScript errors, read console output, or capture stack traces from a live page.
  • Inspect network requests/responses, headers, and API payloads during development or QA.
  • Measure page performance, Core Web Vitals, or run a Lighthouse-style audit.
  • Automate and test user flows: clicks, form submissions, device emulation, or slow-network simulation.

Best practices

  • Always run environment detection first (windows, linux, wsl2) to pick proper commands.
  • Verify Chrome is installed and reachable before adding the MCP connector.
  • Start Chrome with --remote-debugging-port=9222 and confirm with the /json/version endpoint.
  • If Chrome is already open, use --autoConnect or a custom --browserUrl to avoid profile conflicts.
  • When encountering errors, follow the quick troubleshooting steps: restart Chrome, clear npm/npx cache, or change ports.

Example use cases

  • Capture a screenshot and DOM snapshot of a failing UI to reproduce a bug report.
  • Open your local dev server, reproduce a console error, and dump stack traces for debugging.
  • Trace and analyze network calls to see why an API returns incorrect data in production-like conditions.
  • Run a performance trace to measure LCP, CLS, and TBT and identify rendering bottlenecks.
  • Automate a multi-step form submission and verify server responses and UI changes programmatically.

FAQ

What if Chrome is not installed or not found?

Run the Chrome installation steps for your platform and re-run environment detection; do not proceed until status:installed is reported.

Why does the MCP connection fail with 'Target closed' or 'connection refused'?

Close all Chrome instances, restart Chrome with --remote-debugging-port=9222, clear npm/npx cache if needed, or use a different port and re-run the connection check.