Provides support for running Chrome instances in Docker containers, automatically discovering and connecting to Chrome debugging ports in containerized environments.
Uses Puppeteer as the browser engine to connect to Chrome debug ports, enabling browser automation with persistent login sessions.
Enables e-commerce automation for Taobao while maintaining logged-in state, supporting product search and monitoring operations.
Chrome Debug MCP Server
A Model Context Protocol (MCP) server for Chrome browser automation via debugging protocol, specifically designed to connect to Chrome debugging ports and enable browser automation with persistent login sessions.
🎯 Project Advantages
🚀 Core Technical Advantages
- 🔧 Zero-Dependency Deployment
- No Chrome extensions required
- No Chrome Web Store approval needed
- Fully autonomous in enterprise environments
- 📦 Container-Friendly
- Perfect support for Docker/Kubernetes deployment
- No extension permission or installation issues
- Ideal for cloud-native architecture
- ⚡ Two-Step Launch
- 🛡️ Enterprise-Grade Security
- Based on standard Chrome DevTools Protocol
- No third-party extension permissions required
- Complete local operation
🚀 Quick Start
Option 1: Direct Usage (Recommended)
Launch with npx - no installation required:
Option 2: Local Development
Core Features
- ✅ Chrome Debug Port Connection: Based on standard Chrome DevTools Protocol, no extensions required
- 🏢 Enterprise-Grade Deployment: Zero-dependency deployment, no Chrome Web Store approval needed
- 📱 Intelligent Tab Management: Reuse tabs for same domains, avoid duplicate openings
- 🖼️ Real-time Screenshot Feedback: Automatic screenshots after each operation for visual feedback
- 🌐 Network Activity Monitoring: Auto-wait for page load completion
- 🐳 Native Docker Support: Perfect support for containerized Chrome instances, no extension limitations
- ⚡ Two-Step Launch: Start Chrome in debug mode then run
npx chrome-debug-mcp
, no complex installation required - 🔍 Smart Browser Discovery: Auto-discover Chrome instances in local and Docker environments
Configuration & Usage
1. Start Chrome Debug Mode (Required)
The server needs to connect to a Chrome instance with debugging port enabled:
Important Notes:
--user-data-dir
parameter points to a temporary directory, ensuring Chrome starts in debug mode- After startup, you can log into websites normally, and login sessions will be preserved
- The server will reuse this Chrome instance, no need to re-login
2. Configure MCP Client
Add the following configuration to your MCP client:
That's it! No installation, no downloads, no complex path configuration needed.
💡 Alternative Installation Methods:
Global Installation:
Local Project Installation:
Available Tools
1. launch_browser
Connect to Chrome debug port and initialize browser session.
2. navigate_to
Navigate to specified URL with intelligent tab management.
3. click
Click at specified coordinates.
4. type_text
Input text content.
5. scroll_down / scroll_up
Scroll the page.
6. hover
Hover mouse at specified position.
7. resize_browser
Resize browser window.
8. get_page_content
Get current page HTML content.
9. close_browser
Close browser connection.
Typical Use Cases
1. Social Media Automation
2. E-commerce Operations
3. Data Scraping
Advanced Features
Intelligent Tab Management
- Same domains (e.g.,
example.com
) reuse existing tabs - Different domains automatically create new tabs
- Avoid duplicate openings of same websites
Auto-wait Mechanisms
- Monitor network activity, wait for complete page loading
- HTML content stability detection
- Automatic handling of dynamic content loading
Error Recovery
- Auto-reconnect on connection drops
- Cache successful connection endpoints
- Detailed error logs and feedback
Docker Environment Support
If Chrome runs in a Docker container:
The server will automatically discover Chrome instances in Docker environments.
Troubleshooting
Chrome Connection Failed
- Confirm Chrome is started with
--remote-debugging-port=9222
- Check if port 9222 is occupied:
lsof -i :9222
- Ensure no other Chrome instances are running
Operation Timeout
- Check network connection
- Increase page load timeout
- Confirm target website is accessible
Screenshot Failed
- Confirm page is fully loaded
- Check browser window size settings
- Try refreshing page and retry operation
Technical Architecture
- Transport Protocol: stdio (standard input/output)
- Browser Engine: Puppeteer + Chrome DevTools Protocol
- Connection Method: WebSocket (Chrome debug port)
- Image Format: WebP/PNG base64 encoding
Development & Debugging
Publishing to npm
Acknowledgments
This project's design philosophy and core concepts were inspired by the RooCode project. RooCode is an excellent browser automation MCP server implementation that provided valuable technical references and design insights.
Special thanks to the RooCode team for their contributions in the following areas:
- 🎯 MCP Protocol Integration: Provided technical solutions for combining MCP servers with browser automation
- 🔗 Browser Connection: Demonstrated elegant browser connection and session management
- 📋 Tool API Design: Provided reference frameworks for standardizing browser operations
Building upon RooCode's foundation, this project further focuses on browser automation with persistent login sessions, achieving more practical automation capabilities by connecting to existing Chrome debug ports to maintain user sessions.
License
MIT License
Core Advantage: The biggest feature of this MCP server is its ability to connect to existing Chrome instances and maintain login sessions, making it ideal for automation scenarios requiring user authentication. Through Chrome debug ports, it can take over user-logged browser sessions, achieving true "session-persistent" browser automation.
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A Model Context Protocol server that connects to Chrome debugging ports, enabling browser automation with persistent login sessions.
Related MCP Servers
- AsecurityFlicenseAqualityControls Chrome browser with debugging capabilities, allowing page automation, extension management, and userscript injection through the Model Context Protocol.Last updated -1313JavaScript
- -securityFlicense-qualityA Model Context Protocol server that provides browser automation capabilities using BrowserCat's cloud browser service. This server enables LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment without needing to install browsers locally.Last updated -39
- -securityAlicense-qualityAI-driven browser automation server that implements the Model Context Protocol to enable natural language control of web browsers for tasks like navigation, form filling, and visual interaction.Last updated -1PythonMIT License
- -security-license-qualityA Model Context Protocol server that enables AI assistants to control Chrome browsers through the Chrome DevTools Protocol, allowing for navigation, clicking, typing, and extracting page information.Last updated -3TypeScript