Data Sources Intermediate

PostHog MCP Integration

3 min read Updated May 19, 2026
Events, funnels, retention, feature flags, cohorts, and session-replay metadata from PostHog, all read-only via API key.

PostHog is open-source product analytics with event tracking, funnels, feature flags, and session replay in one platform. Connecting PostHog to clariBI brings product usage data into your AI analyses through a single API key.

Why connect PostHog

Product analytics questions live behind dashboards that take time to build. Ad-hoc questions usually require SQL or saved insights.

With PostHog connected, you can ask "What is our day-1 retention this month?", "Which feature flag rollouts correlate with higher activation?", or "Funnel drop-off between signup and first action?" without writing queries.

How the connection works

clariBI talks to PostHog through its hosted MCP server at https://mcp.posthog.com/mcp. Authentication uses an API key you generate in your vendor account. Tokens stay encrypted server-side and never leave clariBI in clear form.

sequenceDiagram
    actor U as You
    participant C as clariBI
    participant V as PostHog
    U->>V: Generate an API key in PostHog dashboard
    U->>C: Paste the key into the connect wizard
    C->>V: list_tools (verify the key)
    V-->>C: Tools available
    C->>C: Encrypt and store credentials
    C-->>U: Connection ready

Available tools

The AI engine selects from these read-only PostHog tools during analyses. None of them modify data in PostHog.

ToolReturnsExample question
dashboard-getA dashboard with widgets and config.Show me the activation dashboard.
dashboards-get-allAll dashboards in the project.What dashboards exist?
feature-flag-get-allFeature flags with rollout status.Which flags are at 100% rollout?
feature-flag-get-definitionDefinition of a single feature flag.Show me the new-pricing flag definition.
query-runRun a saved or ad-hoc query.Run the daily active users query.
query-trendsTrend analytics over a time range.Signups by day for the last 30 days.
query-funnelFunnel conversion rates.Signup to first-action conversion?
query-error-tracking-issues-listError tracking issues.Top errors in the last 24 hours.
query-session-recordings-listSession recording metadata.Recent session recordings for paying users?
cohorts-listCohorts you have defined.List user cohorts.
cohorts-retrieveA single cohort.Show me the paying users cohort.
persons-listPerson records.Find people who triggered signup events.
persons-retrieveA single person.Show me person p_001.
hogql-schemaHogQL schema for SQL queries against events.What event properties can I query?
docs-searchPostHog documentation search.How do I set up feature flags?

Data flow during analysis

When you ask a question that maps to PostHog, the AI engine routes to the right tool, reads the result, and pairs the answer with a chart you can pin to a dashboard.

sequenceDiagram
    actor U as You
    participant C as clariBI
    participant AI as AI engine
    participant V as PostHog
    U->>C: Ask a question about product analytics data
    C->>AI: Plan the analysis
    AI->>V: Call the right tool
    V-->>AI: Tool result
    AI->>AI: Summarize and chart
    C-->>U: Answer plus visual

Setting up the connection

  1. Open Data Sources in the clariBI sidebar.
  2. Click Add data source.
  3. Open the MCP Servers tab.
  4. Click the PostHog card.
  5. In PostHog, open Settings → Personal API keys and create a new key with analytics_read scope.
  6. Paste the key into clariBI and click Connect.
  7. Give your data source a name and click Finish.

Permissions and data access

clariBI requests the scopes you granted on the API key (typically analytics_read). Choose a read-only scope when creating the key. Revoke from PostHog Settings or from clariBI Settings.

Troubleshooting

ErrorCauseFix
"Could not verify API key"The key was created with insufficient scopes or for a different project.Create a new personal API key with analytics_read scope on the right project, then paste it again.
Cloud vs self-hosted endpointPostHog Cloud (US/EU) and self-hosted PostHog have different endpoint URLs.For self-hosted, contact us; the catalog defaults to PostHog Cloud.

Related articles

Related Articles

Data Sources Intermediate

Morningstar MCP Integration

Investment research, fund data, ratings, fair-value estimates, and 200,000+ global securities from …

5 min read
Data Sources Intermediate

Keboola MCP Integration

Data pipelines, transformations, tables, and project metadata from the Keboola data-platform — for …

5 min read
Data Sources Intermediate

Logfire (EU) MCP Integration

OpenTelemetry traces, metrics, and logs from Pydantic Logfire (EU region) — for EU-resident custome…

5 min read

Still Need Help?

Can't find what you're looking for? Our support team is here to help you succeed with clariBI.