MCP SDK v2

The 2026-07-28 MCP revision removes the initialize handshake and protocol sessions. The TypeScript SDK serves it on MCP SDK v2, and the Go SDK on go-sdk v1.8.0 or later. The Python, Ruby, and Rust SDKs serve it too. This page covers what that revision changes for your analytics.

To set up a server on either revision, see the installation page for TypeScript, Python, Go, Ruby, or Rust.

Sessions on 2026-07-28

That revision removed the initialize handshake and the Mcp-Session-Id header, so the stateless session token doesn't apply. Use a conversation handle to correlate requests:

  • Conversation IDs – enabled by default. The SDK injects a conversation_id parameter and returns a handle in eligible tool results. Calls share a $session_id when the agent echoes that handle. Clients that ignore it can still produce a separate session per request.
  • identify – attributes calls to a person via distinct_id. Use it for user-level grouping. It does not provide a $session_id.

The protocol revision belongs to each request. A v2 server also serves 2025-11-25 traffic, which most clients still negotiate.

Missing client name on 2025-11-25 traffic?

On 2025-11-25, the client sends its name and version only at initialize. For servers that create an instance per request, the SDK uses a session token. The transport must write response headers after the handler runs to send this token.

@rekog/mcp-nest supports this with enableJsonResponse: true. The legacy path in createMcpHandler does not. On that path, expect $mcp_client_name and $mcp_client_version to be absent. $mcp_protocol_version remains available.

For Vercel's mcp-handler, wrap the route in withMcpSessionHeader (@posthog/mcp 1.5.0 or later). It adds the token outside the server, so $mcp_client_name and $mcp_client_version come back.

Capture model identity on both revisions

Every SDK captures model identity on 2025-11-25 and 2026-07-28. Recognized client metadata takes priority over the agent's self-reported llm_model argument. $mcp_llm_model_source records "client_metadata" or "self_reported".

Both sources are unverified. See model capture for how the SDK reads it.

MCP Apps

MCP App tools are captured like any other tool call. Instrumenting doesn't change what the App returns: ui:// resources, structured output, and metadata pass through unchanged. Resource reads never include the body.

Multi round-trip requests

Every SDK captures multi round-trip requests (resultType: "input_required") in tool calls. Each input_required result is a $mcp_input_required event, and the retry that completes the call is the $mcp_tool_call. See multi round-trip requests in tool calls.

Not instrumented yet

No SDK records multi round-trip requests from prompts/get or resources/read yet. No SDK handles tasks yet:

2026-07-28 featureWhat you get today
Tasks (io.modelcontextprotocol/tasks)A tool returning a task handle records an instant success, so task-based tools look fast and always-succeeding.

Still have questions?

Was this page useful?