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
feat(mcp): emit $mcp_protocol_version on events (#795)
The MCP protocol (spec) version was carried in the session token but never
stamped on events (JS emits it). Thread it through:
- constants: add $mcp_protocol_version; _posthog_events emits it on the primary
event and the $exception sibling.
- _capture: the event normalizer now keeps protocol_version (it was silently
dropped by the fixed key list -- the reason nothing surfaced before).
- instrument() adapters read the live protocol version off client_params and
backfill from the token on stateless pods (via resolve_session_and_client),
threading it to prepare_request / record_*.
- PostHogMCP capture_* methods gain a protocol_version argument.
Verified on the 2-pod stateless cluster: $mcp_protocol_version lands on
$mcp_initialize and every $mcp_tool_call across both pods.
Generated-By: PostHog Code
Task-Id: f44ec5e0-b836-4d13-98c4-c26887dd7ec2
feat(mcp): emit `$mcp_protocol_version` on MCP analytics events — the MCP spec version, recovered from the session token across stateless pods (parity with the TypeScript SDK). `PostHogMCP` capture methods gain a `protocol_version` argument.
0 commit comments