mcp-cdp

v0.3.1
io.github.dockndevai/mcp-cdp Checked 14 hours ago Published 8 days ago

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

ParameterTypeDescription
target_id *stringTarget id from list_targets — the page / webview / Electron window to inspect.
selectorstringCSS 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.

ParameterTypeDescription
selector *stringCSS selector, e.g. 'button.submit' or '[data-testid=login]'.
target_id *stringTarget id from list_targets — the page / webview / Electron window to inspect.
limitintegerMax 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.

ParameterTypeDescription
target_id *stringTarget id from list_targets — the page / webview / Electron window to inspect.
limitintegerMax 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.

ParameterTypeDescription
target_id *stringTarget id from list_targets — the page / webview / Electron window to inspect.
limitintegerMax entries.
url_filterstringOnly 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.

ParameterTypeDescription
target_id *stringTarget id from list_targets — the page / webview / Electron window to inspect.