Skip to main content
Glama

PostHog MCP Server

Type 3 DAuth MCP server for the PostHog product analytics API.

Tools

Tool

Description

list_projects

List all projects in the organization

query_events

Query events with optional filters

query_insights

Query TRENDS, FUNNELS, or RETENTION insights

list_feature_flags

List all feature flags

get_feature_flag

Get a specific feature flag by ID

create_annotation

Create a graph annotation

Related MCP server: posthog-mcp

Auth Setup

  1. Go to PostHog → Settings → Personal API Keys

  2. Create a key with project read access

  3. Copy the key (starts with phc_)

Environment Variables

POSTHOG_API_KEY=phc_your_key_here   # Required Credential (DAuth)

Deploy

pip install -e .
python src/main.py

Usage

result = await runner.run(
    input="List my PostHog projects",
    mcp_servers=["JiayuWang/posthog-mcp"],
)

Safety Notes

  • create_annotation writes to PostHog but is non-destructive

  • All other tools are read-only

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables interaction with PostHog analytics platform, allowing users to list projects, create annotations, and search insights through natural language in Claude Desktop.
    5
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables interaction with PostHog's product analytics platform through natural language, allowing users to manage feature flags, view errors, and access other platform features.
    1
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI agents to query PostHog analytics data directly via tool calls, including insights, events, feature flags, trends, and persons.
    5
    MIT