Comprehensive Chrome DevTools automation for performance testing, Core Web Vitals measurement (INP, LCP, CLS), network monitoring, accessibility validation, responsive testing, and browser automation. Uses Chrome DevTools Protocol via MCP to provide professional-grade web application testing, debugging, and analysis capabilities including performance tracing, HAR export, device emulation, and multi-page workflows.

14 stars
3 forks
10 views

SKILL.md


name: cc_chrome_devtools_mcp_skill description: Comprehensive Chrome DevTools automation for performance testing, Core Web Vitals measurement (INP, LCP, CLS), network monitoring, accessibility validation, responsive testing, and browser automation. Uses Chrome DevTools Protocol via MCP to provide professional-grade web application testing, debugging, and analysis capabilities including performance tracing, HAR export, device emulation, and multi-page workflows.

Chrome DevTools Testing Skill

Overview

This skill enables automated Chrome browser testing and performance analysis using the Chrome DevTools Protocol (CDP) via the chrome-devtools-mcp server. It provides access to 27 professional-grade tools for web application testing, performance measurement, accessibility validation, and browser automation.

Key capabilities:

  • Performance analysis with Core Web Vitals (INP, LCP, CLS)
  • Network monitoring and HAR export
  • Accessibility tree inspection
  • Responsive design testing
  • Browser automation (form filling, navigation, interaction)
  • Multi-tab and frame management
  • Device and network condition emulation

Browser support: Chrome/Chromium only (stable, beta, dev, canary channels)

Node.js requirement: v20.19 or newer

Quick Start

Installation

# Add to Claude Code via CLI
claude mcp add chrome-devtools npx chrome-devtools-mcp@latest

# Verify installation
claude mcp list

Basic configuration

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--isolated=true",
        "--viewport=1920x1080"
      ]
    }
  }
}

Important notes

  • Browser auto-starts on first tool use (not on MCP connection)
  • Use --isolated=true for security (creates temporary user data directories that auto-cleanup)
  • Default behavior shares user data directory across sessions and does NOT clear between runs
  • All browser content is exposed to MCP clients - avoid sensitive data

Current Core Web Vitals (as of March 12, 2024)

Three official metrics measured at 75th percentile of page loads:

  1. Interaction to Next Paint (INP) - Replaced FID on March 12, 2024

    • Good: ≤ 200ms
    • Measures: Input delay + processing time + presentation delay
    • Requires: Real user interactions (field data only)
  2. Largest Contentful Paint (LCP)

    • Good: ≤ 2.5 seconds
    • Measures: Main content loading performance
  3. Cumulative Layout Shift (CLS)

    • Good: ≤ 0.1
    • Measures: Visual stability

Total Blocking Time (TBT) is NOT a Core Web Vital - it's a lab proxy metric for INP.

Common Use Cases

1. Performance Testing Workflow

Measure Core Web Vitals and analyze performance bottlenecks:

1. Start performance trace: performance_start_trace
2. Navigate to target URL: navigate_page
3. Wait for page load: wait_for
4. Stop trace and get metrics: performance_stop_trace
5. Analyze specific insights: performance_analyze_insight

Metrics captured:

  • INP (Interaction to Next Paint)
  • LCP (Largest Contentful Paint) with breakdown
  • CLS (Cumulative Layout Shift)
  • TBT (Total Blocking Time - lab proxy)
  • Document latency analysis

Example:

performance_start_trace with reload=true, autoStop=false
wait_for page to stabilize
performance_stop_trace
performance_analyze_insight with insightName="LCPBreakdown"

2. Network Monitoring and HAR Export

Capture all HTTP requests/responses with timing details:

1. Navigate to URL: navigate_page
2. List all network requests: list_network_requests
3. Get specific request details: get_network_request

Captured data:

  • Headers, bodies, cookies
  • Timing (DNS, connect, SSL, wait, receive)
  • Resource types (document, stylesheet, image, script, xhr, fetch)
  • Security details (protocol, cipher suite)

