Packages

@posthog/mcp

1.6.1 · 21 Nov 2026MIT780.1k / weekRepositorynpmAtom feed

Upgrading @posthog/mcp From 1.3.0 to 1.7.0

5 releases in betweenevery note read

Other targets from 1.3.0Latest1.6.1
0
changes to make
0
advisories fixed
4
new
1
fix

Release by release

  1. 1.7.0

    23 Nov 20261 new
    • New

      Group tool calls into sessions by the client's own conversation id in _meta: ChatGPT's openai/session, Codex's sessionId, and VS Code's vscode.conversationId, each read only from the client its User-Agent or client name identifies. The client's id wins over a conversation handle and a transport session. ChatGPT gets no conversation_id argument and no handle, so its tool schemas and results stay unchanged. Every event from instrument() now records which source grouped it as $mcp_session_source. PostHogMCP.prepareToolList and prepareToolCall take the request's headers (and clientInfo), and captureToolCall takes requestMeta. (2026-11-23)

  2. 1.6.1

    21 Nov 20261 fix
    • Fixed

      PostHogMCP adds the configured serverBuild to captureAi() and captureAiImmediate() events, as it already does for capture() and captureImmediate(). With serverBuild set, an event whose properties cannot be read is now dropped by the client, as without serverBuild, instead of throwing from any of the four methods. (2026-11-21)

  3. 1.6.0

    18 Nov 20261 new
    • New

      Support FastMCP with instrumentFastMCP(fastmcp, posthog, options). FastMCP builds a server per session (per request when stateless) behind a private factory, so this hooks the module's session class and instruments each one before it connects. FastMCP's HTTP layer drops request headers, so the adapter puts them back on extra.requestInfo.headers for identify and other callbacks. (2026-11-18)

  4. 1.5.0

    18 Nov 20261 new
    • New

      Support Vercel's mcp-handler. Call instrument(server, posthog) inside the createMcpHandler callback, and wrap the exported route in the new withMcpSessionHeader to keep one $session_id and the client's name per conversation on the 2025-11-25 protocol. mcp-handler streams the initialize response, so the session token is minted at the fetch layer instead of inside the server. (2026-11-18)

  5. 1.4.0

    18 Nov 20261 new
    • New

      Classify client-caused failures as $mcp_error_type: "validation". A tool call whose arguments failed the tool's input schema, a call to a disabled tool, a tool that rejected its arguments with JSON-RPC -32602, and a read of an unknown resource now carry validation instead of the thrown error's type, so dashboards can tell an agent's mistake from a server bug. Output-schema failures and malformed tool results, which also use -32602, keep the thrown type. Every failure still sends its $exception, as before. (2026-11-18)

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.