analyticsproduct-analyticsfeature-flagsexperiments

Summary

PostHog's official remote MCP server — query product analytics, manage feature flags, create insights, and run experiments.

Features

  • Query analytics events, trends, and insights
  • Create and manage feature flags
  • Run and analyze experiments
  • Pull error tracking data

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the environment variables with your own values.
  3. Restart the agent — the "PostHog" tools will be available.
{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.posthog.com/mcp"
      ],
      "env": {
        "POSTHOG_AUTH_HEADER": "Bearer <your-personal-api-key>"
      }
    }
  }
}

Description

The official PostHog MCP server connects an agent directly to your PostHog project. It can query analytics events and trends, create and manage feature flags, build insights and dashboards, run and analyze experiments, and pull error tracking data — all through natural-language requests instead of the PostHog UI or raw API calls. It's a free, hosted remote endpoint that authenticates with a PostHog personal API key and works with Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, and other MCP clients. The quickest setup uses PostHog's own installer wizard, which detects and configures supported clients automatically.

Related MCP Servers

Browse all MCP servers →