This project provides the necessary scripts and configuration to run Chrome in debug mode for use with the Chrome DevTools MCP (Model Context Protocol).
Before using this project, ensure you have the following installed:
| Requirement | Version | Installation |
|---|---|---|
| Google Chrome | Latest | Download |
| Node.js | 18+ | Download |
| opencode | Latest | Download |
project/
├── AGENTS.md # Agent guidelines
├── opencode.json # MCP configuration
├── README.md # Project overview
├── INSTRUCTIONS.md # Detailed documentation
├── util/
│ ├── start-chrome-debug.bat # Chrome startup script (Windows)
│ └── start-chrome-debug.sh # Chrome startup script (Mac/Linux)
└── docs/
└── index.html # This documentation
# Windows util\start-chrome-debug.bat # Mac/Linux (first time: chmod +x util/start-chrome-debug.sh) ./util/start-chrome-debug.sh
http://localhost:9222/json
You should see a JSON response listing available pages/tabs.
opencode.json to connect to localhost:9222.
--remote-debugging-port=9222
Enables the Chrome DevTools Protocol on port 9222, allowing the MCP to connect and control the browser.
--no-first-run --no-default-browser-check --user-data-dir=%TEMP%\chrome-debug
--no-first-run - Skips the first-run welcome screen--no-default-browser-check - Skips the "Set as default browser" prompt--user-data-dir - Uses a temporary profile so your main Chrome settings aren't affectedThe project includes an opencode.json file that configures the Chrome DevTools MCP:
{
"mcp": {
"chrome-devtools": {
"type": "local",
"command": ["npx", "-y", "chrome-devtools-mcp@latest", "--browser-url=http://localhost:9222"],
"enabled": true
}
}
}
If the MCP cannot connect:
--remote-debugging-port=9222netstat -ano | findstr :9222If you prefer to start Chrome manually, run:
"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --no-first-run --no-default-browser-check --user-data-dir=%TEMP%\chrome-debug