PostHog MCP Server

Official

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PERSONAL_API_KEYYesPostHog API Key with annotation:write and project:read scopes obtained from your project settings

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
list_posthog_projects

List all available PostHog projects.

create_posthog_annotation

Create a PostHog annotation.

Args: project_id: The ID of the project as an integer (e.g. 99423) content: The content/text of the annotation date_marker: Optional ISO-8601 timestamp for the annotation (e.g. 2024-03-20T14:15:22Z)