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: Google Analytics MCP Server

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

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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/JiayuuWang/posthog-mcp'

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