MCP server

PostHog

Query product analytics, feature flags, experiments and errors in PostHog

PostHog's official hosted MCP server gives AI assistants access to analytics queries, SQL insights, feature flags, experiments, error tracking and CDP destinations. It is a free remote endpoint; you sign in through PostHog's auth server, which routes you to the US or EU region automatically, and a personal API key can be sent as a bearer token instead. The PostHog wizard (npx @posthog/wizard mcp add) can install it into Codex, Cursor, Claude and VS Code.

Also available as

Connect

  1. 1Connect it in ChatGPT

    Turn on Developer mode in ChatGPT (Settings → Security and login), open Plugins, select + and paste https://mcp.posthog.com/mcp as the MCP server URL, then sign in with OAuth. Add it to a chat from the composer's tools menu.

  2. 2Or add it to Codex or the API
    codex mcp add posthog --url https://mcp.posthog.com/mcp
    codex mcp login posthog

    The login command opens a browser to finish OAuth.

Configs are generated from the publisher's documented endpoint. Check their docs for plan requirements and scopes. New to this? Read the step-by-step tutorial.

Things to ask

  • “How many users signed up last week, broken down by referrer?”
  • “Create a feature flag called new-checkout rolled out to 10% of users”
  • “What are the top errors in production over the last 24 hours?”
  • “Summarize the results of our pricing page experiment”

Related