mcp-chrome-cdp
Gives AI agents full control over a running Google Chrome instance through the Chrome DevTools Protocol over WebSocket. Provides 54 tools spanning tab management, navigation, screenshots and PDF generation, JavaScript execution and DOM queries, input simulation (clicks, typing, scrolling, drag-and-drop, touch), network request/response monitoring and throttling, console log capture, cookie and storage management, device/geolocation/timezone/media emulation, performance metrics, accessibility tree inspection, and window/dialog control.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-chrome-cdp open example.com and take a screenshot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-chrome-cdp
MCP server that gives AI agents full control over Chrome through the Chrome DevTools Protocol. Direct WebSocket connection to Chrome — no Puppeteer, no Playwright, no overhead.
54 tools across 12 categories: navigation, screenshots, JavaScript execution, DOM queries, input simulation, network monitoring, console capture, cookie/storage management, device emulation, performance metrics, accessibility, and browser control.
Quick Start
1. Start Chrome with remote debugging
# macOS
open -a "Google Chrome" --args --remote-debugging-port=9222
# Linux
google-chrome --remote-debugging-port=9222
# Windows
start chrome --remote-debugging-port=92222. Install
git clone https://github.com/YosephFr/mcp-chrome-cdp.git
cd mcp-chrome-cdp
npm install3. Add to Claude Code
Create or edit ~/.mcp.json:
{
"mcpServers": {
"chrome-cdp": {
"command": "node",
"args": ["/absolute/path/to/mcp-chrome-cdp/index.js"]
}
}
}Restart Claude Code. Verify with /mcp — you should see chrome-cdp connected.
4. Configuration
The server connects to 127.0.0.1:9222 by default. Override with environment variables:
{
"mcpServers": {
"chrome-cdp": {
"command": "node",
"args": ["/absolute/path/to/mcp-chrome-cdp/index.js"],
"env": {
"CDP_HOST": "127.0.0.1",
"CDP_PORT": "9222"
}
}
}
}Related MCP server: Chrome DevTools MCP
Tools
Tabs
Tool | Description |
| List all open tabs and targets |
| Open a new tab with optional URL |
| Close a tab by ID |
| Bring a tab to the foreground |
Navigation
Tool | Description |
| Navigate to a URL (waits for page load) |
| Reload the page, optionally bypassing cache |
| Navigate back in history |
| Navigate forward in history |
| Get the current URL |
| Wait for a selector to appear or a fixed delay |
Screenshots & PDF
Tool | Description |
| Capture PNG/JPEG/WebP screenshot (viewport, full page, or clipped region) |
| Generate PDF of the current page |
JavaScript & DOM
Tool | Description |
| Execute arbitrary JavaScript in the page context |
| Find elements by CSS selector, return HTML or attributes |
| Get visible text content of the page or an element |
| Get outerHTML or innerHTML of the page or an element |
| Get URL, title, meta tags, forms, links, and page dimensions |
| Find interactive elements (buttons, links, inputs) with coordinates |
Input
Tool | Description |
| Click by CSS selector or coordinates (left/right/middle, double-click) |
| Hover over an element |
| Type text into a focused element or selector |
| Press keys or combos (Enter, Tab, Ctrl+A, etc.) |
| Scroll the page or a specific element |
| Set input values programmatically (React/Vue/Angular compatible) |
| Drag from one point to another |
| Dispatch touch events for mobile emulation |
Network Monitoring
Tool | Description |
| Start capturing network requests and responses |
| Stop network monitoring |
| Get captured traffic, filter by URL, limit results |
| Get the response body for a specific request |
| Set custom HTTP headers on all requests |
| Simulate slow 3G, offline mode, custom latency |
Console
Tool | Description |
| Start capturing console messages |
| Get captured messages, filter by level |
| Clear the console |
Cookies & Storage
Tool | Description |
| Get cookies for current page or specific URLs |
| Set a cookie with full options |
| Delete specific cookies or clear all |
| Get, set, remove, clear, or list localStorage keys |
| Clear all site data for an origin (cookies, localStorage, cache, indexedDB) |
Device Emulation
Tool | Description |
| Set viewport size, device scale factor, mobile mode |
| Reset to real device metrics |
| Override the User-Agent string |
| Override GPS coordinates |
| Override timezone |
| Set media type (print/screen) and features (dark mode, etc.) |
Performance & Accessibility
Tool | Description |
| Get JS heap size, DOM nodes, layout counts, script duration |
| Get the full accessibility tree (roles, names, values) |
Security & Advanced
Tool | Description |
| Accept or dismiss alert/confirm/prompt dialogs |
| Inject JS that runs before page scripts on every navigation |
| Bypass Content Security Policy |
| Ignore SSL/TLS certificate errors |
Browser
Tool | Description |
| Get browser version, protocol version, V8 version |
| Resize, move, minimize, maximize, or fullscreen the window |
Architecture
Claude Code <--> MCP (stdio) <--> Chrome CDP (WebSocket)
index.js ws://127.0.0.1:9222Single persistent WebSocket connection per tab (auto-reconnects on tab switch)
Network and console events are captured in-memory and served on demand
No browser process management — connects to an already-running Chrome instance
Zero dependencies beyond the MCP SDK and
ws
Requirements
Node.js >= 18
Chrome, Chromium, or Edge running with
--remote-debugging-port=9222Claude Code (or any MCP-compatible client)
License
MIT
Available Tools
54 toolschrome_accessibility_treeC
Get the accessibility tree of the page (structured semantic content)
Inputs: tabId.
chrome_activate_tabC
Bring a tab to the foreground
Inputs: tabId (required).
chrome_browser_infoC
Get browser version and info
Inputs: no named parameters.
chrome_clear_storageB
Clear site data (cookies, localStorage, sessionStorage, indexedDB, cache, etc.)
Inputs: origin (required), tabId, storageTypes.
chrome_clickB
Click an element by CSS selector or coordinates
Inputs: x, y, tabId, button, +2 more.
chrome_close_tabC
Close a browser tab
Inputs: tabId (required).
chrome_console_clearC
Clear the console
Inputs: tabId.
chrome_console_enableC
Start capturing console messages
Inputs: tabId.
chrome_console_get_logC
Get captured console messages
Inputs: clear, level, limit.
chrome_delete_cookiesC
Delete cookies by name or clear all
Inputs: url, name, path, tabId, +2 more.
chrome_drag_dropC
Drag from one point to another
Inputs: toX (required), toY (required), fromX (required), fromY (required), +1 more.
chrome_emulate_deviceC
Set device viewport, scale, and mobile mode
Inputs: width (required), height (required), tabId, mobile, +1 more.
chrome_emulate_mediaC
Set media type and features (e.g., dark mode, print)
Inputs: media, tabId, features.
chrome_emulate_networkB
Simulate network conditions (slow 3G, offline, etc.)
Inputs: tabId, latency, offline, uploadThroughput, +1 more.
chrome_evaluateC
Execute JavaScript in the page context
Inputs: expression (required), tabId, awaitPromise, returnByValue.
chrome_find_elementsC
Find interactive elements on the page (buttons, links, inputs, etc.)
Inputs: type, tabId, visible.
chrome_get_cookiesB
Get cookies for the current page or specific URLs
Inputs: urls, tabId.
chrome_get_htmlC
Get the HTML of the page or an element
Inputs: outer, tabId, selector.
chrome_get_page_infoC
Get comprehensive info about the current page: URL, title, meta tags, links, forms
Inputs: tabId.
chrome_get_textB
Get the visible text content of the page or an element
Inputs: tabId, selector.
chrome_get_urlC
Get the current URL of a tab
Inputs: tabId.
chrome_go_backC
Navigate back in history
Inputs: tabId.
chrome_go_forwardC
Navigate forward in history
Inputs: tabId.
chrome_handle_dialogB
Accept or dismiss a JavaScript dialog (alert, confirm, prompt)
Inputs: accept (required), tabId, promptText.
chrome_hoverC
Hover over an element
Inputs: x, y, tabId, selector.
chrome_ignore_certificate_errorsC
Ignore SSL/TLS certificate errors
Inputs: ignore (required), tabId.
chrome_inject_scriptB
Inject a script that runs before any page script on every navigation
Inputs: source (required), tabId.
chrome_key_pressB
Press a key or key combination (Enter, Tab, Escape, Ctrl+A, etc.)
Inputs: key (required), tabId, modifiers.
chrome_list_tabsB
List all open browser tabs/targets
Inputs: no named parameters.
chrome_local_storageC
Get or set localStorage values
Inputs: action (required), key, tabId, value.
chrome_network_disableC
Stop monitoring network requests
Inputs: tabId.
chrome_network_enableC
Start monitoring network requests
Inputs: tabId.
chrome_network_get_logC
Get captured network requests/responses
Inputs: clear, limit, filter.
chrome_network_get_response_bodyC
Get the response body for a specific network request
Inputs: requestId (required), tabId.
chrome_new_tabC
Open a new tab with optional URL
Inputs: url.
chrome_pdfC
Generate PDF of the current page
Inputs: tabId, landscape, printBackground.
chrome_performance_metricsC
Get page performance metrics
Inputs: tabId.
chrome_query_selectorC
Find element(s) by CSS selector and return their HTML
Inputs: selector (required), all, tabId, attribute.
chrome_reloadC
Reload the current page
Inputs: tabId, ignoreCache.
chrome_reset_deviceC
Reset device emulation to real device metrics
Inputs: tabId.
chrome_screenshotC
Take a screenshot of the current page
Inputs: clip, tabId, format, quality, +1 more.
chrome_scrollC
Scroll the page or an element
Inputs: x, y, tabId, selector.
chrome_set_bypass_cspD
Bypass Content Security Policy
Inputs: enabled (required), tabId.
chrome_set_cookieD
Set a cookie
Inputs: name (required), value (required), url, path, +4 more.
chrome_set_extra_headersC
Set extra HTTP headers for all requests
Inputs: headers (required), tabId.
chrome_set_geolocationC
Override geolocation
Inputs: latitude (required), longitude (required), tabId, accuracy.
chrome_set_input_valueB
Set an input field value programmatically (works with React/Vue/Angular)
Inputs: value (required), selector (required), tabId.
chrome_set_timezoneC
Override timezone
Inputs: timezoneId (required), tabId.
chrome_set_user_agentC
Override the User-Agent string
Inputs: userAgent (required), tabId, platform.
chrome_set_window_boundsC
Resize or move the browser window
Inputs: top, left, tabId, width, +2 more.
chrome_touchC
Dispatch touch events (for mobile emulation)
Inputs: x (required), y (required), type (required), tabId.
chrome_typeC
Type text into a focused element or selector
Inputs: text (required), tabId, selector, clearFirst.
chrome_waitC
Wait for a condition: selector appears, navigation, or fixed time
Inputs: delay, tabId, timeout, selector.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 54 tools
Most tools have clear distinct actions, but there is a significant overlap cluster for content extraction (chrome_get_text, chrome_get_html, chrome_query_selector, chrome_get_page_info, chrome_find_elements, chrome_accessibility_tree) where an agent could easily pick the wrong one. Input/interaction tools (click, touch, drag_drop) and storage tools (local_storage, clear_storage, cookies) also have partially overlapping boundaries, though descriptions mitigate this.
All tools share a consistent chrome_ prefix and snake_case naming, which is highly predictable. Minor deviations exist where some names are noun-only (chrome_pdf, chrome_screenshot, chrome_wait) or use non-verb forms (chrome_new_tab, chrome_go_back), but overall the pattern is readable and stable.
54 tools is well above the 25+ threshold and feels heavy for a browser automation surface, with several niche capabilities (timezone, geolocation, bypass_csp, ignore_certificate_errors) that could be consolidated. While a CDP server legitimately spans many domains, the sheer count increases selection burden.
Coverage is broad: navigation, tabs, input, screenshots/PDF, network and console monitoring, cookies/storage, emulation, performance, and accessibility. Minor gaps exist around request interception/mocking (only monitoring and header overrides), iframe/frame switching, and file upload/download, but agents can work around most of these.
Maintenance
Related MCP Connectors
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser for automation, debugging, performance analysis, and screenshot capture through Chrome DevTools.262,036,574 npm3Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to control and inspect a live Chrome browser for automation, debugging, performance analysis, network monitoring, and DOM interaction through Chrome DevTools Protocol.Apache 2.0
- AlicenseAqualityCmaintenanceEnables AI clients to control the user's already-open, logged-in browser pages in real time over a local WebSocket channel, without Playwright, Puppeteer, Selenium, or any browser driver. Exposes tools for navigation, semantic page snapshots, clicking, form filling, JavaScript evaluation, screenshots, network monitoring, cookie handling, and tab management via the CDP.20MIT
- AlicenseBqualityBmaintenanceEnables AI agents to drive the user's already-running Google Chrome through a WebSocket bridge, listing and switching tabs, navigating, clicking, typing, scrolling, extracting DOM, taking screenshots, and evaluating JavaScript. It works without restarting Chrome and preserves all existing logins, cookies, and 2FA sessions.25MIT