The PostHog MCP server is a free hosted endpoint at https://mcp.posthog.com/mcp. It lets agents read and write across PostHog products, such as analytics and SQL, dashboards, experiments, feature flags, surveys, session replay and error tracking. The code now lives in the PostHog monorepo under services/mcp.
What it does
Where PostHog MCP runs and what it adds, from its documentation
Run analytics queries and HogQL SQL
Create and manage feature flags and experiments
Triage error tracking issues and read stack traces
Manage dashboards, surveys and CDP destinations
Triage support tickets and run semantic-layer metrics (beta)
When to use it
Good fit
Fixing production errors from your editor using PostHog stack traces
Shipping a feature flag from a prompt
Answering product analytics questions in an agent session
Not for
Orgs without AI data processing enabled, if you need the AI-powered tools (they require it)
How to install PostHog MCP
You need: A PostHog account; Personal API key (manual install) or OAuth login; Node.js for npx
Run: npx @posthog/wizard@latest mcp add
Or add https://mcp.posthog.com/mcp in your client (Claude Code, Cursor, VS Code, Windsurf, Codex, Zed)
Authenticate with PostHog; region (US/EU) is routed automatically
Or use a personal API key from the MCP Server preset with mcp-remote