Expert guidance for using Chrome DevTools MCP server to automate browser testing, performance analysis, and debugging through AI-powered interactions.
/plugin marketplace add cameronsjo/claude-marketplace/plugin install mcp@cameronsjoThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdresources/configuration-templates.mdresources/test-patterns.mdscripts/generate-test-suite.pyscripts/validate-setup.shExpert guidance for using Chrome DevTools MCP server to automate browser testing, performance analysis, and debugging through AI-powered interactions.
Chrome DevTools MCP is a Model Context Protocol server that enables AI coding agents to control and inspect live Chrome browser instances. It provides 26 tools across performance analysis, browser automation, network inspection, and debugging capabilities.
Key Capabilities:
Use Chrome DevTools MCP for:
Claude Code:
claude mcp add chrome-devtools npx chrome-devtools-mcp@latest
Manual Configuration (any MCP client):
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
}
}
Headless Mode with Isolated Profile:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--headless=true",
"--isolated=true",
"--channel=stable"
]
}
}
}
Connect to Running Chrome Instance:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--browserUrl=http://127.0.0.1:9222"
]
}
}
}
With Proxy and Custom Viewport:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--viewport=1920x1080",
"--proxyServer=http://proxy.example.com:8080"
]
}
}
}
| Option | Type | Default | Purpose |
|---|---|---|---|
--browserUrl, -u | string | — | Connect to running Chrome via port |
--wsEndpoint, -w | string | — | WebSocket endpoint for Chrome |
--wsHeaders | string | — | Custom WS headers (JSON format) |
--headless | boolean | false | Run without UI |
--executablePath, -e | string | — | Custom Chrome path |
--isolated | boolean | false | Temporary profile (auto-cleanup) |
--channel | string | stable | Chrome channel (stable/canary/beta/dev) |
--logFile | string | — | Debug log path |
--viewport | string | — | Initial size (e.g., 1280x720) |
--proxyServer | string | — | Proxy configuration |
--acceptInsecureCerts | boolean | false | Ignore certificate errors |
--chromeArg | array | — | Additional Chrome arguments |
--categoryEmulation | boolean | true | Enable emulation tools |
--categoryPerformance | boolean | true | Enable performance tools |
--categoryNetwork | boolean | true | Enable network tools |
click - Perform mouse clicks
drag - Drag and drop operations
fill - Text input
fill_form - Multi-field form completion
fill callshandle_dialog - Dialog management
hover - Mouse hovering
press_key - Keyboard input
upload_file - File uploads
navigate_page - URL navigation
new_page - Create new tabs/pages
select_page - Switch between pages
list_pages - Enumerate open pages
close_page - Close browser pages
wait_for - Wait for conditions
emulate - Device/environment emulation
resize_page - Viewport modification
performance_start_trace - Begin performance recording
performance_stop_trace - End performance recording
performance_analyze_insight - Extract performance metrics
list_network_requests - View network requests
get_network_request - Request details
evaluate_script - Execute JavaScript
get_console_message - Retrieve console message
list_console_messages - View all console messages
take_screenshot - Capture current state
take_snapshot - DOM snapshot
1. Navigate to the page: "Navigate to https://example.com"
2. Start tracing: "Start performance trace"
3. Perform user actions: "Click the 'Products' tab"
4. Stop tracing: "Stop performance trace"
5. Analyze: "Analyze performance insights"
What to look for:
1. Navigate to form page
2. Fill form: "Fill the registration form with:
- email: test@example.com
- password: TestPass123!
- confirm: TestPass123!"
3. Submit: "Click the 'Register' button"
4. Verify: "Wait for navigation to complete"
5. Check result: "Take a screenshot"
1. Clear cache and navigate
2. Wait for load: "Wait for network idle"
3. List requests: "List all network requests"
4. Filter failures: "List all requests with status 4xx or 5xx"
5. Inspect specific: "Get details for the failed API request"
6. Check console: "List all console errors"
1. Set baseline viewport: "Resize page to 1920x1080"
2. Navigate: "Navigate to homepage"
3. Baseline screenshot: "Take screenshot of full page"
4. Test responsive: "Resize page to 375x812" (mobile)
5. Mobile screenshot: "Take screenshot"
6. Compare screenshots externally
1. Emulate device: "Emulate iPhone 14 Pro"
2. Navigate to page
3. Test mobile interactions: "Click the hamburger menu"
4. Check touch targets: "Take screenshot"
5. Verify responsive layout
6. Test orientation: "Emulate iPhone 14 Pro in landscape"
1. Navigate to page
2. Trigger error condition: "Click the 'Submit' button"
3. Check console: "List all console errors"
4. Get error details: "Get the first error message"
5. Execute debug script: "Evaluate: console.trace()"
6. Take evidence: "Take screenshot"
wait_for after navigation or actions--isolated flag for sensitive testing--logFile to capture debug output{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--channel=canary",
"--isolated=true"
]
}
}
}
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--headless=true",
"--isolated=true",
"--acceptInsecureCerts=true",
"--chromeArg=--disable-dev-shm-usage",
"--chromeArg=--no-sandbox"
]
}
}
}
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--channel=stable"
]
}
}
}
~/.cache/chrome-devtools-mcp/chrome-profile-stable# Start Chrome with debugging port
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--remote-debugging-port=9222 \
--user-data-dir=/tmp/chrome-profile
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--browserUrl=http://127.0.0.1:9222"
]
}
}
}
Problem: "Failed to launch Chrome"
Solutions:
which google-chrome or which chrome--executablePath=/path/to/chrome--channel=canary--logFile=/tmp/chrome-mcp.logProblem: "Running as root without --no-sandbox is not supported"
Solutions:
--browserUrl with externally launched Chrome--chromeArg=--no-sandbox (development only)Problem: "Timeout waiting for browser"
Solutions:
--headless=trueProblem: "Network requests not captured"
Solutions:
--categoryNetwork=true (default)wait_for toolProblem: "No performance trace data"
Solutions:
--categoryPerformance=true (default)performance_stop_trace--isolated flag for temporary profilesChrome DevTools MCP can replace Playwright for many use cases:
Playwright:
await page.goto('https://example.com');
await page.click('button#submit');
await page.waitForNavigation();
Chrome DevTools MCP:
1. Navigate to https://example.com
2. Click the submit button
3. Wait for navigation to complete
Similar functionality with AI-driven interactions:
Cypress:
cy.visit('https://example.com')
cy.get('input[name="email"]').type('test@example.com')
cy.get('button').contains('Submit').click()
Chrome DevTools MCP:
1. Navigate to https://example.com
2. Fill the email input with test@example.com
3. Click the Submit button
Performance analysis similar to Lighthouse:
1. Navigate to page
2. Start performance trace
3. Wait for page load
4. Stop performance trace
5. Analyze performance insights
Provides Core Web Vitals and actionable recommendations.
1. Create new page for login
2. Navigate to /login
3. Fill login form
4. Click login button
5. Create new page for dashboard
6. Verify dashboard loaded
7. List all pages to see session
1. Navigate to page
2. Wait for network idle
3. List network requests filtered by /api/
4. Get request details for /api/users
5. Evaluate script to verify: JSON.parse(response.body).length > 0
1. Navigate with JavaScript disabled: --chromeArg=--blink-settings=scriptEnabled=false
2. Verify content renders
3. Take screenshot
4. Re-enable JavaScript and compare
1. Navigate to page
2. Evaluate script: axe.run() (requires axe-core loaded)
3. List console warnings for a11y violations
4. Take screenshot of problematic areas
navigate_page → fill_form → click → wait_for →
list_console_messages → take_screenshot →
list_network_requests → evaluate_script
navigate_page → performance_start_trace →
[user actions] → performance_stop_trace →
performance_analyze_insight → take_screenshot
navigate_page → evaluate_script (inspect state) →
list_console_messages → get_console_message →
list_network_requests → get_network_request →
take_snapshot
"Check the performance of https://developers.chrome.com"
Validates setup by opening browser and recording performance trace.
Performance Test:
navigate_page → performance_start_trace → wait_for →
performance_stop_trace → performance_analyze_insight
Form Test:
navigate_page → fill_form → click → wait_for →
list_console_messages → take_screenshot
Network Debug:
navigate_page → wait_for → list_network_requests →
get_network_request → list_console_messages
Visual Test:
navigate_page → emulate → wait_for → take_screenshot →
resize_page → take_screenshot
--browserUrl workaround)Always prioritize security, use isolated profiles for testing, and clear sensitive data after test runs.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.