cdp-sniffer
Captures Chrome DevTools Protocol traffic from Chrome — Network, Console, DOM, Runtime, WebSocket/SSE messages, and UI events — and makes it queryable through MCP tools for reverse-engineering web API flows.
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-snifferwhat POST requests were made after the 'before-login' mark?"
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-sniffer
See exactly what a website sends and receives. cdp-sniffer captures every Chrome DevTools Protocol message — Network, Console, DOM, Runtime — plus UI clicks/inputs/mutations into a local SQLite database, with a CLI, a one-command launcher, and an MCP server so AI harnesses can query traffic directly.
Built for reverse-engineering web API flows: log in through the real browser, then ask what requests the page made, what the POST body was, where the JWT came from.
You browse normally in Chrome
│
▼
┌──────────────┐ CDP over WebSocket ┌───────────────┐
│ Chrome │ ───────────────────────▶ │ cdp-sniffer │
│ :remote-debug │ (observer auto-links │ :proxy │
│ :9222 │ every page target) │ :9223 │
└──────────────┘ └───────┬───────┘
│ writes
▼
┌────────────┐
│ SQLite │◀── sniffer CLI
│ (WAL) │◀── MCP tools (17)
└────────────┘No REST API. No cloud. Everything stays on your machine.
Features
Zero-config capture — one command launches Chrome (remote-debugging) + daemon; every page target is hooked automatically, no proxy settings, no certs
Consolidated HTTP view — raw
Network.*events are aggregated into one row per request (method, URL, headers, bodies, timing, redirect chain)WebSocket & SSE tables — full-duplex WS frames and EventSource messages stored separately, queryable
UI events — clicks, inputs and DOM mutations captured from the page and parsed into structured data
Marks — named timestamps (
before-login) to isolate exactly the requests one action caused17 MCP tools —
sniffer_query_http,sniffer_get_http,sniffer_query_ui,sniffer_query_websocket,sniffer_query_sse,sniffer_search_events,sniffer_start_stack, … for opencode / Claude / any MCP harnessHTTP/2-friendly — Chrome launches with
--disable-http3/--disable-quicso everything goes through observable CDP
Related MCP server: mcp-network-analyzer
Requirements
Linux (KWin window placement is optional; core works anywhere Chrome runs)
Node.js ≥ 18
Google Chrome (
google-chromeon PATH)
Install
git clone https://github.com/Data338/cdp-sniffer.git
cd cdp-sniffer
npm install
npm link # provides sniffer, sniffer-start, sniffer-mcp on PATHQuick start
sniffer-start # 1. launch Chrome + daemon
# ... browse the site, do your flow ...
sniffer query-http --method POST --url login # 2. consolidated HTTP (1 row/request)
sniffer get-http <request_id> # 3. full request + redirect chain
sniffer ui --ui-type click # 4. clicks/inputs as structured data
sniffer stats # 5. session overviewPick a logged-in Chrome profile (so the MCP browser extension travels with it):
sniffer-start --profile=you@gmail.com # resolve via Local State
sniffer-start --profile=ask # force the profile picker
sniffer-start --reset # wipe profile (removes extensions + login)The mark-correlated workflow
sniffer mark before-login
# ... log in in the browser ...
sniffer query-http --after-mark before-login --last 20Only the requests that login caused. Deterministic — no timestamp guessing.
CLI reference
Command | What |
| Raw CDP events |
| Consolidated HTTP, 1 row/request |
| Full request + redirects + linked CDP events |
| Free-text / regex search |
| Clicks, inputs, DOM mutations |
| WebSocket frames |
| SSE / EventSource messages |
| Timestamp markers |
| Wait for matching events |
| Overview |
| Permanently delete captured events |
URL filters also accept full regex with --url-re, or re: prefix in MCP.
MCP server (AI harnesses)
sniffer-mcp # stdio transportGeneric MCP config:
{
"mcpServers": {
"cdp-sniffer": {
"command": "sniffer-mcp"
}
}
}Typical agent flow: sniffer_get_status → sniffer_add_mark → user browses → sniffer_query_http({ after_mark }) → sniffer_get_http({ request_id }). Read tools query the live DB (WAL) while the daemon captures; sniffer_start_stack boots the whole stack, sniffer_control_daemon manages only the daemon.
Configuration
Env var | Default | What |
|
| Chrome remote-debugging port |
|
| Sniffer relay/proxy port |
|
| SQLite directory ( |
|
| CDP event retention (oldest pruned) |
|
| HTTP row retention |
|
| WS/SSE retention |
| — | Default Chrome profile (email or |
Project layout
index.js # daemon + CLI entry
sniffer-start # launcher: Chrome + daemon (+ KWin placement)
src/
proxy.js # CDP relay + observer (auto-hooks page targets)
db.js # SQLite schema, retention, queries
mcp.mjs # MCP server (17 tools, stdio)
observer-script.js# in-page UI observer (clicks/inputs/mutations)
scripts/
smoke-test.mjs # capture smoke test (needs live Chrome+daemon)
resolve-profile.cjs # email → Chrome profile dir via Local State
kwin-place-sniffer.js # KWin: pin sniffer window to terminal desktop
ProjectMemory/ # architecture, CLI/env/DB reference, dev notesDeep docs live in ProjectMemory/ and AGENTS.md.
Privacy
Capture is powerful: the DB records request/response bodies — cookies, tokens, form inputs — for every page open in the debugging-profile Chrome. The DB and the Chrome profile live outside this repo (see env vars) and are never committed (see .gitignore). sniffer clear wipes captured events; deleting cdp-sniffer.db resets everything.
License
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Live browser debugging for AI assistants — DOM, console, network via MCP.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
A paid remote MCP for AI agent browser DevTools MCP, built to return verdicts, receipts, usage logs,
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that captures browser console logs and network requests via the Chrome DevTools Protocol. It allows users to monitor real-time logs, inspect network traffic, and execute JavaScript code directly in the browser context.-
- AlicenseNot gradedqualityCmaintenanceCaptures browser network traffic, analyzes API patterns, and exposes analysis tools through an MCP server for AI-assisted workflows.1MIT
- AlicenseAqualityBmaintenanceRecords masked browser sessions (rrweb DOM + console + network) to a local SQLite store and exposes them to AI coding agents via stdio MCP. Fully local, no SaaS, no telemetry.107Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server that connects to your browser to capture screenshots, inspect console logs, network requests, and more via Chrome DevTools Protocol.3 npm2MIT