Treat a recording like the traffic it came from
A recording is a verbatim log of everything a client and a server said to each other, customer data included. Credentials are masked at the moment the event is written — never stored in the clear and hidden at display time. The output directory is git-ignored; a fleet refuses an --out-dir git could commit.
Blanked
Everything that looks like a credential: keys whose name carries auth, cookie, sessionid, api_key, token…; Bearer … in text; every --mask-key NAME you add. The value is gone; its place in the message is listed in redactions.
Handle pseudonym
Two fields exist only to tie messages together: params.progressToken and params._meta.progressToken. They get a stable stand-in from the run’s keyed HMAC: the same value reads the same way throughout one recording and differently in the next. The relation survives, the value does not. Over HTTP, SSE event ids join this set.
Mcp-Session-Id is blanked, not pseudonymised — the recording keeps only an ordinal (session 1, 2, …).run_finished.server_redactions
values the masker took out of server trafficWhere masking reaches
- message bodies, both directionsmask_json
- intervention steps — before and after values, in their placesame rules
- the server command in run_startedmask_argv
- HTTP headers and query strings, as mapsproposed
- WWW-Authenticate — the one header parsed first, so resource_metadata, scope and error stay legibleproposed
A token never goes on argv, where it would reach run_started behind nothing but mask_argv: a file, or the name of an environment variable.