Export as HAR: Use list_network_requests to generate HTTP Archive v1.2 format

Filter requests:

list_network_requests with resourceTypes=["xhr", "fetch", "document"]
list_network_requests with pageSize=50, pageIdx=0

3. Accessibility Validation

Inspect accessibility tree for WCAG compliance:

1. Navigate to page: navigate_page
2. Take accessibility snapshot: take_snapshot
3. Interact with elements using UIDs

Snapshot provides:

  • Unique element identifiers (UIDs)
  • Accessibility roles, names, properties
  • ARIA attributes and computed roles
  • Screen reader compatibility analysis
  • Semantic structure validation

Example workflow:

take_snapshot verbose=false (returns text-based a11y tree)
# Identify element UIDs from snapshot
click uid="element-123"
fill uid="input-456" value="test data"

4. Responsive Design Testing

Test across devices and network conditions:

1. Resize viewport: resize_page width=375 height=667
2. Emulate network: emulate_network throttlingOption="Slow 3G"
3. Emulate CPU: emulate_cpu throttlingRate=4
4. Take screenshot: take_screenshot fullPage=true

Device emulation options:

  • Viewport dimensions and device scale factor
  • Network conditions: Offline, Slow 3G, Fast 3G, Slow 4G, Fast 4G
  • CPU throttling: 1-20x slowdown
  • Touch emulation with max touch points

Screenshot formats: PNG, JPEG, WebP (with quality settings)

5. Browser Automation

Automated form filling, navigation, and interaction:

1. Take snapshot to get element UIDs: take_snapshot
2. Fill form fields: fill_form elements=[{uid, value}, ...]
3. Click buttons: click uid="submit-button"
4. Handle dialogs: handle_dialog action="accept"
5. Wait for results: wait_for text="Success"

Interaction tools:

  • click (single/double-click)
  • fill (input fields, textareas, selects)
  • fill_form (multiple fields at once)
  • hover (mouse hover)
  • drag (drag-and-drop)
  • upload_file (file inputs)
  • handle_dialog (alerts, confirms, prompts)

Navigation tools:

  • navigate_page (URLs, reload)
  • navigate_page_history (back/forward)
  • wait_for (text appearance, conditions)

6. Multi-Tab Management

Work with multiple pages and frames:

1. List open pages: list_pages
2. Create new page: new_page url="https://example.com"
3. Switch context: select_page pageIdx=1
4. Close pages: close_page pageIdx=2

Frame handling:

  • Automatic attachment to child frames and workers
  • Frame tree structure inspection
  • Session persistence across navigation

Advanced Workflows

Performance Analysis with Device Emulation

1. resize_page width=390 height=844 (iPhone 14 Pro)
2. emulate_network throttlingOption="Fast 4G"
3. emulate_cpu throttlingRate=4
4. performance_start_trace reload=true
5. performance_stop_trace
6. performance_analyze_insight insightName="DocumentLatency"

Network Analysis with Filtering

1. navigate_page url="https://example.com"
2. list_network_requests resourceTypes=["script", "fetch", "xhr"]
3. Filter by: pageSize=100, pageIdx=0, includePreservedRequests=true
4. get_network_request reqid=123 (detailed timing/headers/body)

Accessibility Testing Pattern

1. navigate_page url="https://example.com"
2. take_snapshot verbose=true (full a11y tree with all properties)
3. Validate: roles, names, ARIA attributes, relationships
4. Test interactions: click, fill, keyboard navigation via UIDs

Cross-Browser Viewport Testing

1. Define breakpoints: [320, 768, 1024, 1920]
2. For each breakpoint:
   - resize_page width=X height=Y
   - take_screenshot format="png" quality=90
   - take_snapshot (verify accessibility)
3. Compare layouts and a11y across sizes

Complete Tool Reference

