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.
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.