What changed
On October 23, 2026, PostHog added WebMCP tool-call analytics to its JavaScript browser SDK. A site that registers tools using WebMCP can enable `capture_webmcp: true` in `posthog.init()` and have calls recorded as `$mcp_tool_call` events. The instrumentation associates calls with the site's current user/session and can capture an agent-supplied `context` explanation and `llm_model` field. The SDK injects these fields into compatible tool schemas and removes them before invoking the site's handler. Tool arguments and tool results are not captured on this browser path.
Why it matters
Conventional website analytics observes clicks, pageviews and conversions but misses structured actions initiated by an AI agent inside a browser. This addition gives sites exposing WebMCP tools a way to inspect which tools are used, whether calls fail and what goal an agent says it is pursuing. That can guide product design, agent compatibility and debugging. It does not reveal every AI agent visiting a site: crawlers, ordinary HTTP requests, uninstrumented browser actions and tools registered before initialisation are outside this measurement.
Opt in before tools are registered
PostHog documents `posthog.init('<token>', { api_host: 'https://us.i.posthog.com', capture_webmcp: true })`. Initialise the SDK before the page registers WebMCP tools. Tools registered earlier are not retroactively instrumented, so rollout order matters.
A shared analytics event for browser agents
The SDK emits `$mcp_tool_call` and can associate it with the same user, session and replay context as conventional website activity. Failed calls may also generate `$exception` when exception autocapture is enabled. This connects browser-agent tool use to existing product analytics without requiring a separate server-side MCP endpoint.
Intent and model metadata are not verified identities
By default the SDK can inject a `context` parameter asking an agent to explain why it called the tool and an `llm_model` parameter. These are agent-provided or client-derived hints, not proof of which provider or model made the call. Both fields can be disabled independently; changing those settings requires registering the tools again.
Privacy protections have specific boundaries
PostHog says the browser integration does not capture tool arguments or results, and redacts credentials and common personal data from context and error messages. Site consent, opt-out and `before_send` hooks still apply. These safeguards do not replace an operator's own data minimisation and privacy assessment.
WebMCP remains an emerging browser interface
The underlying WebMCP standard is still experimental in browsers. The feature is useful to websites intentionally exposing browser tools, not a universal agent-traffic detector. PostHog's public September issue explains why earlier MCP server instrumentation could not see tool calls executed directly in a web page.