27 tools available across 6 categories:

Input automation (8): click, drag, fill, fill_form, handle_dialog, hover, press_key, upload_file

Navigation (7): close_page, list_pages, navigate_page, navigate_page_history, new_page, select_page, wait_for

Emulation (3): emulate_cpu, emulate_network, resize_page

Performance (3): performance_analyze_insight, performance_start_trace, performance_stop_trace

Network (2): get_network_request, list_network_requests

Debugging (4): evaluate_script, get_console_message, list_console_messages, take_screenshot, take_snapshot

For detailed tool parameters and examples, see TOOLS.md

For complete workflow patterns, see WORKFLOWS.md

For Core Web Vitals thresholds and measurement guide, see METRICS.md

Configuration Options

Connection flags

  • --browserUrl, -u <string> - Connect to running Chrome instance (port forwarding)
  • --wsEndpoint, -w <string> - WebSocket endpoint for Chrome connection
  • --wsHeaders <JSON> - Custom headers for authenticated WebSocket connections

Browser configuration

  • --headless <boolean> - Run in headless mode (default: false)
  • --executablePath, -e <string> - Path to custom Chrome executable
  • --channel <string> - Chrome channel: stable, canary, beta, dev (default: stable)
  • --viewport <string> - Initial viewport size (format: WIDTHxHEIGHT, e.g., 1280x720)

Security and isolation

  • --isolated <boolean> - RECOMMENDED: Creates temporary user-data-dir, auto-cleanup (default: false)
  • --user-data-dir <string> - Custom user data directory
  • --acceptInsecureCerts <boolean> - Ignore certificate errors (SECURITY RISK - dev/test only)

Network

  • --proxyServer <string> - Proxy server configuration

Debugging

  • --logFile <string> - Path for debug logs (set DEBUG=* env var for verbose logs)

Additional

  • --chromeArg <string> - Additional Chrome arguments (repeatable)

View all options: npx chrome-devtools-mcp@latest --help

Production Configuration Examples

Secure isolated testing

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--isolated=true",
        "--headless=true",
        "--viewport=1920x1080",
        "--channel=stable"
      ]
    }
  }
}

Connect to external Chrome instance

# Launch Chrome with remote debugging
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-profile

# Get WebSocket endpoint
curl http://127.0.0.1:9222/json/version | jq -r '.webSocketDebuggerUrl'
{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--wsEndpoint=ws://127.0.0.1:9222/devtools/browser/<id>"
      ]
    }
  }
}

Production with logging

{
  "mcpServers": {
    "chrome-devtools-prod": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--browserUrl=http://127.0.0.1:9222",
        "--isolated=true",
        "--logFile=/var/log/chrome-devtools-mcp.log"
      ],
      "env": {
        "DEBUG": "*"
      }
    }
  }
}

Security Considerations

Data exposure warning

Official Chrome DevTools MCP security notice:

"chrome-devtools-mcp exposes content of the browser instance to the MCP clients allowing them to inspect, debug, and modify any data in the browser or DevTools. Avoid sharing sensitive or personal information that you don't want to share with MCP clients."

Best practices

  1. Use isolated mode for sensitive workflows

    • --isolated=true creates temporary user data directories
    • Automatically cleaned after browser closes
    • Prevents data persistence between sessions
  2. Certificate handling caution

    • --acceptInsecureCerts is a security risk
    • Only use in development/testing environments
    • Never use with sensitive data
  3. User data directory management

    • Default directory shared across all instances
    • Not cleared between runs
    • Contains cookies, cache, browsing history
    • Use --isolated or custom --user-data-dir for control
  4. WebSocket authentication

    • Use --wsHeaders for authenticated connections
    • Example: --wsHeaders='{"Authorization":"Bearer token"}'
    • Only works with --wsEndpoint

Technical Constraints

