MCPizy
BrowseGuidesDocsFor publishersSubmit

TL;DR

PostHog is a Analytics MCP server that lets Claude Code, Cursor, Windsurf and any MCP-compatible AI agent query PostHog events, feature flags, and session replays for product analytics via MCP. Install in 1 minute with mcpizy install posthog.

๐Ÿฆ”

PostHog

Install verified 6 tools

Analytics

Last updated September 23, 2026 ยท By MCPizy team

Query PostHog events, feature flags, and session replays for product analytics via MCP.

Official homepage

Install PostHog

Via MCPizy CLI (recommended):
mcpizy install posthog
Or run directly:
claude mcp add --transport http posthog https://mcp.posthog.com/mcp

Tools exposed

6 tools available
list_insights

List product analytics insights

run_insight

Run an insight and return the data

Inputs

  • insight_idstringrequired
list_feature_flags

List feature flags in the project

update_feature_flag

Enable or disable a feature flag

Inputs

  • flag_keystringrequired
  • activebooleanrequired
query_events

Query events with HogQL

Inputs

  • querystringrequired
list_cohorts

List user cohorts

Configuration

Works identically across clients. Only the config file path differs.

Claude Code~/.claude.json
{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": [
        "-y",
        "@posthog/mcp-remote"
      ],
      "env": {
        "POSTHOG_API_KEY": "phx_...",
        "POSTHOG_PROJECT_ID": "12345"
      }
    }
  }
}
Cursor.cursor/mcp.json
{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": [
        "-y",
        "@posthog/mcp-remote"
      ],
      "env": {
        "POSTHOG_API_KEY": "phx_...",
        "POSTHOG_PROJECT_ID": "12345"
      }
    }
  }
}
Windsurf~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": [
        "-y",
        "@posthog/mcp-remote"
      ],
      "env": {
        "POSTHOG_API_KEY": "phx_...",
        "POSTHOG_PROJECT_ID": "12345"
      }
    }
  }
}

Authentication setup

  1. 1

    Create a personal API key with the necessary scopes

    Get it POSTHOG_API_KEY
  2. 2

    Copy your Project ID from PostHog settings

    Get it POSTHOG_PROJECT_ID

What you can do with PostHog MCP

Paste any of these prompts into Claude Code, Cursor or another MCP-compatible client.

โ€œHow many users signed up this week? Break down by source.โ€

Uses: query_events

โ€œTurn on the `new-checkout-flow` feature flag for 10% of usersโ€

Uses: update_feature_flag

โ€œList all cohorts in my projectโ€

Uses: list_cohorts

Works with

Claude Code
Claude Desktop
Cursor
Windsurf
VS Code + Copilot
Any MCP Client

Frequently asked questions

What is the PostHog MCP server?

PostHog is listed as an Analytics Model Context Protocol server whose documented purpose is to let an MCP-compatible agent query PostHog events, feature flags, and session replays for product analytics via MCP. Client support, permissions and authentication remain specific to the upstream project.

How do I install PostHog MCP with Claude Code?

The fastest way is the MCPizy CLI: run `mcpizy install posthog` and MCPizy will add the server to your `.claude.json` automatically. You can also install it manually by adding an entry under `mcpServers` in `.claude.json` with the command `claude mcp add --transport http posthog https://mcp.posthog.com/mcp` and restarting Claude Code.

Does MCPizy charge to view or install PostHog MCP?

No. Reading this profile and copying its install guidance is free. Upstream software, API, account or usage costs are separate, and licence coverage should be checked from the linked source when available.

Does PostHog MCP work with Cursor and Windsurf?

The MCP standard is supported by those clients, but a specific server can still have client-specific setup or transport limits. Use the configuration shown on this page when present and verify the upstream instructions before installation.

What can I do with PostHog MCP?

Its documented purpose is to let an MCP-compatible agent query PostHog events, feature flags, and session replays for product analytics via MCP. The exact tools, permissions and write capabilities depend on the server version and configuration shown by the upstream project.

Compare before you commit

Put this server beside an alternative, or return to the full evidence directory.

Compare MCP serversBack to directory