PostHog MCP Server

Productivitystdiov0.5.0
Repository

Provides AI agents with access to PostHog product analytics through the Model Context Protocol. Enables querying events, analyzing funnels, inspecting feature flags, and reviewing session recordings metadata. Supports HogQL queries for advanced analytics and cohort analysis for user segmentation.

Bağlan

Bu yapılandırmayı şuraya ekleyin: .claude/mcp.json

{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": [
        "-y",
        "@posthog/mcp-server"
      ],
      "env": {
        "POSTHOG_API_KEY": "<YOUR_POSTHOG_API_KEY>",
        "POSTHOG_HOST": "<YOUR_POSTHOG_HOST>",
        "POSTHOG_PROJECT_ID": "<YOUR_POSTHOG_PROJECT_ID>"
      }
    }
  }
}

Araçlar (4)

query_events

Query PostHog events using HogQL with filters, aggregations, and time ranges.

{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "limit": {
      "type": "integer",
      "description": "Maximum results to return"
    },
    "query": {
      "type": "string",
      "description": "HogQL query string"
    }
  }
}

get_funnel

Retrieve funnel analysis results showing conversion rates between defined steps.

{
  "type": "object",
  "required": [
    "steps"
  ],
  "properties": {
    "steps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string"
          }
        }
      },
      "description": "Funnel step events in order"
    },
    "date_to": {
      "type": "string",
      "description": "End date"
    },
    "date_from": {
      "type": "string",
      "description": "Start date (ISO 8601 or relative like -7d)"
    }
  }
}

list_feature_flags

List all feature flags with their current status, rollout percentage, and conditions.

{
  "type": "object",
  "properties": {
    "active": {
      "type": "boolean",
      "description": "Filter by active/inactive flags"
    }
  }
}

get_insights

Retrieve a saved PostHog insight by ID with its results and configuration.

{
  "type": "object",
  "required": [
    "insight_id"
  ],
  "properties": {
    "insight_id": {
      "type": "integer",
      "description": "PostHog insight ID"
    }
  }
}

Kaynaklar

Bu sunucu herhangi bir kaynak sunmuyor.

Prompt'lar

Bu sunucu herhangi bir prompt sunmuyor.

Sunucu bilgileri

Yazar
PostHog (@PostHog)
Repository
https://github.com/PostHog/posthog-mcp-server
Lisans
MIT
Sürüm
0.5.0
Yıldızlar
1,240
Son güncelleme
30 Mayıs 2026