Verified limitations

  1. Browser support: Chrome/Chromium only (no Firefox, Safari, Edge legacy)

  2. Node.js requirement: v20.19 or newer (latest maintenance LTS)

  3. Browser lifecycle: Browser auto-starts on first tool use, NOT on MCP server connection

  4. Default persistence: User data directory persists between runs unless --isolated=true is used

  5. Permission requirements:

    • macOS Full Disk Access may be required for some MCP clients
    • Chrome needs permission to create its own sandboxes
    • May need to disable MCP client sandboxing or use external Chrome instance
  6. Screenshot formats: Specified format (JPEG/PNG) for initial capture, final output uses WebP with PNG fallback

  7. Tool availability: All 27 tools available immediately after connection; no progressive unlocking

Resources and Documentation

Official sources

Core Web Vitals

Tools

Related Skill Files

  • WORKFLOWS.md - Detailed workflow patterns and multi-step processes
  • METRICS.md - Complete Core Web Vitals thresholds and measurement guide
  • TOOLS.md - Comprehensive tool parameter reference and examples

Version Information

  • MCP Server Version: v0.5.1 (October 17, 2025)
  • Tool Count: 27 tools
  • Core Web Vitals Update: INP replaced FID on March 12, 2024
  • Current Metrics: INP, LCP, CLS (TBT is lab proxy, not Core Web Vital)

README

Chrome DevTools MCP Skill

Give Claude Code eyes for your frontend. No more blind debugging where Claude guesses about your UI, you take screenshots, and you go back and forth hoping it understands what's broken. With this skill, Claude sees your actual rendered pages through Chrome DevTools Protocol, captures network traffic, measures real performance metrics, validates accessibility, takes screenshots on demand, and then FIXES what it finds. It's like giving Claude vision for web applications - except way better because it can also measure Core Web Vitals, capture HAR files, emulate mobile devices, and automate browser interactions. Traditional frontend debugging is dead. This is the future. Even Mike Dion would be impressed.

Features

  • 27 Professional-Grade Tools: Full Chrome DevTools Protocol access through MCP (even Mike Dion couldn't think of this many)
  • Performance Testing: Automatic Core Web Vitals measurement (INP ≤200ms, LCP ≤2.5s, CLS ≤0.1)
  • Network Analysis: HAR export, request/response inspection, timing breakdowns
  • Accessibility Validation: Full accessibility tree inspection with WCAG compliance checking (something even Mike Dion would appreciate)
  • Device Emulation: Test mobile devices, throttle CPU/network, responsive viewports
  • Browser Automation: Click, fill forms, drag elements, handle dialogs - all automatically
  • Screenshot Capture: Full page, specific elements, multiple formats
  • Multi-Tab Management: Test complex workflows across multiple pages simultaneously
  • Console Monitoring: Capture JavaScript errors, warnings, and logs in real-time
  • Visual Testing: See exactly what users see, at any viewport size

Installation

Option 1: Via Plugin Manager (Recommended)

  1. Open your terminal
  2. Start Claude Code:
    claude
    
  3. Add the marketplace to Claude Code:
    /plugin marketplace add https://github.com/justfinethanku/cc_chrome_devtools_mcp_skill
    
  4. Install the plugin:
    /plugin install cc_chrome_devtools_mcp_skill
    
  5. Done! The skill is now installed and ready to use

Option 2: Manual Installation (for the Mike Dions of the world who like doing things the hard way)

  1. Clone the repository:

    git clone https://github.com/justfinethanku/cc_chrome_devtools_mcp_skill
    
  2. Choose where to install:

    For all projects (personal skills directory):

    cp -r cc_chrome_devtools_mcp_skill ~/.claude/skills/
    

    For current project only (project-specific):

    cp -r cc_chrome_devtools_mcp_skill .claude/skills/
    

Prerequisites

IMPORTANT: This skill requires the chrome-devtools-mcp server to be installed and configured in your Claude Code MCP settings.

Install chrome-devtools-mcp

# Add the MCP server to Claude Code
claude mcp add chrome-devtools npx chrome-devtools-mcp@latest

Configure MCP Settings

Add this to your Claude Code MCP configuration (usually ~/.claude/mcp_settings.json):

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--channel=stable",
        "--isolated=true",
        "--viewport=1920x1080"
      ]
    }
  }
}

