cdp_connect
Connect to an existing Chromium browser via CDP for automation and optionally capture network requests to JSON files.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cdp_url | Yes | CDP WebSocket or HTTP URL, e.g. "ws://127.0.0.1:9222" or "http://127.0.0.1:9222" | |
| capture_dir | No | If set, start network capture and write each request to this directory as JSON. Omit to leave capture off. | |
| capture_method | No | Only save this HTTP method, e.g. POST | |
| capture_url_contains | No | Only save requests whose URL contains this string | |
| capture_resource_type | No | Only save this Playwright resource type, e.g. xhr, fetch, document |