Chrome DevTools MCP — Browser Debugging for AI Agents
Give your AI coding agent full access to Chrome DevTools for browser automation, debugging, and performance analysis. Works with Claude, Cursor, Copilot, and 15+ AI tools.
Safe staging for this asset
This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.
npx -y tokrepo@latest install 17f46368-d971-4227-ab65-f5f183e7dedc --target codexStages files first; activation requires review of the staged README and plan.
What it is
Chrome DevTools MCP is a Model Context Protocol server that lets AI coding agents control and inspect a live Chrome browser. With 29 built-in tools, it provides reliable browser automation via Puppeteer, advanced network debugging, console analysis, and performance tracing.
It is built for developers who need AI-assisted browser testing, debugging, and performance analysis. It works with Claude Code, Cursor, Copilot, VS Code, and 15+ other AI tools.
How it saves time or tokens
Instead of manually switching between your editor and browser DevTools, your AI agent can inspect the DOM, read console errors, capture screenshots, and trace network requests directly. The --slim flag reduces the tool count for token-constrained contexts, and --headless mode runs without a visible browser window for CI pipelines.
How to use
- Add the MCP server config to your
.mcp.json - Restart your AI tool (Claude Code, Cursor, etc.)
- Ask your agent to navigate, click, inspect, or debug in the browser
Example
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
}
}
For lightweight usage with fewer tools and less token consumption:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest", "--slim", "--headless"]
}
}
}
Once configured, your agent can run commands like:
'Navigate to localhost:3000 and check if there are any console errors'
'Take a screenshot of the login page'
'Run a Lighthouse audit on the homepage'
Related on TokRepo
- MCP Chrome Integration -- Deep dive into Chrome MCP capabilities
- AI Tools for Browser Automation -- Browser automation tools for AI agents
Common pitfalls
- The MCP server launches its own Chrome instance; if you have multiple instances running, port conflicts can occur
- The --slim flag is recommended for most use cases to avoid overwhelming the agent with 29 tools when only a few are needed
- Headless mode does not support visual debugging; use headed mode when you need to see what the browser is doing
Frequently Asked Questions
Chrome DevTools MCP works with Claude Code, Cursor, Copilot, VS Code, Windsurf, Claude Desktop, and 15+ other AI tools that support the Model Context Protocol. Any MCP-compatible client can use it.
Normal mode exposes all 29 tools. Slim mode reduces the tool count to the most commonly used ones, lowering token consumption per request. Use slim mode unless you specifically need advanced tools like performance tracing.
Yes. Use the --headless flag to run without a visible browser window. This works well in CI environments where there is no display. Combine with --slim for minimal resource usage.
No. Chrome DevTools MCP uses Puppeteer, which controls Chromium-based browsers only. Firefox and Safari are not supported.
Check that Node.js v18+ is installed, that no other Chrome instances are blocking the debug port, and that your .mcp.json is in the correct location. Restart your AI tool after making config changes.
Citations (3)
- Chrome DevTools MCP GitHub— Chrome DevTools MCP provides 29 built-in tools via Puppeteer
- MCP Specification— Model Context Protocol specification
- Puppeteer Documentation— Puppeteer browser automation library
Related on TokRepo
Source & Thanks
Created by ChromeDevTools. Licensed under MIT.
chrome-devtools-mcp — ⭐ 33,100+
Thank you to the Chrome DevTools team for building this essential bridge between AI agents and browser debugging.
Discussion
Related Assets
Notte — Browser Automation MCP for AI Agents
MCP server that turns web browsers into AI agent tools. Notte provides structured browser actions like click, type, navigate, and extract for LLM-driven automation.
Puppeteer MCP — Headless Chrome Server for AI Agents
MCP server wrapping Google Puppeteer for headless Chrome automation. Navigate pages, screenshot, generate PDFs, scrape SPAs, and test web apps through AI agent commands. 2,000+ stars.
Chrome MCP Operations Runbook — Iron Rules, Architecture & Troubleshooting
Operations skill for running chrome-devtools-mcp against your real Chrome at scale. Covers the proxy architecture, five iron rules (always-via-proxy, real-browser-only, no-env-proxy, never-kill-current-session, persistent-proxy), Chrome 146+ remote-debug popup workaround, multi-agent isolation guarantees, configuration recipes for ~/.mcp.json and ~/.claude/settings.json (with the 'no glob in permissions' gotcha), step-by-step troubleshooting flow, and four field notes from real incidents — port cleanup heuristics that backfire, protocol-layer hang detection, why 'newest = keep' is wrong, and why heavy pages need filePath-first take_snapshot to avoid 25k token overflow. Pairs with the 'Chrome MCP Background Proxy' script bundle.
charlotte — Token-Efficient Browser MCP Server
Charlotte is a token-efficient browser MCP server: agents get a compact page summary by default, then query only the elements they need.