Skip to main content
Glama
friendlygeorge

posthog-mcp-server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
POSTHOG_HOSTNoPostHog instance URL (use https://eu.i.posthog.com for EU, or your self-hosted URL)https://us.i.posthog.com
POSTHOG_API_KEYYesYour PostHog personal API key (phx_...)
POSTHOG_PROJECTNoDefault 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/friendlygeorge/posthog-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server