MCP client ──HTTP──► mcpwn ──HTTP──► remote MCP server (--upstream)
Every JSON-RPC message — whether it arrives as a POST body, an
application/json response, or a data: line inside a text/event-stream —
goes through the SAME MessagePipeline as stdio, so tamper rules,
correlation, logging and detectors behave identically across transports.
Framing lives here: SSE event frames are re-serialized preserving event: /
id: lines byte-for-byte, JSON-RPC batches are relayed opaquely, and
Mcp-Session-Id / Last-Event-ID are forwarded verbatim both ways. On any
failure the original bytes are forwarded (Invariant #2); when idle, traffic is
byte-identical at the JSON layer and SSE framing is preserved (Invariant #3).
Interactive intercept (-i) is DISABLED for HTTP in v2 (there is no single
controlling flow to pause); holdTimeoutMs is plumbed through the pipeline but
inert while intercept is off.
Streamable HTTP + SSE reverse proxy (§3.1).
MCP client ──HTTP──► mcpwn ──HTTP──► remote MCP server (--upstream)
Every JSON-RPC message — whether it arrives as a POST body, an
application/jsonresponse, or adata:line inside atext/event-stream— goes through the SAME MessagePipeline as stdio, so tamper rules, correlation, logging and detectors behave identically across transports.Framing lives here: SSE event frames are re-serialized preserving
event:/id:lines byte-for-byte, JSON-RPC batches are relayed opaquely, andMcp-Session-Id/Last-Event-IDare forwarded verbatim both ways. On any failure the original bytes are forwarded (Invariant #2); when idle, traffic is byte-identical at the JSON layer and SSE framing is preserved (Invariant #3).Interactive intercept (-i) is DISABLED for HTTP in v2 (there is no single controlling flow to pause); holdTimeoutMs is plumbed through the pipeline but inert while intercept is off.