> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt

# MCP Analytics - Docs

Copy page

# MCP Analytics - Docs

MCP Analytics shows you how AI agents actually use your MCP tools: which ones get called, what the agent was trying to do, where calls fail, and which capabilities agents asked for that you don't offer yet. It works on PostHog's own hosted MCP server and on any server you instrument with the [`@posthog/mcp` SDK](/docs/mcp-analytics/installation.md).

Every tool invocation lands as a single `$mcp_tool_call` event on your standard events table, so the same data powers the purpose-built MCP Analytics views and anything you build yourself in [product analytics](/docs/product-analytics.md) or [SQL](/docs/data-warehouse/sql.md). Those calls also feed [Self-driving](/docs/self-driving.md), which spots tools that need fixing and files a report – and opens a pull request when the server is one you own.

**MCP Analytics is in beta**

The in-app MCP Analytics views are behind a feature preview – [turn on the MCP Analytics preview](https://app.posthog.com/settings/user-feature-previews#mcp-analytics) to enable them. The `@posthog/mcp` SDK is published as a `0.x` release, so event names, properties, and tracing behavior may change before `1.0`. Pin a version and don't depend on it for production reporting yet.

[Get started](/docs/mcp-analytics/start-here.md)

## Where you can use it

You explore MCP usage in the PostHog web app. The other surfaces let you query the same data, act on it, and pull it into your own tools.

PostHog WebBeta

Dashboards, session replay for agents, per-tool quality, and intent clustering.

[Explore MCP usage →](/docs/mcp-analytics/surfaces/web-app.md)

PostHog MCP

Query sessions, tool stats, failures, and intent clusters from any MCP client.

[Query over PostHog MCP →](/docs/mcp-analytics/surfaces/mcp.md)

PostHog DesktopBeta

Read Self-driving reports about failing tools, and merge the fixes for servers you own.

[Fix tools in PostHog Desktop →](/docs/mcp-analytics/surfaces/desktop.md)

API

Pull sessions, tool calls, intent clusters, and feedback into your own systems.

[Use the API →](/docs/mcp-analytics/surfaces/api.md)

## Where its data comes from

MCP Analytics runs on the events your MCP server sends to PostHog. The [SDK](/docs/mcp-analytics/installation.md) emits them automatically, and PostHog's hosted MCP server is instrumented the same way.

Tool calls

The canonical `$mcp_tool_call` event: tool name, client, latency, errors, and session.

[Event reference →](/docs/mcp-analytics/events.md)

Lifecycle and discovery

Initialize handshakes, `tools/list`, resource reads, and prompt fetches power client breakdowns.

[See all events →](/docs/mcp-analytics/events.md)

Agent intent

What the agent said it was trying to do, clustered into themes across sessions.

[Capture intent →](/docs/mcp-analytics/intent.md)

Missing capabilities

Gaps agents report through the `get_more_tools` virtual tool when the right tool doesn't exist.

[Track missing capabilities →](/docs/mcp-analytics/missing-capability.md)

## How MCP Analytics works with Self-driving

Your tool calls are a signal source for [Self-driving](/docs/self-driving.md). A scout watches `$mcp_tool_call` telemetry for tools that need attention – high failure rates, agents retrying the same call, slow or bloated responses – weighs them by volume and reach, and files a report grouped by the team that owns the tools.

What comes after the report depends on who owns the MCP server it's about. If it's your own server, the report carries a fix loop metric and hands off to a coding agent that opens a pull request. If it's PostHog's hosted server – which is what most projects are analyzing – the report is filed for a human with no repository attached, and nothing opens a pull request.

Tool callsEvery agent invocation of your MCP tools

SignalsFailures, retries, and slow responses surfaced by a scout

One reportGrouped by owning team, with the evidence behind it

Draft PROnly when you own the server and the fix is concrete

You mergeNothing ships without a human

Tool callsEvery agent invocation of your MCP tools

SignalsFailures, retries, and slow responses surfaced by a scout

One reportGrouped by owning team, with the evidence behind it

Draft PROnly when you own the server and the fix is concrete

You mergeNothing ships without a human

You can also start a fix yourself: the per-tool quality view has a **Create fix task** button that runs the same coding agent against a repository you choose. See [PostHog Desktop](/docs/mcp-analytics/surfaces/desktop.md) for how reports and fixes work.

### Was this page useful?

HelpfulCould be better