Packages

@posthog/mcp

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

Upgrading @posthog/mcp From 0.16.1 to 1.6.1

36 releases in betweenevery note read

Other targets from 0.16.1Newest 0.x0.26.0
  1. 0.16.1yours
  2. 3 releases
  3. 0.17.0major
  4. 0.18.0major
  5. 1 release
  6. 0.19.0major
  7. 0.20.0major
  8. 0.21.0major
  9. 4 releases
  10. 0.22.0major
  11. 3 releases
  12. 0.23.0major
  13. 0.24.0major
  14. 0.25.0major
  15. 2 releases
  16. 0.26.0major
  17. 1.0.0major
  18. 11 releases
  19. 1.6.1target

Before you upgrade

Tick each one off as you go
  • Breaking1.0.0

Release by release

  1. 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)

  2. 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)

  3. 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)

  4. 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)

  5. 1.3.0

    17 Nov 20261 new · 3 fixes
    • New

      Add eventOptions to set posthog-node per-event options on MCP events, per call or from an instrument() callback. beforeSend sees and can change them, and an explicit process_person_profile wins over the anonymous default. (2026-11-17)

    • Fixed

      Genkit spans and @posthog/mcp events with no user distinct id set the process_person_profile: false event option on posthog-node 6.x.x, so a registered or context process_person_profile: true option no longer creates a person for each trace or session. Genkit also counts an empty or whitespace-only distinct id as missing. (2026-11-17)

    • Fixed

      Export the table of per-event options and the event properties posthog-node 5.x.x reads instead, so posthog-node, @posthog/ai and @posthog/mcp share one copy. (2026-11-17)

    • Fixed

      Accepts posthog-node 6.x.x as a peer dependency. (2026-11-17)

  6. 1.2.3

    16 Nov 20262 fixes
    • Fixed

      instrumentMutator(posthog)(server) now returns the server's own type instead of unknown, so no type argument or cast is needed. Explicit instrumentMutator<McpServer>(posthog) calls and typed serverMutator hooks keep working. (2026-11-16)

    • Fixed

      getMoreToolsResult() and sendFeedbackResult() are now typed so they can be returned from an MCP SDK tool handler (v1 and v2 CallToolResult) without a cast. (2026-11-16)

  7. 1.2.2

    13 Nov 20261 fix
    • Fixed

      Fix stateless servers on @modelcontextprotocol/server 2.0 to 2.2 that reuse one transport for every client: the session token minted at initialize now rides only that client's initialize response. Before, it stayed on the transport, so every later client's initialize failed with 400 "Server already initialized" and later responses handed the first client's token to other clients. Per-request and multi-pod stateless servers still get a stable session token.

  8. 1.2.1

    12 Nov 20261 fix
    • Fixed

      mcp: Keep the thrown value on high-level McpServer tool calls, so $mcp_error_type and $mcp_error_status reflect what the tool threw. This covers MCP SDK v2, a thrown value that is not an Error, and servers built per request that share tool functions. For a thrown non-Error, $mcp_error_message and error grouping now describe the thrown value (for example 'UpstreamError' captured as exception with message: 'bad') instead of [object Object]. $mcp_error_type is now redacted like the message, including an errorType passed to captureToolCall. An error whose getters throw while it is captured is still recorded: a tool call falls back to the tool result, and other events record Unknown error instead of being dropped. (2026-11-12)

12 internal lines (docs, tests, tooling) left out.

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.