Chrome Debug Protocol▌
by rainmen-xia
Automate Chrome for web scraping, testing, and content retrieval using browser automation studio, with session persisten
Provides browser automation capabilities through Chrome's debugging protocol with session persistence, enabling web scraping, testing, and automation tasks with tools for screenshots, navigation, element interaction, and content retrieval.
Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.
best for
- / Web scraping and data extraction
- / Automated browser testing
- / Enterprise automation workflows
- / Cloud-native containerized deployments
capabilities
- / Take real-time screenshots during automation
- / Navigate web pages with intelligent tab management
- / Click elements and input text on web pages
- / Scroll and resize browser windows
- / Extract HTML content from pages
- / Maintain persistent login sessions
what it does
Connects to Chrome's debugging protocol to automate browsers for web scraping, testing, and automation tasks. Maintains persistent sessions and login states across operations.
about
Chrome Debug Protocol is a community-built MCP server published by rainmen-xia that provides AI assistants with tools and capabilities via the Model Context Protocol. Automate Chrome for web scraping, testing, and content retrieval using browser automation studio, with session persisten It is categorized under browser automation, search web. This server exposes 10 tools that AI clients can invoke during conversations and coding sessions.
how to install
You can install Chrome Debug Protocol in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
MIT
Chrome Debug Protocol is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
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
# Launch with just two commands # 1. Start Chrome in debug mode /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug # 2. Run MCP server npx chrome-debug-mcp -
🛡️ 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:
# 1. Start Chrome in debug mode
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug
# 2. Run MCP server directly
npx chrome-debug-mcp
Option 2: Local Development
git clone https://github.com/rainmenxia/chrome-debug-mcp.git
cd chrome-debug-mcp
npm install
npm run build
npm start
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:
# macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug
# Windows
chrome.exe --remote-debugging-port=9222 --user-data-dir=c: emp\chrome-debug
# Linux
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug
Important Notes:
--user-data-dirparameter 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:
{
"mcpServers": {
"browser-automation": {
"command": "npx",
"args": ["chrome-debug-mcp"]
}
}
}
That's it! No installation, no downloads, no complex path configuration needed.
💡 Alternative Installation Methods:
Global Installation:
npm install -g chrome-debug-mcp{ "mcpServers": { "browser-automation": { "command": "chrome-debug-mcp" } } }Local Project Installation:
npm install chrome-debug-mcp{ "mcpServers": { "browser-automation": { "command": "npx", "args": ["chrome-debug-mcp"] } } }
Available Tools
1. launch_browser
Connect to Chrome debug port and initialize browser session.
{
"name": "launch_browser",
"arguments": {
"remote_host": "http://localhost:9222" // optional
}
}
2. navigate_to
Navigate to specified URL with intelligent tab management.
{
"name": "navigate_to",
"arguments": {
"url": "https://example.com"
}
}
3. click
Click at specified coordinates.
{
"name": "click",
"arguments": {
"coordinate": "100,200"
}
}
4. type_text
Input text content.
{
"name": "type_text",
"arguments": {
"text": "Hello World"
}
}
5. scroll_down / scroll_up
Scroll the page.
{
"name": "scroll_down",
"arguments": {}
}
6. hover
Hover mouse at specified position.
{
"name": "hover",
"arguments": {
"coordinate": "100,200"
}
}
7. resize_browser
Resize browser window.
{
"name": "resize_browser",
"arguments": {
"size": "1200,800"
}
}
8. get_page_content
Get current page HTML content.
{
"name": "get_page_content",
"arguments": {}
}
9. close_browser
Close browser connection.
{
"name": "close_browser",
"arguments": {}
}
Typical Use Cases
1. Social Media Automation
# Manually log into Twitter/Weibo in Chrome first
# Then use MCP tools for automation
launch_browser -> navigate_to -> click -> type_text
2. E-commerce Operations
# Keep logged-in state for Taobao/JD
# Automate product search, price monitoring, etc.
launch_browser -> navigate_to -> type_text -> click
3. Data Scraping
# Scrape data from login-required websites
# Bypass login verification, direct operations
launch_browser -> navigate_to -> get_page_content
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:
# Start Chrome in Docker
docker run -d --name chrome-debug \
-p 9222:9222 \
--shm-size=2gb \
zenika/alpine-chrome \
--no-sandbox \
--disable-dev-shm-usage \
--remote-debugging-address=0.0.0.0 \
--remote-debugging-port=9222
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
MCP Client ←→ stdio ←→ MCP Server ←→ Chrome Debug Port ←→ Chrome Browser
- 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
# Watch mode compilation
npm run dev
# View MCP communication logs
DEBUG=mcp* npm start
Publishing to npm
# Build project
npm run build
# Publish to npm
npm publish
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.
FAQ
- What is the Chrome Debug Protocol MCP server?
- Chrome Debug Protocol is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for Chrome Debug Protocol?
- This profile displays 51 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
Use Cases▌
Web Research & Information Gathering
Fetch and extract information from websites automatically
Example
Research competitor pricing, scrape product reviews, monitor news mentions
Automate 5-10 hours/week of manual web research
Content Monitoring & Alerts
Track website changes, new content, price updates
Example
Monitor competitor blog for new posts, track stock availability, watch for pricing changes
Stay informed without manual checking, never miss important updates
Data Extraction & Aggregation
Extract structured data from multiple websites
Example
Compile product listings from 10 e-commerce sites, aggregate job postings, collect real estate data
Build datasets 100x faster than manual copying
API-less Integration
Interact with services that don't offer APIs
Example
Check form submissions, validate website functionality, test user flows
Automate interactions with any website, even without API
Implementation Guide▌
Prerequisites
- ›Claude Desktop or Cursor with MCP support
- ›Understanding of web scraping ethics and robots.txt
- ›Rate limiting awareness to avoid overwhelming target sites
- ›Knowledge of legal restrictions on data collection
Time Estimate
20-40 minutes including configuration and testing
Installation Steps
- 1.Install web automation MCP server via npm or pip
- 2.Configure allowed domains and rate limits in MCP config
- 3.Test with simple fetch: 'Get content from example.com'
- 4.Progress to extraction: 'Extract all product prices from this page'
- 5.Set up monitoring: 'Check this URL daily for changes'
- 6.Parse structured data: 'Create CSV from this table'
- 7.Respect robots.txt and rate limits always
Troubleshooting
- ⚠403 Forbidden: Website blocks bots—respect their wishes, use official API instead
- ⚠Rate limit errors: Slow down requests, add delays between fetches
- ⚠Stale data: Target site changed HTML structure—update selectors
- ⚠Timeout errors: Site is slow or blocking—increase timeout, try different user agent
- ⚠JavaScript-rendered content: Use headless browser MCP servers for dynamic sites
Best Practices▌
✓ Do
- +Check robots.txt and respect crawl rules
- +Rate limit requests: 1-2 requests/second maximum
- +Use official APIs when available instead of scraping
- +Identify your bot with descriptive user agent
- +Cache results to minimize repeated requests
- +Handle errors gracefully with retries and fallbacks
- +Validate extracted data for accuracy
✗ Don't
- −Don't scrape sites that explicitly forbid it (robots.txt, ToS)
- −Don't overwhelm servers with rapid requests—use rate limiting
- −Don't scrape personal data without consent and legal basis
- −Don't ignore copyright on extracted content
- −Don't assume HTML structure is stable—handle changes
- −Don't use scraped data for commercial purposes without permission
💡 Pro Tips
- ★Use CSS selectors or XPath for robust data extraction
- ★Set up monitoring alerts for extraction failures (structure changed)
- ★Implement exponential backoff for retries on failures
- ★Store raw HTML for reprocessing if extraction logic changes
- ★Combine with data analysis tools for insights from extracted data
- ★Consider using official APIs or RSS feeds as more stable alternatives
Technical Details▌
Architecture
MCP server handles HTTP requests, HTML parsing, JavaScript rendering (if headless browser), and returns structured data to Claude.
Protocols
- HTTP/HTTPS
- WebSocket (for real-time sites)
- Puppeteer/Playwright (for JavaScript sites)
Compatibility
- Static HTML sites
- JavaScript-rendered SPAs (with headless browser)
- REST APIs
- GraphQL endpoints
When to Use This▌
✓ Use When
Use for research automation, content monitoring, data aggregation from multiple sources, and when official APIs don't exist. Best for read-only information gathering.
✗ Avoid When
Avoid for sites with APIs (use API instead), sites that explicitly forbid scraping, when data is copyrighted, or for login-required content without proper authorization.
Integration▌
- →Scheduled monitoring with change detection
- →Multi-source data aggregation pipelines
- →Fallback to web scraping when API rate limits hit
- →Headless browser for JavaScript-heavy sites
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
List & Promote Your MCP Server
Share your MCP server with the developer community
Ratings
4.5★★★★★51 reviews- ★★★★★Dhruvi Jain· Dec 24, 2024
Chrome Debug Protocol reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Pratham Ware· Dec 20, 2024
According to our notes, Chrome Debug Protocol benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Aditi Patel· Dec 16, 2024
Chrome Debug Protocol reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Diego Liu· Dec 12, 2024
Chrome Debug Protocol is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Min Yang· Dec 4, 2024
We wired Chrome Debug Protocol into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★James Agarwal· Nov 23, 2024
We evaluated Chrome Debug Protocol against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Oshnikdeep· Nov 15, 2024
I recommend Chrome Debug Protocol for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
- ★★★★★Kiara Khan· Nov 7, 2024
I recommend Chrome Debug Protocol for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
- ★★★★★Diego Malhotra· Nov 3, 2024
Chrome Debug Protocol is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
- ★★★★★Maya Mehta· Oct 26, 2024
Strong directory entry: Chrome Debug Protocol surfaces stars and publisher context so we could sanity-check maintenance before adopting.
showing 1-10 of 51