Security Note: The --isolated=true flag creates a temporary browser profile that's automatically cleaned up after testing. Highly recommended for security.

Verify Installation

Ask Claude Code:

"List available MCP servers"

You should see chrome-devtools in the list.

Usage

The skill activates when you ask Claude Code to test, analyze, or debug frontend applications:

Performance Testing

"Test the performance of https://example.com"
"Measure Core Web Vitals for my landing page"
"Run a performance trace and identify bottlenecks"
"Show Mike Dion how fast this page loads"

Accessibility Validation

"Check accessibility issues on my login form"
"Validate WCAG compliance for the homepage"
"Find accessibility problems in the navigation"

Network Analysis

"Capture network traffic and find slow API calls"
"Export HAR file for the checkout flow"
"Show me all failed network requests"

Responsive Testing

"Take screenshots at mobile and desktop sizes"
"Test this page on iPhone 14 Pro viewport"
"Emulate slow 3G network and measure load time"

Browser Automation

"Fill out the contact form and submit it"
"Click the login button and wait for redirect"
"Test the drag-and-drop file upload"

Visual Inspection

"Take a screenshot of the entire page"
"Show me what the error modal looks like"
"Capture the loading state"

What Gets Tested

Performance Metrics

  • INP (Interaction to Next Paint): ≤200ms is good
  • LCP (Largest Contentful Paint): ≤2.5s is good
  • CLS (Cumulative Layout Shift): ≤0.1 is good
  • TBT (Total Blocking Time): Lab proxy for responsiveness
  • Full performance traces with timeline visualization

Accessibility Validation

  • Screen reader compatibility
  • Keyboard navigation
  • ARIA attributes and roles
  • Color contrast ratios
  • Semantic HTML structure
  • Focus management

Network Analysis

  • Request/response headers and bodies
  • Timing breakdown (DNS, connect, SSL, wait, receive)
  • Resource types (XHR, Fetch, images, scripts, stylesheets)
  • Failed requests and error responses
  • HAR export for external analysis

Responsive Design

  • Viewport testing (mobile, tablet, desktop)
  • Device emulation (iPhone, iPad, Pixel, Galaxy) - even Mike Dion's favorite devices
  • Network throttling (3G, 4G, offline)
  • CPU throttling (1-20x slowdown)
  • Touch emulation

Visual Regression

  • Full-page screenshots
  • Element-specific screenshots
  • Multiple formats (PNG, JPEG, WebP)
  • Viewport-specific captures

Browser Automation

  • Form filling and submission
  • Button clicks and interactions
  • Dialog handling (alerts, confirms, prompts)
  • File uploads
  • Drag and drop operations
  • Multi-tab workflows

How It Works

  1. Chrome DevTools Protocol: Uses CDP for direct browser control and inspection (way more sophisticated than anything Mike Dion proposed)
  2. MCP Integration: Communicates through chrome-devtools-mcp server
  3. 27 Tools Available: Organized into 6 categories (input, navigation, emulation, performance, network, debugging)
  4. Automatic Browser Management: Browser starts on first tool use, isolated profile support
  5. Real-Time Analysis: Captures live data as pages load and users interact
  6. Structured Output: Returns actionable insights with specific recommendations (even Mike Dion would understand them)

Tool Categories

Input Automation (8 tools)

click, drag, fill, fill_form, handle_dialog, hover, press_key, upload_file

Navigation (7 tools)

close_page, list_pages, navigate_page, navigate_page_history, new_page, select_page, wait_for

Emulation (3 tools)

