PostHog MCP server
Query PostHog analytics, manage flags, and triage errors from your AI agent
Official PostHog MCP Server 🦔
The official PostHog MCP server is a free, hosted endpoint that lets an MCP-compatible agent read and write across PostHog's products from plain-text prompts. Agents can run analytics and HogQL queries, manage feature flags and experiments, triage errors, set up CDP destinations, and chain multi-step workflows.
Hosted remote endpoint
Connect any MCP-compatible client to https://mcp.posthog.com/mcp. The PostHog authentication server automatically routes you to the correct data region (US or EU) based on the account you log in with.
Read and write across PostHog
Once connected, the agent can run analytics queries, manage feature flags and experiments, execute SQL, configure CDP destinations, and triage support tickets, plus multi-step recipes that chain these together.
Error triage in your editor
Ask for the top errors in a project this week, pull a full stack trace and metadata to propose a fix, or mark an issue resolved and create an assignment rule.
Governed metrics from your semantic layer
Run governed metrics from your semantic layer (beta) so every agent session answers questions like "what's our MRR?" with the same canonical definition.
Wide client support
Works with PostHog Desktop, Claude Code, Claude Desktop, Cursor, Codex, VS Code, Windsurf, and Zed. The PostHog Wizard (npx @posthog/wizard mcp add) can install it directly into several of these.
Who it’s for. Product and engineering teams already using PostHog who want to query analytics, manage feature flags, and debug errors from Claude Code, Cursor, or another MCP client without switching to the browser.
Example prompts
auth: OAuth · pricing: Connecting and calling MCP tools is free; some AI-powered tools bill as PostHog AI spend · auto-generated from the project's README, site, and live tools list; not yet reviewed
tools/list handshake. For local/stdio servers that runs in a sandbox (gated off until configured); remote servers are probed directly.- repohttps://github.com/PostHog/posthog
- homepagehttps://posthog.com/docs/model-context-protocol
- licenseNOASSERTION
- adoption39875 stars · 3406 forks
Add the “as seen on MCPExplorer” badge to your README.
This is one server. A loadout combines the right servers, governance, and proven plays for a whole job — assembled deliberately, not tool-dumped.
Explore loadouts →