posthog-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| POSTHOG_HOST | No | PostHog instance URL (use https://eu.i.posthog.com for EU, or your self-hosted URL) | https://us.i.posthog.com |
| POSTHOG_API_KEY | Yes | Your PostHog personal API key (phx_...) | |
| POSTHOG_PROJECT | No | Default project ID. If empty, must be specified per-call. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_eventsA | Query events from PostHog. Filter by event name, person, date range, and properties. Returns recent events matching your criteria. |
| get_personA | Get a PostHog person (user) by their distinct_id. Returns person properties, creation date, and event count. |
| list_personsA | List PostHog persons (users). Search by name or distinct_id, with pagination. |
| list_dashboardsA | List all PostHog dashboards in the project. Returns dashboard names, IDs, and widget counts. |
| get_dashboardA | Get a specific PostHog dashboard by ID, including its insights and widgets. |
| execute_insightA | Execute a saved PostHog insight by ID and return the results. Use list_dashboards to find insight IDs, or pass a raw insight definition. |
| list_feature_flagsA | List all PostHog feature flags in the project. Shows name, key, active status, and rollout percentage. |
| evaluate_feature_flagA | Evaluate a feature flag for a specific user. Returns whether the flag is enabled and its variant value. |
| list_cohortsB | List all PostHog cohorts in the project. Shows name, type, person count, and creation date. |
| list_experimentsA | List all PostHog experiments (A/B tests) in the project. Shows name, status, and key results. |
| get_experimentA | Get detailed results for a specific PostHog experiment, including variants, metrics, and statistical significance. |
| list_actionsA | List PostHog event actions (custom event definitions). Shows name, steps, and creation date. |
| get_project_infoA | Get basic information about the PostHog project — name, ID, created date, and available features. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 13 tools
Each tool targets a distinct resource-action pair: events, persons, dashboards, insights, feature flags, cohorts, experiments, actions, and project info. The list/get/execute/evaluate verbs clearly differentiate operations on the same resource.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., list_events, get_person, evaluate_feature_flag), with verbs like list, get, execute, and evaluate used uniformly for their respective operations.
13 tools is well-scoped for a PostHog analytics server, covering major data types (events, persons, dashboards, insights, flags, cohorts, experiments, actions) without excessive granularity. Each tool serves a distinct purpose.
The tool set provides comprehensive read-only querying across PostHog's core domains. Minor gaps exist: no direct list_insights endpoint (insights only via dashboards/execute_insight) and no write/update/delete operations, but these are likely intentional for a query-oriented server.