All integrations

PostHog

Proxy PostHog's hosted MCP server for analytics, feature flags, error tracking, HogQL, and more.

OAuth

Overview

Proxy PostHog's hosted MCP server for analytics, feature flags, error tracking, HogQL, and more. Tools mirror upstream dynamically after connect.

Prerequisites

  • A PostHog account with access to the org/project you want AI to query
  • A stackgate.ai account

Getting credentials

  1. Open Integrations → PostHog in stackgate.ai.
  2. Click Activate, then Connect PostHog.
  3. Complete PostHog OAuth (RFC 9728 / PKCE).
  4. Open Preferences to pin organization, project, region (US/EU), and optional read-only mode.

You can optionally override with a PostHog personal API key in preferences instead of OAuth.

Using with AI clients

  • Dedicated endpoint: POST /mcp/posthog
  • Private gateway: posthog__* namespaced tools (mirrored from upstream)
  • Run refresh-tools-tool after connect to sync the latest upstream tool list

See PostHog MCP documentation for upstream capabilities.

Troubleshooting

  • OAuth failed — confirm PostHog OAuth client registration for your region (US vs EU MCP URL).
  • Empty tool list — call refresh-tools-tool after connect; upstream may require org/project preferences.
  • Token expired — reconnect PostHog from My Integrations.

Available tools

Tools are mirrored dynamically from PostHog's hosted MCP server after you connect. Use refresh-tools-tool to sync the latest upstream tool list.

  • Analytics queries and HogQL
  • Feature flags inspection
  • Error tracking and session replay metadata
  • Experiment and dashboard context

See also: upstream MCP documentation.

MCP endpoint: https://stackgate.ai/mcp/posthog (HTTP) or via the private gateway.