> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # MCP Analytics API Canonical URL: https://posthog.com/docs/mcp-analytics/surfaces/api > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://us.posthog.com` (app host for links). ## On this page - [Before you start](#before-you-start) - [What's available](#whats-available) - [Authentication](#authentication) - [Related](#related) **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](https://posthog.com/docs/api/query.md). See [sample HogQL queries](https://posthog.com/docs/mcp-analytics/queries.md). ## Before you start 1. **Install MCP Analytics** – [install the SDK in your MCP server](https://posthog.com/docs/mcp-analytics/installation.md) so tool calls are captured. 2. **Get API access** – [create a personal API key](https://posthog.com/docs/api/personal-api-keys.md) with the scopes you need. See [authentication](#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. These endpoints work only in projects where intent clustering has rolled out. Other projects get a permission error. **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`](https://posthog.com/docs/mcp-analytics/missing-capability.md) virtual tool. ## Authentication Use a [personal API key](https://posthog.com/docs/api.md#authentication) with the scopes above, passed as a bearer token: ```bash curl -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \ https://us.posthog.com/api/projects/:project_id/mcp_analytics/sessions/ ``` ## Related - Explore the same data in the [web app](https://posthog.com/docs/mcp-analytics/surfaces/web-app.md). - Query it conversationally over [MCP](https://posthog.com/docs/mcp-analytics/surfaces/mcp.md). - See the full [PostHog API reference](https://posthog.com/docs/api.md).