TL;DR
PostHog is a Analytics MCP server that lets Claude Code, Cursor, Windsurf and any MCP-compatible AI agent query PostHog events, feature flags, and session replays for product analytics via MCP. Install in 1 minute with mcpizy install posthog.
PostHog
Install verified 6 toolsAnalytics
Query PostHog events, feature flags, and session replays for product analytics via MCP.
Official homepageInstall PostHog
mcpizy install posthogclaude mcp add --transport http posthog https://mcp.posthog.com/mcpTools exposed
6 tools availablelist_insightsList product analytics insights
list_insightsList product analytics insights
run_insightRun an insight and return the data
run_insightRun an insight and return the data
Inputs
insight_idstringrequired
list_feature_flagsList feature flags in the project
list_feature_flagsList feature flags in the project
update_feature_flagEnable or disable a feature flag
update_feature_flagEnable or disable a feature flag
Inputs
flag_keystringrequiredactivebooleanrequired
query_eventsQuery events with HogQL
query_eventsQuery events with HogQL
Inputs
querystringrequired
list_cohortsList user cohorts
list_cohortsList user cohorts
Configuration
Works identically across clients. Only the config file path differs.
Claude Code~/.claude.json
~/.claude.json{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"@posthog/mcp-remote"
],
"env": {
"POSTHOG_API_KEY": "phx_...",
"POSTHOG_PROJECT_ID": "12345"
}
}
}
}Cursor.cursor/mcp.json
.cursor/mcp.json{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"@posthog/mcp-remote"
],
"env": {
"POSTHOG_API_KEY": "phx_...",
"POSTHOG_PROJECT_ID": "12345"
}
}
}
}Windsurf~/.codeium/windsurf/mcp_config.json
~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"@posthog/mcp-remote"
],
"env": {
"POSTHOG_API_KEY": "phx_...",
"POSTHOG_PROJECT_ID": "12345"
}
}
}
}Authentication setup
What you can do with PostHog MCP
Paste any of these prompts into Claude Code, Cursor or another MCP-compatible client.
โHow many users signed up this week? Break down by source.โ
Uses: query_events
โTurn on the `new-checkout-flow` feature flag for 10% of usersโ
Uses: update_feature_flag
โList all cohorts in my projectโ
Uses: list_cohorts
Works with
More Analytics MCPs
Alternatives to PostHog
If PostHog doesn't fit your stack, these Analytics MCP servers solve similar problems.
Google Analytics
Official Google Analytics MCP Server. Query traffic data, user behavior, and conversion metrics.
PlainSignal
Real-time website analytics data. Privacy-friendly, lightweight analytics.
Amplitude
Query Amplitude product analytics, cohorts, and funnels from AI-powered workflows.
Frequently asked questions
What is the PostHog MCP server?
PostHog is listed as an Analytics Model Context Protocol server whose documented purpose is to let an MCP-compatible agent query PostHog events, feature flags, and session replays for product analytics via MCP. Client support, permissions and authentication remain specific to the upstream project.
How do I install PostHog MCP with Claude Code?
The fastest way is the MCPizy CLI: run `mcpizy install posthog` and MCPizy will add the server to your `.claude.json` automatically. You can also install it manually by adding an entry under `mcpServers` in `.claude.json` with the command `claude mcp add --transport http posthog https://mcp.posthog.com/mcp` and restarting Claude Code.
Does MCPizy charge to view or install PostHog MCP?
No. Reading this profile and copying its install guidance is free. Upstream software, API, account or usage costs are separate, and licence coverage should be checked from the linked source when available.
Does PostHog MCP work with Cursor and Windsurf?
The MCP standard is supported by those clients, but a specific server can still have client-specific setup or transport limits. Use the configuration shown on this page when present and verify the upstream instructions before installation.
What can I do with PostHog MCP?
Its documented purpose is to let an MCP-compatible agent query PostHog events, feature flags, and session replays for product analytics via MCP. The exact tools, permissions and write capabilities depend on the server version and configuration shown by the upstream project.
Compare before you commit
Put this server beside an alternative, or return to the full evidence directory.
Compare MCP serversBack to directory