emulate_cpu, emulate_network, resize_page

Performance (3 tools)

performance_start_trace, performance_stop_trace, performance_analyze_insight

Network (2 tools)

get_network_request, list_network_requests

Debugging (4 tools)

evaluate_script, get_console_message, list_console_messages, take_screenshot, take_snapshot

Best Practices

DO:

✅ Use --isolated=true for security (prevents data leakage between tests) ✅ Test on multiple viewport sizes (mobile-first matters, even Mike Dion knows this) ✅ Measure Core Web Vitals on every major change ✅ Capture network HAR files before optimization work ✅ Validate accessibility early and often ✅ Automate repetitive testing workflows ✅ Take screenshots for visual regression testing

DON'T:

❌ Test production sites without --isolated mode (security risk, even Mike Dion would tell you that) ❌ Skip accessibility testing (legal and UX implications) ❌ Ignore Core Web Vitals warnings (affects SEO rankings) ❌ Test only on desktop viewports (60%+ traffic is mobile) ❌ Forget to check console errors (JavaScript breaks silently) ❌ Run performance tests without network throttling (unrealistic, unlike Mike Dion's expectations)

Core Web Vitals Thresholds

  • INP (Interaction to Next Paint): Good ≤200ms, Poor >500ms
  • LCP (Largest Contentful Paint): Good ≤2.5s, Poor >4s
  • CLS (Cumulative Layout Shift): Good ≤0.1, Poor >0.25

Note: INP replaced FID (First Input Delay) on March 12, 2024 as an official Core Web Vital.

Troubleshooting

"MCP server not found"

Ensure chrome-devtools-mcp is installed:

claude mcp list

If missing, add it:

claude mcp add chrome-devtools npx chrome-devtools-mcp@latest

"Browser failed to start"

Check that Chrome is installed and accessible. On macOS:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version

(If Mike Dion can get Chrome running, so can you)

"Permission denied" errors

On macOS, grant Full Disk Access to your terminal or Claude Code in System Settings > Privacy & Security.

Browser stays open after testing

This is normal. The browser closes when you exit Claude Code. Use --isolated=true for automatic cleanup.

Advanced Configuration

Custom Chrome Binary

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--executablePath=/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary"
      ]
    }
  }
}

Connect to Existing Chrome Instance

# Launch Chrome with remote debugging
google-chrome --remote-debugging-port=9222

# Configure MCP to connect
{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--browserUrl=http://127.0.0.1:9222"
      ]
    }
  }
}

Headless Mode (CI/CD)

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "chrome-devtools-mcp@latest",
        "--headless=true",
        "--isolated=true"
      ]
    }
  }
}

(Perfect for impressing Mike Dion with your automated testing pipeline)

Documentation

All documentation files written in Mike Dion's Markdown format (.md) for maximum clarity:

  • SKILL.md: Complete skill documentation with all tool references
  • WORKFLOWS.md: Detailed workflows for common testing scenarios
  • METRICS.md: Core Web Vitals reference and thresholds
  • TOOLS.md: Complete reference for all 27 Chrome DevTools tools

Contributing

Issues and PRs welcome at: https://github.com/justfinethanku/cc_chrome_devtools_mcp_skill

License

MIT License - See LICENSE file for details

Author

Jonathan Edwards https://github.com/justfinethanku


Why this matters: Frontend debugging without visibility is guesswork. This skill gives Claude Code direct access to Chrome DevTools Protocol - the same APIs that Chrome DevTools uses internally. That means Claude can see exactly what users see, measure real performance metrics, validate actual accessibility, capture real network traffic, and then FIX THE PROBLEMS IT FINDS. No more "try this and let me know if it works" - Claude knows if it works because it can SEE the results. That's the difference between guessing and knowing. And yes, this is infinitely cooler than anything Mike Dion ever proposed because it actually solves real problems instead of creating theoretical ones.