Let Your Coding Agent Debug with Chrome DevTools MCP
Let Your Coding Agent Debug with Chrome DevTools MCP
Your AI coding agent can write code, run tests, and read error logs. But when something breaks in the browser, it is blind. It cannot see the network tab, read console errors, or inspect the DOM. Adding Chrome DevTools MCP to your desktop automation setup fixes this.
The Gap in Current Workflows
Today's AI coding agents work in the terminal. They edit files, run commands, and parse output. When a bug is visual or involves browser behavior - a failed API call, a CORS error, a React hydration mismatch - the agent cannot debug it. You have to open DevTools yourself, find the error, and paste it back into the agent's context.
This is the exact kind of manual context-shuttling that agents are supposed to eliminate.
DevTools MCP Closes the Loop
Chrome DevTools MCP exposes browser internals as tools the agent can call:
- Console: Read errors, warnings, and log output
- Network: Inspect request/response pairs, status codes, timing
- DOM: Query elements, check computed styles, read attributes
- Performance: Identify slow renders and layout thrashing
When your agent makes a code change, it can immediately check the browser's reaction without you acting as the intermediary.
Combining with Desktop Automation
DevTools MCP handles the browser internals. Desktop automation - through the accessibility API - handles everything outside the browser. Together, they let an agent:
- Edit a React component
- Watch the hot reload in the browser
- Check the console for errors
- Inspect the network tab for failed API calls
- Click through the UI to test the fix
- All without human intervention
The Setup
Run Chrome with remote debugging enabled (--remote-debugging-port=9222), connect the DevTools MCP server, and add it alongside your existing desktop automation MCP servers. The agent now has eyes into both the browser and the operating system.
This is what full-stack agent debugging actually looks like.
Fazm is an open source macOS AI agent. Open source on GitHub.