Gentic Analytics — Documentation

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.

1. Getting Started

Sign Up & Get Your API Key

Before you can use Gentic Analytics, you need an API key to authenticate your requests.

  1. Go to gentic.co/analytics and create an account.
  2. Create an organization from your dashboard. API keys and billing are scoped to the organization.
  3. Generate an API key and use it as a Bearer token in your MCP client.

2. Connecting to the MCP Server

The server is available at https://mcp.gentic.co/analytics. For Claude Code:

claude mcp add gentic-analytics \
  --transport http \
  https://mcp.gentic.co/analytics \
  --header "Authorization: Bearer YOUR_API_KEY"

For Claude Web and ChatGPT you can also connect via OAuth — no API key needed. See the connect section on the landing page for other MCP clients (n8n, OpenClaw).

3. Agent Skill

For the best results, pair the MCP server with the Gentic Analytics agent skill. The MCP server gives your agent tool access; the skill teaches it the optimal workflow order. Both the raw SKILL.md and a ready-to-upload .skill bundle are generated on demand from the live manifest, so they always reflect the current tools and pricing.

Add the skill directly via URL:

https://gentic.co/analytics/SKILL.md

Or upload a .skill bundle to Claude Managed Agents:

https://gentic.co/analytics/gentic-analytics.skill

Download this file and upload it wherever Claude Managed Agents asks for a .skill file. It's a zip bundle generated on demand from the latest SKILL.md.

4. Connecting Your PostHog Project

Gentic Analytics reads analytics from your own PostHog project. Connect it once from the dashboard:

  1. Open the Gentic dashboard and go to the Integrations section.
  2. In PostHog, go to Settings → Personal API Keys and create a read-only key with at minimum query:read, project:read, and insight:read scopes.
  3. Paste the key, your Project ID, and your Host (https://us.i.posthog.com or https://eu.i.posthog.com) into the PostHog connect dialog.
  4. Gentic will validate the key against PostHog and store it encrypted at rest. The key is scoped to your organization.

5. When to Apply

  • User is debugging a funnel, a landing page, or a campaign and wants to know what's actually happening on the site.
  • User wants to compare a recent period against a previous one — traffic, engagement, scroll, clicks.
  • User asks about a specific entry URL or pathname.
  • User wants to pull a saved PostHog insight or run a custom HogQL query against events / sessions / persons.

6. Workflow

  1. 1. Start with the entry pathname

    If the user mentions a page, ad, or campaign, resolve it to a PostHog entry pathname (e.g. `/pages/qure-microinfusion-offer`). Almost every tool keys off this. If the user is vague, ask.

  2. 2. Use posthog_analyze_sessions first

    For any 'how is this page doing' question, start with `posthog_analyze_sessions`. It gives you recent-vs-previous period volume, engagement, quality, performance, and traffic-source breakdowns in one call. This is almost always the right first move.

  3. 3. Drill down with scroll depth and button clicks

    If sessions look thin or engagement drops, call `posthog_scroll_depth_analysis` to see where readers are dropping off, and `posthog_analyze_button_clicks` to see which CTAs are pulling. Run both in parallel — they're independent.

  4. 4. Pull saved insights

    Use `posthog_get_insights` (free) to surface saved funnels and dashboards the team has already built. Prefer existing insights over ad-hoc HogQL when the answer already lives in one.

  5. 5. Drop into HogQL for custom questions

    When the pre-built tools don't cover it — cross-event joins, custom aggregations, specific user segments — use `posthog_execute_hogql_query`. HogQL is PostHog's SQL dialect; syntax docs at https://posthog.com/docs/hogql. Keep queries bounded (LIMIT clauses) and read-only (this integration is scoped read-only anyway).

7. Tool Reference

5 tools, rendered live from the Gentic MCP manifest. Parameter tables come directly from each tool's JSON Schema.

posthog_analyze_button_clicks

8¢ / call

Analyze button click breakdown for sessions that entered through a specific page. Returns click counts, unique users, and share-of-clicks per button text. Useful for identifying which CTAs on a landing page are driving engagement.

ParameterTypeDescription
entry_pathname
required
string

The entry pathname to analyze, e.g. '/pages/qure-microinfusion-offer'

days_backnumber

Days to look back. Defaults to 7.

1 – 180

posthog_analyze_sessions

10¢ / call

Analyze session metrics for a specific entry page, comparing recent vs previous period. Returns volume, engagement, quality, performance, and traffic-source breakdowns. Useful for spotting regressions or lifts after page/campaign changes.

ParameterTypeDescription
entry_pathname
required
string

The entry pathname to analyze, e.g. '/pages/qure-microinfusion-offer'

days_backnumber

Total days to analyze (2-180). Split in half for comparison (e.g. 14 = last 7 vs previous 7). Defaults to 14.

2 – 180

posthog_execute_hogql_query

10¢ / call

Execute a raw HogQL query against PostHog. Use for custom analytics queries on events, sessions, persons — e.g. "SELECT properties.$current_url, count() FROM events WHERE event = '$pageview' GROUP BY properties.$current_url LIMIT 50". Returns query results as JSON.

ParameterTypeDescription
hogql_query
required
string

The HogQL query to execute. HogQL is PostHog's SQL dialect — see https://posthog.com/docs/hogql

posthog_get_insights

Free

List saved PostHog insights (dashboards, funnels, trends) for the connected project. Supports pagination. Free.

ParameterTypeDescription
limitnumber

Max insights to return (1-100). Defaults to 100.

1 – 100

offsetnumber

Number of insights to skip for pagination. Defaults to 0.

min 0

posthog_scroll_depth_analysis

8¢ / call

Analyze scroll depth for sessions entering through a specific pathname. Returns avg/max scroll percent, time on page, and reader distribution (deep/medium/light). Useful for diagnosing which sections of a landing page users actually reach.

ParameterTypeDescription
entry_pathname
required
string

The entry pathname to analyze, e.g. '/pages/qure-microinfusion-offer'

days_backnumber

Days to look back. Defaults to 7.

1 – 180

8. Pricing

Pricing is pulled live from the Gentic MCP manifest. All prices are per call and deducted from your Gentic credits.

ToolCost
posthog_analyze_button_clicks8¢ / call
posthog_analyze_sessions10¢ / call
posthog_execute_hogql_query10¢ / call
posthog_get_insightsFree
posthog_scroll_depth_analysis8¢ / call

9. Notes

  • All tools are organization-scoped and talk to the PostHog project connected in the Gentic dashboard.
  • The stored PostHog key is read-only — write/mutate queries will fail at the PostHog side, not Gentic's side.
  • Scroll depth, button clicks, and session analysis all default to a 7-14 day window. Pass `days_back` to widen it up to 180 days.