Skip to main content
The PostHog AI connector gives Rootly AI permission-scoped access to current product and operational signals during an investigation. Rootly AI can inspect errors, logs, feature-flag activity, dashboards, saved insights, and product analytics without changing your PostHog project.
Rootly fixes the connection to PostHog’s read-only mode and a reviewed tool set. Rootly excludes project switching, arbitrary SQL, data creation, updates, and deletion.

Before You Start

You need:
  • A PostHog account with access to the project Rootly AI should query.
  • Permission in PostHog to approve the requested OAuth access.
  • Permission in Rootly to manage AI connectors.
Choose the PostHog project that contains the errors, logs, feature flags, and analytics used during incident response. One Rootly team can have one active PostHog connection, and each connection operates in one active PostHog organization and project.
Select a specific project during authorization. Organization-wide approval does not make Rootly query every project at once, and Rootly does not expose PostHog’s organization or project switching tools. To use a different project, disconnect PostHog and connect it again with that project selected.
Rootly requests these OAuth scopes: PostHog applies the authorizing user’s permissions in addition to these scopes. Rootly AI cannot retrieve a project, dashboard, flag, or event that the user cannot access.

Connect PostHog

Authorize the PostHog project Rootly AI should use.
1

Open AI Connectors

In Rootly, go to AI & Agents → Connectors and find the PostHog card.
2

Start the Connection

Click Connect. Rootly opens PostHog’s authorization flow. You do not need to create an API key, client ID, or client secret.
3

Choose the PostHog Project

Sign in to the correct PostHog account, select the organization and project Rootly AI should query, and review the requested read scopes.Select a project rather than organization-wide access. Rootly’s read-only tool set operates against the connection’s active project and cannot switch projects later.
4

Approve Access

Approve the request in PostHog. PostHog routes the connection to the account’s US or EU data region automatically.
5

Confirm the Connection

Return to AI & Agents → Connectors. The PostHog card shows Connected after Rootly validates the OAuth grant and approved tool catalog.
Rootly uses OAuth 2.0 with Dynamic Client Registration and Proof Key for Code Exchange (PKCE). The access and refresh credentials are encrypted at rest.

What Rootly AI Can Read

Rootly exposes reviewed PostHog tools across six investigation categories. The logs-services-create name comes from PostHog’s API. In this connection it calculates and returns a read-only top-services aggregation; it does not create a PostHog resource. Rootly sends both a fixed readonly=true restriction and the exact tool list to PostHog. Rootly also enforces the same allowlist before every call. Tools added by PostHog later do not become available automatically.

Questions To Ask

Name the PostHog signal and a bounded time range when possible. These prompts work in Rootly AI SRE and the Slack agent:
  • “What are the top unresolved PostHog errors affecting checkout in the last 24 hours? Include occurrence and affected-user counts.”
  • “Show the dominant error and fatal log patterns for payment-api since the incident began.”
  • “Compare this week’s checkout failure log patterns with the previous week. What changed?”
  • “Did any feature flag change in the 30 minutes before conversion dropped?”
  • “Compare the signup funnel for the last seven days with the prior seven days. Which step regressed?”
  • “Run the current insights on the payments dashboard and summarize the signals relevant to this incident.”
  • “Which events and properties are available for investigating failed subscription renewals?”
If a broad question returns irrelevant results, add the service, event, flag, dashboard, issue, and time window. For example, change “What broke?” to “Find new fatal log patterns for checkout-api between 14:00 and 15:00 UTC and compare them with the preceding hour.”

Data Handling and Permissions

  • On-demand queries. Rootly AI calls PostHog when an investigation or direct question needs the data. The connection does not run a background ingestion job.
  • One active project. Each Rootly team has one PostHog connection with one active organization and project.
  • PostHog permissions apply. Results are limited by the authorizing user’s access and the approved OAuth scopes.
  • Read-only allowlist. Rootly exposes only the tools listed on this page and blocks every write-capable tool or tool that Rootly has not reviewed.
  • No arbitrary SQL. Rootly excludes PostHog’s SQL execution tools. Analytics use structured trends, funnel, retention, insight, and dashboard operations.
  • Encrypted credentials. Rootly encrypts OAuth credentials at rest and removes them when you disconnect the AI connector.
  • AI traces may contain results. PostHog responses can appear in Rootly AI model and observability traces. See Data Privacy for Rootly AI for retention details.
PostHog’s hosted MCP server proxies requests to the account’s US or EU region and does not store the analytics results. PostHog API rate limits still apply to MCP calls.

Manage the Connection

Open AI & Agents → Connectors and find the PostHog card.
  • Click Disconnect to remove the stored OAuth credentials and stop future PostHog queries.
  • Click Connect after disconnecting to authorize a different account, organization, or project.
Disconnecting does not change or delete data in PostHog.

Troubleshooting

Confirm that your browser allows redirects from Rootly and that you can reach mcp.posthog.com. Sign in to PostHog in the same browser, then click Connect again.
Rootly validates the OAuth grant by listing PostHog’s approved tools. Disconnect any failed connection, confirm your PostHog access is active, and connect again. If the problem continues, contact Rootly support with the time of the failed attempt.
A connection uses the active project selected during authorization. Disconnect PostHog, click Connect, and select the intended project. Rootly does not expose PostHog’s project-switching tool.
Sign in to PostHog as the authorizing user and confirm the item exists in the connected project and is visible to that user. Then retry with its exact name or key and a bounded time range.
The OAuth grant may have been revoked, the user’s project access may have changed, or the refresh credential may have expired. Disconnect the AI connector and authorize it again.
Add the signal type, service or event name, and time range. Ask separate questions for errors, logs, flags, and product analytics when the investigation spans several PostHog products.

Frequently Asked Questions

No. Rootly forces PostHog’s read-only mode, requests read scopes, filters the hosted catalog to the reviewed tools listed on this page, and enforces that allowlist before each call.
One MCP connection has one active organization and project. Rootly excludes the switching tools, so selecting the intended project keeps every investigation in a predictable context. Organization-wide approval does not query all projects together.
A Rootly team supports one active PostHog connection. To use another project, disconnect the current connection and authorize the replacement project.
No. Rootly uses PostHog’s OAuth flow and stores the resulting credentials encrypted. Do not paste a personal API key into Rootly.
PostHog routes the hosted MCP connection to the US or EU region associated with the account you authorize.

AI Connectors

Browse every data source Rootly AI can use during an investigation.

Rootly AI Data Privacy

Review encryption, retention, trace handling, and model controls.

PostHog MCP Overview

Review PostHog’s hosted MCP server and authentication behavior.

PostHog MCP Tools

Browse PostHog’s complete upstream tool catalog.