PostHog MCP Server

Stableanalytics
110 starsTypeScriptposthog
GitHub
About

Overview

The PostHog MCP Server enables AI agents to interact with PostHog's open-source product analytics suite. It provides tools for querying events, managing feature flags, accessing session recordings, and analyzing experiments.
Capabilities

Tools & Capabilities

query_events

Query events with HogQL

list_feature_flags

List feature flags

toggle_feature_flag

Enable or disable a feature flag

get_insights

Get saved insights

list_experiments

List running experiments

Setup

Installation

bash
Install
npx -y @posthog/mcp-server
Examples

Example Usage

javascript
Usage
{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": ["-y", "@posthog/mcp-server"],
      "env": { "POSTHOG_HOST": "https://app.posthog.com", "POSTHOG_API_KEY": "your-key" }
    }
  }
}

Quick Info

Authorposthog
LanguageTypeScript
StatusStable
Stars 110
Last UpdatedFeb 12, 2026

Need a Custom MCP Server?

Our team builds custom MCP servers tailored to your workflow.

Get in Touch

Need a Custom MCP Server?

Our team builds custom MCP servers tailored to your workflow. From proprietary data sources to internal tools, we have you covered.

Contact Us
CortexAgent Customer Service

Want to skip the form?

Our team is available to help you get started with CortexAgent.

This chat may be recorded for quality assurance. You can view our Privacy Policy.

PostHog MCP Server - MCP Server Directory - CortexAgent