The agent-native analytics layer
Give your AI agent read access to your PostHog project. Analyze sessions, scroll depth, button clicks, and saved insights — or drop into raw HogQL when you need something custom. All through the Model Context Protocol, connected to your own PostHog workspace.
How it works
From PostHog key to HogQL query in five steps.
Sign up and get an API key
Create a free account at gentic.co, generate an API key from your dashboard, and use it as a Bearer token to authenticate your agent.
Connect your PostHog project
In the Gentic dashboard, paste your PostHog Personal API Key, Project ID, and Host (US/EU). The key is encrypted at rest and scoped to your organization.
Add the MCP server to your agent
Drop https://mcp.gentic.co/analytics into Claude Code, Claude Web, OpenClaw, ChatGPT, n8n, or any MCP-compatible client. Pass your Gentic API key as a Bearer token.
Ask about a page or campaign
Point the agent at an entry pathname — e.g. a landing page or an ad destination. It calls posthog_analyze_sessions to compare recent vs previous period, scroll depth, and button clicks.
Drop into HogQL when you need more
For anything the built-in tools don't cover, the agent writes raw HogQL against events, sessions, and persons — the same dialect you'd type into PostHog's own query editor.
Available tools
5 tools your AI agent can call through the Model Context Protocol.
posthog_analyze_button_clicks
Analyze button click breakdown for sessions that entered through a specific page.
posthog_analyze_sessions
Analyze session metrics for a specific entry page, comparing recent vs previous period.
posthog_execute_hogql_query
Execute a raw HogQL query against PostHog.
posthog_get_insights
List saved PostHog insights (dashboards, funnels, trends) for the connected project.
posthog_scroll_depth_analysis
Analyze scroll depth for sessions entering through a specific pathname.
Connect in seconds
Sign up, connect your PostHog project, and add the MCP server to your agent. Works with Claude Code, Claude Web, OpenClaw, Claude Cowork, ChatGPT, n8n, and any MCP client.
claude mcp add gentic-analytics \
--transport http \
https://mcp.gentic.co/analytics \
--header "Authorization: Bearer YOUR_API_KEY"You can also connect via OAuth — just add gentic-analytics as a connector in Claude or ChatGPT settings. No API key needed; authentication is handled automatically.
Install the Gentic agent skill to teach your agent the optimal workflow so it gets the best results automatically.
npx skills add gentic-co/agent-skillsWorks with Claude Code, Cursor, Copilot, and 40+ other agents.
Transparent per-call pricing
PostHog analytics tools are priced per call. Pricing is visible at connect time and deducted from your Gentic credits.
| Tool | Cost |
|---|---|
| posthog_analyze_button_clicks | 8¢ / call |
| posthog_analyze_sessions | 10¢ / call |
| posthog_execute_hogql_query | 10¢ / call |
| posthog_get_insights | Free |
| posthog_scroll_depth_analysis | 8¢ / call |
Pricing is pulled live from the Gentic MCP manifest so it always matches what you'll actually be charged. Connect to a PostHog project once and run as many queries as you need.
Why agent-native analytics?
PostHog is powerful. But your agent can't click through the UI — it needs typed tools, clean schemas, and a path into raw HogQL when the pre-built tools fall short. That's what this is.
No dashboards to click
Your agent describes what it wants to know — 'why did this landing page convert worse last week?' — and calls the right tool. No dashboard tours, no copy-paste from the PostHog UI.
Read-only by default
The integration only needs a read-scoped Personal API Key. Your agent cannot ingest, mutate, or delete anything in your PostHog project.
Raw HogQL escape hatch
When the pre-built tools don't cover what you need, the agent drops into posthog_execute_hogql_query and writes the exact query it wants against your events, sessions, and persons.
Composable with every MCP server
Chain PostHog data with Gentic Data, Meta ads, Research, and Influencer tools — e.g. pull session metrics for an ad's landing page and compare against ad spend from Meta.