A comprehensive Windows setup guide for chrome-devtools-mcp with support for all major AI coding assistants including Codex, Cursor, Windsurf, Continue.dev, Cline, Zed, Visual Studio, GitHub Copilot, and more. This repository provides PowerShell scripts, configuration examples, and detailed troubleshooting to get Chrome browser automation working reliably on Windows 10/11.
chrome-devtools-mcp is a Model Context Protocol (MCP) server that enables AI coding assistants to control Chrome browser instances. It allows your AI assistant to navigate websites, inspect DOM elements, take screenshots, interact with web pages, and analyze performance programmatically.
Works with: Codex, Cursor, Windsurf, Continue.dev, Cline, Zed Editor, Visual Studio, GitHub Copilot, JetBrains AI Assistant, and any other MCP-compatible coding assistant.
Before you begin, ensure you have the following installed on your Windows system:
- Node.js (version 20.19 or higher) - Download from https://nodejs.org/
- npm (comes with Node.js)
- Google Chrome browser (latest stable version)
- Any MCP-compatible AI coding assistant (Codex, Cursor, Windsurf, VS Code with Continue/Cline, etc.)
- PowerShell 5.1 or higher (included with Windows 10/11)
Before you begin, ensure you have:
- Node.js v20.19 or newer (latest maintenance LTS) - Download from https://nodejs.org/
- Google Chrome (latest stable version) - Download from https://www.google.com/chrome/
- npm (comes with Node.js)
Verify your installation:
node --version
npm --versionThe official and recommended way is to use npx which requires NO global installation:
npx -y chrome-devtools-mcp@latest --helpThis ensures you always use the latest version. Your IDE configuration will use:
command = "npx"
args = ["-y", "chrome-devtools-mcp@latest"]If you prefer a global installation (faster startup, works offline):
npm install -g chrome-devtools-mcpVerify the installation:
chrome-devtools-mcp --versionYour IDE configuration will use:
command = "C:\\Users\\<YOUR_USER>\\AppData\\Roaming\\npm\\chrome-devtools-mcp.cmd"
args = ["--browser-url=http://localhost:9222"]Start Chrome with remote debugging enabled:
& "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="%TEMP%\chrome-profile-stable"Important: Chrome requires a non-default user data directory when remote debugging is enabled for security reasons.
Verify Chrome is accepting connections:
Invoke-WebRequest -Uri "http://localhost:9222/json/version"You should see a JSON response with browser version information.
This repository includes PowerShell scripts to simplify Chrome setup:
-
Headful mode (recommended for sites with anti-bot protection):
.\scripts\Start-Chrome-Debug.ps1
-
Headless mode (for automation without UI):
.\scripts\Start-ChromeMCP.ps1 -
Configure your IDE automatically (supports Codex and compatible IDEs):
.\scripts\Make-Config.ps1
Option 1: Using Codex CLI (Recommended)
codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latestOption 2: Manual Configuration
Copy one of the example configuration files to your Codex config directory:
Copy-Item .\examples\config.headful.toml $env:USERPROFILE\.codex\config.tomlWindows 11 Specific Configuration (Official Recommendation):
On Windows 11, use the cmd wrapper and increase the startup timeout. Your .codex/config.toml should look like:
[mcp_servers.chrome-devtools]
command = "cmd"
args = [
"/c",
"npx",
"-y",
"chrome-devtools-mcp@latest",
]
env = { SystemRoot="C:\\Windows", PROGRAMFILES="C:\\Program Files" }
startup_timeout_ms = 20000For connecting to a manually started Chrome instance, add --browser-url=http://localhost:9222 to the args.
Quick Install:
# Use Cursor's one-click install from official repo
# Or configure manually in Settings > MCPCopy the example configuration:
Copy-Item .\examples\config.cursor.toml $env:USERPROFILE\.cursor\config.tomlCopy the example configuration:
Copy-Item .\examples\config.windsurf.toml $env:USERPROFILE\.windsurf\mcp_config.tomlContinue.dev:
Copy-Item .\examples\config.continue.json $env:USERPROFILE\.continue\config.jsonCline:
Copy-Item .\examples\config.cline.json $env:USERPROFILE\.cline\mcp_settings.jsonOr use VS Code Settings UI:
- Open Settings (Ctrl+,)
- Search for your extension's MCP settings
- Add chrome-devtools-mcp server configuration
Copy the example configuration:
Copy-Item .\examples\config.zed.json $env:APPDATA\Zed\settings.jsonSee the examples/ directory for additional IDE-specific configurations:
- Visual Studio
- GitHub Copilot / VS Code
- JetBrains AI Assistant & Junie
- And more...
Once configured in your AI coding assistant, you can use commands like:
Example 1: Open a URL and inspect elements
Open https://example.com and tell me what the main heading says
Example 2: Count links on a page
Navigate to https://news.ycombinator.com and count how many links are on the page
Example 3: Take a screenshot
Open https://github.com and take a screenshot of the homepage
Example 4: Performance analysis
Check the performance of https://developers.chrome.com
Example 5: Inspect specific elements
Go to https://www.wikipedia.org and inspect the search input field
These examples work with any MCP-compatible AI assistant: Codex, Cursor, Windsurf, Continue.dev, Cline, and others.
Many modern websites use Cloudflare or similar anti-bot protection mechanisms. When you encounter these:
- Use headful mode (scripts/Start-Chrome-Debug.ps1) to manually complete challenges
- Do not attempt to bypass automated protection systems
- Wait for verification to complete before issuing AI commands
- Some sites may not work in headless mode due to detection mechanisms
This tool is intended for:
- Testing your own web applications
- Legitimate web scraping with permission
- Automation of repetitive tasks on sites you own or have authorization to access
Do not use this tool to:
- Bypass security measures or terms of service
- Perform unauthorized data collection
- Engage in any malicious or illegal activities
-
Test npx works:
npx -y chrome-devtools-mcp@latest --help
-
Check Chrome debugging port:
Invoke-WebRequest -Uri "http://localhost:9222/json/version"
-
Verify Node.js version (must be 20.19+):
node --version
Check if another process is using the port:
netstat -ano | findstr :9222Kill existing Chrome processes:
taskkill /F /IM chrome.exe- Verify Chrome is running with remote debugging enabled
- Check that http://localhost:9222/json/version returns data
- Review the startup_timeout_ms setting in your config.toml
- Check Windows Firewall is not blocking local connections
Clear npm cache:
npm cache clean --force
Remove-Item -Recurse -Force $env:LOCALAPPDATA\npm-cache\_npx -ErrorAction SilentlyContinueEnsure all paths use proper format:
- TOML files: Use double backslashes:
C:\\Users\\... - JSON files: Use double backslashes:
C:\\Users\\...
For complete troubleshooting, see docs/TROUBLESHOOTING.md
This setup works with any MCP-compatible AI coding assistant on Windows:
-
Codex IDE - Full MCP support with config.toml
- Install via CLI:
codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latest - Official MCP Guide
- Windows 11: Use cmd wrapper with 20 second timeout (see config examples)
- Install via CLI:
-
Cursor - Configure via MCP settings
- One-click install available from official repository
- Manual configuration in Settings > MCP
-
Windsurf - Supports MCP servers
-
Continue.dev - MCP integration for VS Code
- Install MCP servers via extension settings
-
Cline - VS Code extension (formerly Claude Dev)
-
Zed Editor - Native MCP protocol support
- Uses "context_servers" configuration
-
Visual Studio - Built-in MCP support
- One-click install available
-
Copilot / VS Code - GitHub Copilot with MCP
- Install via VS Code CLI:
code --add-mcp '{"name":"chrome-devtools","command":"npx","args":["chrome-devtools-mcp@latest"]}'
- Install via VS Code CLI:
-
JetBrains AI Assistant & Junie - MCP support in IntelliJ IDEA and other JetBrains IDEs
-
Other editors with MCP client implementations
All configurations use the official recommended method:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
}
}Configuration may vary slightly by editor. Refer to docs/USAGE.md and examples/ for detailed setup instructions for each platform.
- Detailed Usage Guide - Complete setup and configuration
- Troubleshooting Guide - Solutions to common problems
- Example Configurations - Ready-to-use config files for all IDEs
- PowerShell Scripts - Automation helpers
- Test Prompts - Sample commands to verify setup
Contributions are welcome! If you encounter issues or have improvements:
- Fork the repository
- Create a feature branch
- Submit a pull request with a clear description of changes
Please ensure all scripts and configurations are tested on Windows 10/11 with multiple IDEs before submitting.
- Additional IDE configurations
- Improved PowerShell scripts
- Better troubleshooting documentation
- Translation to other languages
- Bug fixes and performance improvements
If you encounter problems:
- Check the troubleshooting section in
docs/TROUBLESHOOTING.md - Search existing issues on GitHub
- Create a new issue with detailed information:
- Windows version
- Node.js version
- Chrome version
- IDE/coding assistant name and version
- Error messages or logs
This project is licensed under the MIT License. See the LICENSE file for details.
Built for the chrome-devtools-mcp package by the MCP community. Special thanks to:
- The Chrome DevTools team at Google
- All contributors working to make browser automation accessible on Windows
- The MCP community for supporting multiple AI coding assistants
- Contributors to Codex, Cursor, Windsurf, Continue.dev, Cline, and other AI coding tools