mcp-cdp
v0.3.1Safe-by-default MCP that drives an Electron/Chrome app over CDP: DOM, console, network, input.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_targets List targets
List the debuggable targets on the DevTools endpoint — pages, webviews and Electron windows — with their id, type, title and URL. Start here to find the target id every other tool needs.
dom_snapshot DOM snapshot
Return the rendered HTML of a target — the whole document, or just the subtree of the first element matching a CSS selector. This is the DOM the agent should read instead of a screenshot: it carries far more information and is exact.
| Parameter | Type | Description |
|---|---|---|
target_id * | string | Target id from list_targets — the page / webview / Electron window to inspect. |
selector | string | CSS selector to scope the snapshot to (omit for the full document). |
query_dom Query DOM
Return the outer HTML of every element matching a CSS selector (capped). Use to locate the exact elements to click or type into, and to confirm what is actually on the page.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector, e.g. 'button.submit' or '[data-testid=login]'. |
target_id * | string | Target id from list_targets — the page / webview / Electron window to inspect. |
limit | integer | Max matches to return (default 20). |
console_logs Console logs
Return recent console output and uncaught exceptions captured from the target since it was first inspected. The fastest way to see why something failed — errors that never appear on screen.
| Parameter | Type | Description |
|---|---|---|
target_id * | string | Target id from list_targets — the page / webview / Electron window to inspect. |
limit | integer | Max entries (most recent first-in-window). |
network_requests Network requests
Return recent network requests captured from the target — method, URL, status, MIME type, failures. Headers are never captured and sensitive URL query values are redacted.
| Parameter | Type | Description |
|---|---|---|
target_id * | string | Target id from list_targets — the page / webview / Electron window to inspect. |
limit | integer | Max entries. |
url_filter | string | Only requests whose URL contains this substring. |
screenshot Screenshot
Capture a PNG screenshot of the target's viewport. Prefer dom_snapshot for reading content; use this for visual layout, rendering and image checks.
| Parameter | Type | Description |
|---|---|---|
target_id * | string | Target id from list_targets — the page / webview / Electron window to inspect. |