You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This gist is not a “proxy writeup”. It is a mechanism: how to turn the Claude-in-Chrome reverse‑engineering insight into an always-on, local, attribution-grade wire stripper.
The core insight (from Claude-in-Chrome reverse engineering)
Claude-in-Chrome is an MCP server living inside the browser boundary.
That matters because it means:
the browser is not just a UI; it is a tool host
Claude Code is not “clicking”; it is calling a typed tool API
every action/observation in the browser becomes structured tool traffic
the most valuable interception point is the MCP transport + tool router
If you control the tool router, you control:
what the browser can do (actuation)
what leaves the browser (observation)
what data is persisted/filtered/federated (policy)
That is the missing coupling: instead of “proxy sees packets”, you get intent + context + network.
1) Control plane: MCP tool router as your policy choke point
Mental model
MCP server (extension) exposes tools like: navigate, click, screenshot, read DOM, etc.
OTLP/OTel = data plane (firehose): events/metrics/traces for TUI + SPA
flowchart LR
subgraph CP["Control plane (MCP)"]
CC["Claude Code\n(MCP client)"]
FW["Interceptor\n(claude-code-plugin)"]
WS["wire_stripper\npolicy engine"]
EXT["Extension\n(MCP server)"]
end
subgraph DP["Data plane (OTel/DB)"]
CDP["CDP Network events\n(browser sensor)"]
MITM["MITM events\n(proxy sensor)"]
DB["SQLite\n(single backend)"]
OTEL["OTLP stream"]
TUI["otel-tui"]
SPA["SPA"]
end
CC -->|"tool call"| FW
FW -->|"policy check"| WS
WS -->|"allow/deny/quarantine"| FW
FW -->|"forward"| EXT
CDP --> DB
MITM --> DB
DB --> OTEL
OTEL --> TUI
OTEL --> SPA
Loading
6) End-to-end swimlane (what actually runs)
sequenceDiagram
participant CC as Claude Code
participant FW as MCP Interceptor
participant WS as wire_stripper
participant EX as MCP Server (Chrome)
participant CD as CDP Network
participant PX as MITM Proxy
participant DB as SQLite
CC->>FW: tool.navigate({url})
FW->>WS: preflight({url, profile})
WS-->>FW: decision allow|deny|quarantine
alt allow
FW->>EX: forward tool.navigate
else deny
FW-->>CC: error (policy)
else quarantine
FW-->>CC: requires approval
end
par network observation
CD->>WS: network event stream
PX->>WS: http event stream
end
WS->>DB: append event + provenance
WS->>WS: enrich domain->ip->asn->prefix->entity
WS->>DB: upsert facts + list candidates