MCP server for PostHog β product analytics for AI assistants. Query events, persons, insights, da...
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Connect AI assistants to PostHog β query events, persons, insights, dashboards, feature flags, cohorts, and experiments through the Model Context Protocol.
Works with Claude Desktop, Cursor, Windsurf, Cline, Continue, and any MCP-compatible client.
| Tool | Description |
|---|---|
list_events | Query events with filters (event name, person, date range, properties) |
get_person | Get a person (user) by distinct_id β properties, creation date, event count |
list_persons | Search and list persons with pagination |
list_dashboards | List all dashboards β names, tags, widget counts |
get_dashboard | Get a specific dashboard with its insights and widgets |
execute_insight | Execute a saved insight (trend, funnel, etc.) and get results |
list_feature_flags | List all feature flags β key, active status, rollout percentage |
evaluate_feature_flag | Evaluate a flag for a specific user and get variant value |
list_cohorts | List cohorts β name, type (dynamic/static/SQL), person count |
list_experiments | List A/B tests β name, status, feature flag, dates |
get_experiment | Get experiment results with variant data and statistical significance |
list_actions | List custom event actions/definitions |
get_project_info | Get project name, ID, settings, and data region |
Go to PostHog β Settings β Personal API Keys and create a key with read access.
Or visit: https://your-instance.posthog.com/settings/user-api-keys
Claude Desktop β add to claude_desktop_config.json:
Cursor β add to MCP settings (.cursor/mcp.json):
| Variable | Required | Default | Description |
|---|---|---|---|
POSTHOG_API_KEY | β | β | Your PostHog personal API key (phx_...) |
POSTHOG_HOST | β | https://us.i.posthog.com | PostHog instance URL (use https://eu.i.posthog.com for EU) |
POSTHOG_PROJECT | β | "" | Default project ID. If empty, must be specified per-call. |
If you run PostHog on your own infrastructure, set POSTHOG_HOST to your instance URL:
Once configured, ask your AI assistant:
This server wraps the PostHog REST API (v1). Full documentation:
MIT Β© Nova
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/posthog-mcp-server-2)<a href="https://allmcps.com/mcp/posthog-mcp-server-2"><img src="https://allmcps.com/api/badge/posthog-mcp-server-2?style=directory" alt="Posthog MCP Server on AllMCPs" /></a>