Chrome Debug MCP Server

by rainmen-xia

Not rated
GitHub

About

Automate your browser by connecting to Chrome's debugging port, preserving your login state.

Details

Author
rainmen-xia
Categories
Developer Tools, Automation, Other

Setup

Install Chrome Debug MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/rainmen-xia/chrome-debug-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

Automate your browser by connecting to Chrome's debugging port, preserving your login state.

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.

- No Chrome extensions required
- No Chrome Web Store approval needed
- Fully autonomous in enterprise environments

- Perfect support for Docker/Kubernetes deployment
- No extension permission or installation issues
- Ideal for cloud-native architecture

# 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

- Based on standard Chrome DevTools Protocol
- No third-party extension permissions required
- Complete local operation

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
git clone https://github.com/rainmenxia/chrome-debug-mcp.git cd chrome-debug-mcp npm install npm run build npm start

- βœ…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 runnpx chrome-debug-mcp, no complex installation required
- πŸ”Smart Browser Discovery: Auto-discover Chrome instances in local and Docker environments

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:\temp\chrome-debug # Linux google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug

- --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

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.

{ "mcpServers": { "browser-automation": { "command": "chrome-debug-mcp" } } }
{ "mcpServers": { "browser-automation": { "command": "npx", "args": ["chrome-debug-mcp"] } } }

Connect to Chrome debug port and initialize browser session.

{ "name": "launch_browser", "arguments": { "remote_host": "http://localhost:9222" // optional } }

Navigate to specified URL with intelligent tab management.

{ "name": "navigate_to", "arguments": { "url": "https://example.com" } }
{ "name": "click", "arguments": { "coordinate": "100,200" } }
{ "name": "type_text", "arguments": { "text": "Hello World" } }
{ "name": "scroll_down", "arguments": {} }
{ "name": "hover", "arguments": { "coordinate": "100,200" } }
{ "name": "resize_browser", "arguments": { "size": "1200,800" } }
{ "name": "get_page_content", "arguments": {} }
{ "name": "close_browser", "arguments": {} }
# Manually log into Twitter/Weibo in Chrome first # Then use MCP tools for automation launch_browser -> navigate_to -> click -> type_text
# Keep logged-in state for Taobao/JD # Automate product search, price monitoring, etc. launch_browser -> navigate_to -> type_text -> click
# Scrape data from login-required websites # Bypass login verification, direct operations launch_browser -> navigate_to -> get_page_content

- Same domains (e.g.,example.com) reuse existing tabs
- Different domains automatically create new tabs
- Avoid duplicate openings of same websites

- Monitor network activity, wait for complete page loading
- HTML content stability detection
- Automatic handling of dynamic content loading

- Auto-reconnect on connection drops
- Cache successful connection endpoints
- Detailed error logs and feedback

# 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.
- 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
- Check network connection
- Increase page load timeout
- Confirm target website is accessible
- Confirm page is fully loaded
- Check browser window size settings
- Try refreshing page and retry operation

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

# Watch mode compilation npm run dev # View MCP communication logs DEBUG=mcp* npm start
# Build project npm run build # Publish to npm npm publish

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 onbrowser automation with persistent login sessions, achieving more practical automation capabilities by connecting to existing Chrome debug ports to maintain user sessions.

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 is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Official Chrome DevTools MCP server for controlling and inspecting a live Chrome browser from coding agents such as Gemini, Claude, Cursor, and Copilot.

AI-controlled browser farm β€” run N isolated Chromium instances with 36 MCP tools for device emulation, screenshots, network/geolocation simulation, and diagnostics. Cross-platform: Windows GUI + headed/headless on Linux/macOS.

A Chrome DevTools Extension that enables browser automation through the Model Context Protocol (MCP) for AI applications.

An open-source server that exposes browser functions via MCP, allowing AI models to interact with browser capabilities.

MCP server for browser automation via Puppeteer

Native desktop + browser automation MCP server with 82 tools β€” accessibility APIs (macOS/Windows), Chrome DevTools Protocol, anti-detection, memory, jobs, and reusable playbooks.

A faster, parallel browser for AI agents: it drives your own Chrome from Claude Desktop or any MCP client, on fewer round trips and tokens than Playwright MCP.

Browser automation via MCP for Chrome and Firefox

Bring the full power of BrowserStack’s Test Platform to your AI tools, making testing faster and easier for every developer and tester on your team.

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.