MCP Analytics API

Contents

Open beta

The MCP Analytics API is in beta and requires the MCP Analytics feature preview to be enabled. Endpoints may change before general availability.

Use the API to pull MCP Analytics data into your own dashboards, reports, or workflows. Reading requires the mcp_analytics:read scope; submitting feedback or recomputing clusters requires mcp_analytics:write.

For the raw event stream, you can also query $mcp_* events directly through the query API – see sample queries for HogQL recipes.

Before you start

  1. Set up MCP Analyticsinstall the SDK in your MCP server so tool calls are captured.
  2. Get API accesscreate a personal API key with the scopes you need. See authentication below.

What's available

Sessions

List MCP sessions, then drill into one for its tool calls. You can also generate an intent summary for a session, fetch an intent digest, and pull an activity overview.

Intent clusters

Retrieve clustered agent intents with their tool distribution and error rates, or trigger a recompute after new data lands.

Feedback

Read and submit feedback about your MCP tools, including the client, session, and trace context it came from.

Missing capabilities

Read and submit the capability gaps agents report through the get_more_tools virtual tool.

Authentication

Use a personal API key with the scopes above, passed as a bearer token:

Terminal
curl -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
https://us.posthog.com/api/projects/:project_id/mcp_sessions/

Was this page useful?