Chrome Debug MCP Server
local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Uses Puppeteer for Chrome automation, allowing page interaction, tab management, and browser control
Chrome Debug MCP Server
A Model Context Protocol (MCP) server for controlling Chrome with debugging capabilities, userscript injection, and extension support.
Features
Chrome Control
- Launch Chrome with custom configurations
- Support for custom Chrome executable paths
- User profile management (default or custom user data directory)
- Extension support and management
- Disable Chrome's "Automation Controlled" banner
Page Automation
- Click, type, and interact with page elements
- Handle dropdowns and form inputs
- Hover and wait for elements
- Take screenshots of full page or elements
- Navigate between pages
- Set viewport size and device emulation
- Extract text and attributes from elements
Tab Management
- List all open tabs with their IDs and URLs
- Open new tabs with specified URLs
- Close tabs by ID
- Switch between tabs
- Track and manage multiple tab states
Debugging Capabilities
- Remote debugging via Chrome DevTools Protocol (CDP)
- Console log capture and monitoring
- JavaScript evaluation in page context
- Real-time console output streaming
Userscript Support
- Inject userscripts into web pages
- Greasemonkey-style API support:
GM_setValue
/GM_getValue
for persistent storageGM_addStyle
for CSS injectionGM_xmlhttpRequest
for cross-origin requestsGM_openInTab
for new tab creationGM_registerMenuCommand
for menu commands
Extension Integration
- Load unpacked extensions
- Maintain extension states and configurations
- Support for default Chrome profile extensions
- Selective extension enabling/disabling
Installation
Prerequisites
- Node.js (v14 or higher)
- Chrome browser installed
- Visual Studio Code
- Roo Code Extension
Installing Roo Code Extension
- Open Visual Studio Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Roo Code"
- Click Install
Setting up Chrome Debug MCP Server
- Clone this repository:Copy
- Install dependencies:Copy
- Build the project:Copy
- Configure in Roo Code:
Add to
cline_mcp_settings.json
:Copy
Usage
For a complete reference of all available commands, tools, and functions, see COMMANDS.md.
Basic Chrome Launch
Launch with Custom Profile
Inject Userscript
Evaluate JavaScript
Get Console Logs
Page Interaction Examples
Click an Element
Type into Input
Select from Dropdown
Wait for Element
Take Screenshot
Set Viewport Size
Tab Management Examples
List All Tabs
Open New Tab
Switch to Tab
Close Tab
Dependencies
This project uses the following open-source packages:
- Puppeteer - Chrome automation library
- chrome-remote-interface - Chrome DevTools Protocol client
- @modelcontextprotocol/sdk - MCP SDK for server implementation
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
See our Contributing Guide for details on making contributions.
Acknowledgments
You must be authenticated.
Controls Chrome browser with debugging capabilities, allowing page automation, extension management, and userscript injection through the Model Context Protocol.