PostHog MCP
by PostHog
Official listing: built and published by PostHog. More from PostHog
Gives coding agents hosted MCP access to PostHog analytics queries, SQL, feature flags, experiments, and error tracking, with OAuth or a personal API key.
Use it now
Keep it with up to 9 other tools you're setting up, then share them all as one link.
Try this first
Ask your assistant, with PostHog MCP connected:
- Feature Flag Management
Use PostHog MCP to create PostHog feature flags: ‹what you need›
- Error Tracking Triage
Use PostHog MCP to rank top error groups: ‹what you need›
- SQL And Insights
Use PostHog MCP to run HogQL queries: ‹what you need›
Connect it over MCP
{
"mcpServers": {
"posthog-mcp": {
"url": "https://mcp.posthog.com/mcp"
}
}
}claude mcp add --transport http posthog-mcp https://mcp.posthog.com/mcp
In Grok, ChatGPT and other assistants, add a custom connector with the address https://mcp.posthog.com/mcp (how, step by step).
It may ask you to sign in to PostHog or for a key when you add it; the setup guide says which.
Setup guide: posthog.com/docs/api
Install the CLI
npm install -g @posthog/cli
Setup guide: posthog.com/docs/api
Call the API
Auth OAuth 2.0: you sign in with PostHog
Setup guide: posthog.com/docs/api
Compare
Press Compare to add it to the tray at the bottom of the window, then pick up to 2 others anywhere on the site.
- Access
- MCPAPICLI
- Auth
- OAuth 2.0
- Skills
- 4
Skills
Feature Flag Management
Creates, updates, and rolls out PostHog feature flags from a prompt using the 29 tools in the MCP server's feature flags category.
Experiment Management
Sets up, inspects, and analyzes A/B tests and their results through the experiments category of PostHog MCP tools.
Error Tracking Triage
Ranks top error groups, pulls full stack traces for crashes, resolves issues, and creates assignment rules for future errors.
SQL And Insights
Runs HogQL queries with execute-sql and creates, reads, or deletes product analytics insights and dashboards in a PostHog project.