MCP Analytics API

Contents

Open beta

The MCP Analytics API is in beta. Endpoints may change before general availability.

Use the API to retrieve MCP Analytics data for dashboards, reports, or workflows. Reads require mcp_analytics:read. Submitting feedback or missing capabilities requires mcp_analytics:write. Generating session summaries and recomputing clusters also require write access.

For raw events, use the query API. See sample HogQL queries.

Before you start

  1. Install MCP Analytics – install the SDK in your MCP server so tool calls are captured.
  2. Get API access – create a personal API key with the scopes you need. See authentication below.

What's available

Sessions

List MCP sessions. Select a session to retrieve its tool calls. You can also generate session summaries, retrieve an intent digest, and request an activity overview.

Intent clusters

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

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_analytics/sessions/

Still have questions?

Was this page useful?