cdp-browser-mcp
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., "@cdp-browser-mcp Connect to the browser on port 9222 and take a screenshot of the current page."
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.
cdp-browser-mcp
MCP server that attaches to an already-running Chromium browser over the Chrome DevTools Protocol (CDP). It does not launch a browser. One process can hold many sessions, so an agent can drive several profiles at once.
Works with:
Chrome / Edge started with
--remote-debugging-port=9222Fingerprint browsers (AdsPower, BitBrowser, GoLogin, Multilogin, …)
Cloud or local CDP endpoints (
http://127.0.0.1:9222,ws://…)
Uses Patchright (connectOverCDP) so the attached context is less likely to be patched by anti-bot checks than stock Playwright.
Install from GitHub (no npm publish). Requires Node.js 18+. No Chromium download is needed.
npx -y github:killaragorn/cdp-browser-mcpCursor
Add to ~/.cursor/mcp.json (or project .cursor/mcp.json):
{
"mcpServers": {
"cdp-browser-mcp": {
"command": "npx",
"args": ["-y", "github:killaragorn/cdp-browser-mcp"]
}
}
}Related MCP server: chrome-devtools-mcp
Claude Desktop
Add to claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"cdp-browser-mcp": {
"command": "npx",
"args": ["-y", "github:killaragorn/cdp-browser-mcp"]
}
}
}Claude Code
claude mcp add --scope user cdp-browser-mcp -- npx -y github:killaragorn/cdp-browser-mcpOr commit .mcp.json in a project so teammates get the same server:
{
"mcpServers": {
"cdp-browser-mcp": {
"command": "npx",
"args": ["-y", "github:killaragorn/cdp-browser-mcp"]
}
}
}Codex
codex mcp add cdp-browser-mcp -- npx -y github:killaragorn/cdp-browser-mcpOr add to ~/.codex/config.toml:
[mcp_servers.cdp-browser-mcp]
command = "npx"
args = ["-y", "github:killaragorn/cdp-browser-mcp"]Local clone
git clone https://github.com/killaragorn/cdp-browser-mcp.git
cd cdp-browser-mcp
npm installThen point the client at node /absolute/path/to/cdp-browser-mcp/index.mjs.
Typical flow
Start a browser with CDP, for example:
chrome --remote-debugging-port=9222Or copy the debug URL from AdsPower / BitBrowser (often http://127.0.0.1:xxxx).
Ask the agent to connect, then operate the page:
cdp_connect→{ "cdp_url": "http://127.0.0.1:9222", "capture_dir": "D:/captures/run1" }or
cdp_network_startwithdirafter connectEach request is saved as
{dir}/000001_GET_host-path.jsonplusrequests.jsonlcdp_closewhen finished
Tools
Connect first with cdp_connect. Network capture stays off unless you pass capture_dir or call cdp_network_start.
Session / navigation
Tool | Purpose |
| Attach to a CDP URL; optional |
| Open a URL |
| Reload |
| History back |
| URL, title, frames |
| Page HTML or a selector's innerHTML |
| PNG screenshot |
| List active sessions |
| Disconnect one session |
Input
Tool | Purpose |
| Click selector or |
| Hover a selector |
| Move mouse to coordinates |
| Input text: |
| Key or shortcut: |
|
|
| Check or uncheck |
| File input ( |
| Into view, mouse wheel, or |
| Run JavaScript |
| Wait for a selector or a timeout |
Network
Capture is off by default. Pass capture_dir on connect, or call cdp_network_start. Every matching request is written to disk with no count limit. xhr/fetch/document/JSON response bodies are stored in full.
{capture_dir}/
capture.json
requests.jsonl
000001_GET_example.com-.json
000002_POST_api.example.com-login.jsonTool | Purpose |
| Start capture into |
| Stop capture; files on disk are kept |
| List saved files (default last 50 summaries) |
| Wait for a response whose URL contains a string |
Cookies
Tool | Purpose |
| Read cookies |
| Write cookies |
Why this exists
@playwright/mcp launches (or binds) a single browser from CLI flags. This server is the opposite shape:
Connect is a tool, not a startup flag — the agent picks the CDP URL at runtime
Many sessions in one MCP process (one AdsPower profile per
session_id)Patchright instead of Playwright, aimed at already-fingerprinted browsers
License
MIT
Available Tools
26 toolscdp_checkB
Check or uncheck a checkbox / radio.
Inputs: selector (required), session_id (required), checked.
cdp_clickA
Click an element by CSS selector, or click at page coordinates (x, y). Supports right/middle click, double-click, and modifier keys.
Inputs: session_id (required), x, y, force, +4 more.
cdp_closeA
Disconnect this session from the browser and drop it from the session list.
Inputs: session_id (required).
cdp_connectA
Attach to an already-running Chromium browser via CDP (does not launch a browser). Accepts HTTP (http://127.0.0.1:9222) or WebSocket URLs. Pass capture_dir to start saving every matching request as JSON into that folder (no count limit). Returns session_id for later tools.
Inputs: cdp_url (required), capture_dir, capture_method, capture_url_contains, +1 more.
cdp_contentA
Get page HTML, or innerHTML of a selector. Large documents are truncated.
Inputs: session_id (required), selector, max_chars.
cdp_evaluateB
Run a JavaScript expression in the page and return the JSON-serializable result.
Inputs: expression (required), session_id (required).
cdp_get_cookiesA
Read cookies from the browser context. Optional url limits the set.
Inputs: session_id (required), url.
cdp_go_backC
Go back in history.
Inputs: session_id (required).
cdp_hoverA
Hover the mouse over an element matched by CSS selector.
Inputs: selector (required), session_id (required).
cdp_list_sessionsA
List all active CDP sessions in this MCP process.
Inputs: no named parameters.
cdp_mouse_moveA
Move the mouse to page coordinates without clicking.
Inputs: x (required), y (required), session_id (required).
cdp_network_logA
List requests already saved on disk. Default last 50 summaries. Use include_body / include_headers to read the JSON files. Capture must have a dir (from cdp_connect capture_dir or cdp_network_start).
Inputs: session_id (required), limit, method, status, +4 more.
cdp_network_startA
Start network capture for this session. Every matching request is written as a JSON file into dir (plus requests.jsonl). No count limit. Call before navigating if you need the first document request.
Inputs: dir (required), session_id (required), method, url_contains, +1 more.
cdp_network_stopB
Stop capturing. Files already written to dir are kept.
Inputs: session_id (required).
cdp_page_infoA
Return the current page URL, title, and frame URLs.
Inputs: session_id (required).
cdp_pressA
Press a key or shortcut, e.g. "Enter", "Tab", "Escape", "Control+A", "Meta+V". Optional selector focuses that element first.
Inputs: key (required), session_id (required), selector.
cdp_reloadB
Reload the current page.
Inputs: session_id (required), wait_until.
cdp_screenshotB
Capture the current page as a PNG screenshot (returned as image content).
Inputs: session_id (required), full_page.
cdp_scrollA
Scroll an element into view, wheel by delta, or jump to page coordinates.
Inputs: session_id (required), x, y, delta_x, +2 more.
cdp_selectB
Choose option(s) on a element by value, label, or index.
Inputs: selector (required), session_id (required), index, label, +2 more.
cdp_set_cookiesC
Write cookies onto the browser context of this session.
Inputs: cookies (required), session_id (required).
cdp_typeA
Input text. With selector: fill the element (or type key-by-key). Without selector: type into the focused element. Modes: fill (replace value), type (real key events), insert (paste-like, no key events).
Inputs: text (required), session_id (required), mode, clear, +3 more.
cdp_uploadA
Set files on an . Paths must exist on the machine running this MCP server.
Inputs: files (required), selector (required), session_id (required).
cdp_waitA
Wait until a CSS selector appears, or wait a fixed timeout in milliseconds if no selector is given.
Inputs: session_id (required), timeout, selector.
cdp_wait_responseA
Wait until a response whose URL contains url_contains (optional method/status). Returns status, headers, and a truncated body.
Inputs: session_id (required), url_contains (required), method, status, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Each tool targets a distinct browser action or resource, and even similar tools like cdp_hover and cdp_mouse_move are clearly differentiated by element targeting vs coordinates. No two tools have overlapping purposes.
All tools share the cdp_ prefix, but the suffix is inconsistent: most are verb_noun (cdp_navigate, cdp_click), but several are noun_verb (cdp_mouse_move, cdp_network_start) or pure nouns (cdp_content, cdp_page_info). This creates mild inconsistency but remains readable.
26 tools is slightly high but appropriate for a comprehensive CDP browser automation server; each tool maps to a distinct browser feature (navigation, input, network, cookies, sessions), so none feel redundant.
The set covers navigation, interaction, network, cookies, and sessions well, but lacks tab management (new/switch/close tabs), dialog handling (alert/confirm/prompt), and iframe/frame context switching—gaps that could hinder full browser automation scenarios.
Maintenance
Related MCP Connectors
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Baizhi Cloud Browser (CapyBrowser): cloud sessions via MCP; page actions use a CDP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA MCP server based on Patchright that enables browser automation with session inheritance from local Chrome/Edge/Chromium browsers, including cross-platform cookie decryption.87 npm3Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server that lets coding agents control and inspect live Chrome browsers, providing full Chrome DevTools capabilities for automation, debugging, and performance analysis.1,829,241 npmApache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server that lets agents drive your real Chrome browser with existing logins and sessions via an outbound-only WebSocket extension. It exposes Playwright-compatible browser tools for navigation, clicking, typing, and snapshots.1Apache 2.0
- AlicenseAqualityAmaintenanceMCP server that drives your real Chrome/Edge/Opera browser through a Chrome extension and DevTools Protocol, preserving logins and session state, and can also perform OS-level mouse and keyboard input behind approval.5143 PyPI2MIT