
chrome-devtools-mcp-automation
Expert guidance for Chrome DevTools MCP server - browser automation, debugging, and performance analysis for AI agents
- Installs
- 239
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/reason-machines/mcp-skills --skill chrome-devtools-mcp-automation- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads chrome-devtools-mcp-automation automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Chrome DevTools MCP Automation
Skill by ara.so — MCP Skills collection.
Chrome DevTools MCP (chrome-devtools-mcp) is a Model Context Protocol (MCP) server that gives AI coding agents full access to Chrome DevTools. It enables reliable browser automation via Puppeteer, advanced debugging (network inspection, console messages, screenshots), and performance analysis (trace recording, CrUX data).
Installation
As MCP Server (Standard Mode)
Add to your MCP client configuration (e.g., Cursor, Claude Code, Cline, VS Code):
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
}
}
With options:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@latest",
"--headless",
"--no-usage-statistics",
"--no-performance-crux"
]
}
}
}
Slim Mode (Basic Browser Tasks Only)
For simpler automation without performance tools:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest", "--slim", "--headless"]
}
}
}
Connect to Existing Browser
To connect to an already-running Chrome instance (useful for tools like Antigravity):
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@latest",
"--browser-url=http://127.0.0.1:9222"
]
}
}
}
CLI Usage (Without MCP)
# Install globally
npm install -g chrome-devtools-mcp
# Run CLI commands
chrome-devtools-mcp navigate --url https://example.com
chrome-devtools-mcp screenshot --output screenshot.png
chrome-devtools-mcp console-logs
Key Configuration Options
| Flag | Description |
|---|---|
--headless | Run Chrome in headless mode (no UI) |
--slim | Enable slim mode (basic tools only) |
--no-usage-statistics | Opt out of Google usage statistics collection |
--no-performance-crux | Disable Chrome UX Report (CrUX) API calls |
--browser-url=URL | Connect to existing Chrome instance at URL |
--user-data-dir=PATH | Use custom Chrome profile directory |
Environment Variables
# Disable usage statistics
export CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS=1
# Disable update checks
export CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1
# Use in CI environment (auto-disables statistics)
export CI=true
Core Capabilities
1. Browser Navigation & Interaction
Navigate to a URL:
// MCP tool call: navigate
{
"url": "https://example.com",
"waitUntil": "networkidle0"
}
Click elements:
// MCP tool call: click
{
"selector": "button.submit",
"waitForNavigation": true
}
Fill forms:
// MCP tool call: type
{
"selector": "input[name='email']",
"text": "user@example.com",
"delay": 100
}
Extract page content:
// MCP tool call: evaluate
{
"script": "document.querySelector('h1').textContent",
"returnByValue": true
}
2. Screenshots & Visual Inspection
Full page screenshot:
// MCP tool call: screenshot
{
"fullPage": true,
"path": "./screenshots/page.png"
}
Element screenshot:
// MCP tool call: screenshot
{
"selector": "div.product-card",
"path": "./element.png"
}
3. Network Inspection
Monitor network requests:
// MCP tool call: network-logs
{
"filter": {
"type": "fetch",
"status": 200
}
}
Analyze failed requests:
// MCP tool call: network-logs
{
"filter": {
"failed": true
}
}
4. Console & Debugging
Get console messages:
// MCP tool call: console-logs
{
"level": "error" // or "warning", "info", "log"
}
Execute JavaScript in page context:
// MCP tool call: evaluate
{
"script": `
const errors = [];
window.addEventListener('error', (e) => {
errors.push({ message: e.message, stack: e.error.stack });
});
errors;
`,
"returnByValue": true
}
5. Performance Analysis
Record performance trace:
// MCP tool call: start-trace
{
"categories": ["devtools.timeline", "v8.execute", "disabled-by-default-v8.cpu_profiler"]
}
// ... perform actions ...
// MCP tool call: stop-trace
{
"path": "./traces/performance.json"
}
Get performance metrics:
// MCP tool call: get-metrics
{
"includeMemory": true
}
Analyze Core Web Vitals:
// MCP tool call: web-vitals
{
"url": "https://example.com",
"includeCrux": true // Include real-user data from CrUX
}
Common Patterns
Pattern 1: E2E Test Automation
// 1. Navigate to login page
// Tool: navigate
{ "url": "https://app.example.com/login" }
// 2. Fill credentials
// Tool: type
{ "selector": "#username", "text": "testuser" }
{ "selector": "#password", "text": "secure_password" }
// 3. Submit form
// Tool: click
{ "selector": "button[type='submit']", "waitForNavigation": true }
// 4. Verify success
// Tool: evaluate
{ "script": "window.location.pathname === '/dashboard'" }
// 5. Capture proof
// Tool: screenshot
{ "path": "./test-evidence/login-success.png" }
Pattern 2: Performance Audit
// 1. Start trace recording
// Tool: start-trace
{ "categories": ["devtools.timeline", "loading", "blink.user_timing"] }
// 2. Navigate to page
// Tool: navigate
{ "url": "https://example.com/product/123", "waitUntil": "networkidle0" }
// 3. Stop trace
// Tool: stop-trace
{ "path": "./audits/product-page-trace.json" }
// 4. Get Core Web Vitals
// Tool: web-vitals
{ "url": "https://example.com/product/123", "includeCrux": true }
// 5. Analyze metrics
// Tool: get-metrics
{ "includeMemory": true }
Pattern 3: Debugging Production Issues
// 1. Navigate to problematic page
// Tool: navigate
{ "url": "https://example.com/checkout" }
// 2. Monitor network for failed requests
// Tool: network-logs
{ "filter": { "failed": true } }
// 3. Capture console errors
// Tool: console-logs
{ "level": "error" }
// 4. Get JavaScript errors with stack traces
// Tool: evaluate
{
"script": `
window.__errors = [];
window.addEventListener('error', (e) => {
__errors.push({
message: e.message,
filename: e.filename,
lineno: e.lineno,
colno: e.colno,
stack: e.error?.stack
});
});
setTimeout(() => __errors, 5000);
`,
"returnByValue": true
}
// 5. Screenshot for visual context
// Tool: screenshot
{ "fullPage": true, "path": "./debug/error-state.png" }
Pattern 4: Data Extraction (Web Scraping)
// 1. Navigate to target page
// Tool: navigate
{ "url": "https://example.com/products" }
// 2. Wait for dynamic content
// Tool: wait-for-selector
{ "selector": "div.product-list", "timeout": 5000 }
// 3. Extract structured data
// Tool: evaluate
{
"script": `
Array.from(document.querySelectorAll('.product-card')).map(card => ({
title: card.querySelector('h3').textContent.trim(),
price: card.querySelector('.price').textContent.trim(),
url: card.querySelector('a').href,
inStock: !card.querySelector('.out-of-stock')
}))
`,
"returnByValue": true
}
// 4. Handle pagination
// Tool: click
{ "selector": "button.next-page", "waitForNavigation": true }
Pattern 5: Visual Regression Testing
// 1. Set consistent viewport
// Tool: set-viewport
{ "width": 1280, "height": 720, "deviceScaleFactor": 1 }
// 2. Navigate to page
// Tool: navigate
{ "url": "https://example.com/landing" }
// 3. Wait for animations to complete
// Tool: wait-for-timeout
{ "timeout": 2000 }
// 4. Take baseline screenshot
// Tool: screenshot
{
"fullPage": true,
"path": "./visual-tests/baseline.png"
}
// 5. Compare against previous baseline (in your test framework)
// Tool: screenshot
{
"fullPage": true,
"path": "./visual-tests/current.png"
}
Troubleshooting
Browser Won't Start
Issue: MCP server fails with "Browser not found"
Solution:
# Specify Chrome executable path
export CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
# Or use Chrome for Testing
npx @puppeteer/browsers install chrome@stable
Port Already in Use
Issue: "Port 9222 already in use"
Solution:
# Find and kill existing Chrome instance
lsof -ti:9222 | xargs kill -9
# Or use custom port
# In MCP config, add: "--remote-debugging-port=9223"
Timeout Errors
Issue: "Navigation timeout of 30000 ms exceeded"
Solution:
// Increase timeout for slow pages
// Tool: navigate
{
"url": "https://slow-site.com",
"timeout": 60000,
"waitUntil": "domcontentloaded" // Less strict than "networkidle0"
}
Headless Mode Issues
Issue: Site behaves differently in headless mode
Solution:
// Remove --headless flag temporarily to debug
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
}
}
Memory Leaks in Long-Running Sessions
Issue: Chrome consumes excessive memory over time
Solution:
// Close and reopen browser periodically
// Tool: close-browser
{}
// Browser will auto-restart on next tool call
Source Map Errors
Issue: Stack traces not showing original source
Solution:
# Ensure source maps are deployed with your app
# Check Network tab for .map file requests
# Tool: network-logs
{ "filter": { "type": "other" } }
Corporate Proxy/Firewall
Issue: Cannot download Chrome or connect to CrUX API
Solution:
# Set proxy environment variables
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080
# Disable CrUX if API calls fail
# Add flag: --no-performance-crux
Requirements
- Node.js: v20.19 or newer (latest maintenance LTS)
- Chrome: Current stable version or newer
- npm: Any recent version
- OS: macOS, Linux, or Windows 11+
Privacy & Data Collection
- Usage Statistics: Enabled by default. Opt out with
--no-usage-statisticsflag orCHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS=1env var. - CrUX API: Performance tools may send trace URLs to Google CrUX API. Disable with
--no-performance-crux. - Browser Data: All browser content is exposed to MCP clients. Do not use with sensitive/personal data you don't want to share.
Best Practices
- Use Slim Mode for Simple Tasks: If you only need navigation and screenshots, use
--slimto reduce startup time. - Headless by Default in CI: Always use
--headlessin automated environments. - Set Timeouts Appropriately: Adjust navigation timeouts based on expected page load times.
- Clean Up Resources: For long-running scripts, periodically close the browser to free memory.
- Version Pin in Production: Use
chrome-devtools-mcp@X.Y.Zinstead of@latestfor reproducible builds. - Monitor Network: Check
network-logsbefore assuming page load issues are browser-related. - Leverage Source Maps: Deploy source maps in staging/test environments for better debugging.
Additional Resources
- Tool Reference: Standard | Slim
- CLI Documentation: CLI Guide
- Troubleshooting: Full Guide
- Puppeteer API: Official Docs
- Chrome DevTools Protocol: Protocol Reference
FAQ
What does the chrome-devtools-mcp-automation skill do?
Expert guidance for Chrome DevTools MCP server - browser automation, debugging, and performance analysis for AI agents
How do I install chrome-devtools-mcp-automation?
Run npx skills add https://github.com/reason-machines/mcp-skills --skill chrome-devtools-mcp-automation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/chrome-devtools-mcp-automation/ (personal) or .claude/skills/chrome-devtools-mcp-automation/ (project).
Which AI agents can use chrome-devtools-mcp-automation?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is chrome-devtools-mcp-automation safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains chrome-devtools-mcp-automation?
It is published by reason-machines in reason-machines/mcp-skills. It has 239 recorded installs.
More from reason-machines/mcp-skills
codebase-memory-mcp-intelligence
reason-machines/mcp-skills
High-performance code intelligence MCP server that indexes codebases into knowledge graphs for structural queries, call traces, and architecture analysis
playwright-mcp-server
reason-machines/mcp-skills
Browser automation MCP server using Playwright's accessibility tree for LLM-friendly web interaction
tradingview-mcp-assistant
reason-machines/mcp-skills
Open the skill to read its SKILL.md instructions.
lanhu-mcp-collaboration
reason-machines/mcp-skills
Open the skill to read its SKILL.md instructions.
github-mcp-server
reason-machines/mcp-skills
Open the skill to read its SKILL.md instructions.
google-meta-ads-ga4-mcp
reason-machines/mcp-skills
Open the skill to read its SKILL.md instructions.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available