github PostHog/posthog-js @posthog/mcp@1.7.1

2 hours ago

1.7.1

Patch Changes

  • #5740 11b76dc Thanks @lucasheriques! - A stateless HTTP request that carries no session (no client conversation id, conversation handle, transport session or session token) now gets a fresh $session_id of its own, as the sdk-specs MCP analytics spec requires. Before, a shared HTTP instance with conversation anchoring off grouped every client's requests under the instance's id.

    A custom event from analytics.capture() now carries the session and identity of the request it was captured in (a tool call, a tool listing or a resource request), even when requests overlap. This uses AsyncLocalStorage. On a runtime without it, such as Cloudflare Workers without the nodejs_compat or nodejs_als flag, custom events are sent with a session of their own and no identity, and the SDK logs one warning. Before, they could take another caller's. (2026-11-25)

  • #5741 8110b53 Thanks @lucasheriques! - An HTTP request that carries no session no longer takes $mcp_client_name, $mcp_client_version or $mcp_protocol_version from an initialize handshake or another request's session token on the same instance. On a shared HTTP instance, those name whichever client came before, so such a request is now unidentified unless it identifies itself, as the sdk-specs MCP analytics spec requires.
    (2026-11-25)

Don't miss a new posthog-js release

NewReleases is sending notifications on new releases.