Control, automate, and debug Chromium-based browsers via CDP
chrome-debug-mcp
chrome-debug-mcp is an asynchronous Rust-based Model Context Protocol (MCP) server that allows AI agents and Large Language Models to natively control, automate, and debug Chromium-based browsers via the Chrome DevTools Protocol (CDP).
Using cdp-lite underneath, this MCP server directly hooks into the browser avoiding heavy abstractions, enabling live-debugging sessions directly from your editor or chat-interface. Starting from v0.2.0, it can also manage the Chrome process lifecycle automatically.
✨ Features (v1.0.4)
This server natively implements a suite of tools categorized by CDP domains and native process management:
🛡️ Privacy & Security
- Isolated Profiles (Default): By default, every time the MCP server launches Chrome, it creates a fresh, temporary user profile in your system's temporary directory. This profile is completely independent of your main browser profile.
- Incognito-like Experience: No cookies, history, saved passwords, or session data from your personal accounts are shared with the managed instance by default.
- Identity Protection: Even if an LLM has full control over the browser, it cannot access your logged-in sessions (e.g., Google, GitHub, banking) or impersonate you unless explicitly authorized.
- User Profile Mode (v1.0.4): Use the
--user-profileflag to launch Chrome using your existing system profile. This is useful when you want the LLM to work within your active sessions (cookies, saved logins, etc.) without having to re-authenticate on every site. Use with caution as this provides the LLM access to your personal browser data.
🔒 Local-Only Mode (v0.9.3)
- Restricted Navigation: Run the MCP server with the
--localargument to restrict navigation to local addresses only:localhost,127.0.0.1,192.168.x.x, or addresses with the.localsuffix. This is ideal for securely debugging local development environments without risking accidental navigation to external sites. - Clear Error Messaging: If a navigation to an external address is attempted in local-only mode, the server returns a descriptive error explaining the restriction and how to disable it.
🛠️ Custom CDP Commands (v0.9.0)
send_cdp_command: EXPERIMENTAL. Send any raw CDP command directly to the browser. This serves as a powerful fallback for any domain or command not yet natively implemented in specialized tools.get_custom_events: Retrieve a list of events captured from the browser that are not handled by other specialized listeners (like network or console). Essential for observing the side-effects of custom commands.- Broad Event Capture: Automatically captures events from over 20+ domains (Target, DOM, CSS, Storage, etc.) and stores them in a rolling buffer for later inspection.
🚀 Chrome Instance Management (v1.0.0)
- Isolated Profiles: Launches Chrome using a fresh, temporary profile by default, ensuring it doesn't share cookies, passwords, or session data with your main browser.
- User Profile Support (v1.0.4): Optionally use
--user-profileto leverage your existing browser sessions and cookies. - Docker & Headless Support: Full compatibility with Docker environments. Use the
--headlessflag to run Chrome without a GUI inside containers. - Remote/Host Connection: Use the
--hostargument to connect to a Chrome instance running on a different machine or the host machine (e.g.,--host host.docker.internalfrom inside a container). - Optional Automation Infobar: Add the
--enable-automationflag to explicitly show the native "Chrome is being controlled by automated test software" message. By default, this is disabled for stealthier interaction. - Proxy Support:
restart_chromenow accepts an optionalproxy_serverargument to launch Chrome routing traffic through a proxy. - Auto-Launch: Automatically detects if Chrome is running on the specified port. If not, it spawns a new instance with the required flags.
restart_chrome: Restarts the managed Chrome instance.stop_chrome: Shuts down the managed Chrome instance gracefully (SIGTERM/SIGINT with fallback to SIGKILL).- Robust Lifecycle: Fixed issues with dangling Chrome processes and patched preferences for cleaner restarts.
🔐 Proxy Authentication (v0.8.0)
enable_proxy_auth: Automatically handles proxy
Tools (4)
send_cdp_commandSend any raw Chrome DevTools Protocol command directly to the browser.get_custom_eventsRetrieve a list of events captured from the browser that are not handled by other specialized listeners.restart_chromeRestarts the managed Chrome instance.stop_chromeShuts down the managed Chrome instance gracefully.Configuration
{"mcpServers": {"chrome-debug": {"command": "chrome-debug-mcp"}}}