Posthog logo

Posthog

Access PostHog events, user profiles, and saved insights through MCP tools.

Install Posthog

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-posthog"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio posthog -- npx -y @pipeworx/mcp-posthog

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Automated check passed— started and listed 3 tools correctly ().

Overview

Posthog MCP server exposes selected PostHog Analytics API operations through MCP. It can retrieve recent project events, search person profiles, and list saved insights including charts, trends, and funnels. Connect through the hosted Pipeworx streamable-HTTP endpoint or run the npm package as a local stdio bridge. Reach for it when an agent needs read access to PostHog project data without building separate API-call logic.

Use cases

  • Inspect recent events in a PostHog project
  • Search user profiles by email or other identifiers
  • Review saved charts, trends, and funnels
  • Ask an agent to route PostHog questions through Pipeworx

Key features

  • Fetches recent PostHog events
  • Searches PostHog person profiles
  • Lists saved insights and configurations
  • Supports hosted MCP over HTTPS
  • Provides a local npm stdio bridge
  • Offers optional Pipeworx gateway meta-tools

Tools3

What Posthog lets your agent do. Expand a tool for its parameters.

Verified live~454 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 67d

What it can do

From the 3 tools this server returned when we ran it; 3 declare their own safety hints.

Makes network requests · 3Read-only tools · 3
Network at startup4 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age41 days
Maintainers1

Observed 2026-11-04 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · @pipeworx/mcp-posthog (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads263Package downloads in the last 30 days.
Last commit18d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed3Callable tools this server registers over MCP.

How Posthog works

What Posthog does

Posthog provides MCP access to three PostHog Analytics API operations. The get_events tool retrieves recent events from a project, including event names, timestamps, and properties. get_persons searches project users and returns matching profiles with their properties. get_insights lists saved PostHog insights and includes their names, types, and configurations.

The integration is intended for read-oriented analysis of PostHog data. It connects to PostHog through the Pipeworx gateway and is an independent, unofficial integration rather than an upstream PostHog product.

How it works

A hosted MCP connection can use https://gateway.pipeworx.io/posthog/mcp. The endpoint exposes the Posthog-specific tools and also includes shared Pipeworx gateway tools. These shared tools include ask_pipeworx, which can route natural-language questions across the wider Pipeworx catalog, as well as discovery, search, and memory tools. The connection's initialization response defines the exact tools available at connection time.

The full gateway is available at https://gateway.pipeworx.io/mcp when an agent should work with all Pipeworx data sources directly. Both endpoints use the same gateway; the difference is which pack's tools are listed directly.

A local npm option runs @pipeworx/mcp-posthog through npx and forwards requests to the hosted Posthog endpoint. It requires network access and has no offline mode. The gateway also exposes HTTP methods for inspecting and calling tools without an MCP client.

Setup and configuration

For a hosted connection, add the following server URL to an MCP client:

config.json
{
  "mcpServers": {
    "posthog": {
      "url": "https://gateway.pipeworx.io/posthog/mcp"
    }
  }
}

The PostHog tools accept the project's identifier and the PostHog API key as a _apiKey argument. The key is supplied per tool call, as shown by the tool examples.

For local stdio use, configure the package with npx:

config.json
{
  "mcpServers": {
    "posthog": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-posthog"]
    }
  }
}

Unauthenticated local calls are limited to 50 per day. Setting PIPEWORX_API_KEY raises the allowance to 200 calls per day for a free Pipeworx account. Set PIPEWORX_META_TOOLS=1 if the local process should also list the shared gateway tools. When using an HTTPS proxy, newer Node.js versions can honor proxy environment settings with NODE_USE_ENV_PROXY=1.

Tools and capabilities

  • get_events: fetch recent events for a PostHog project, with an optional result limit.
  • get_persons: search project users, including searches such as an email address.
  • get_insights: list saved charts, trends, and funnels with their configurations.
  • ask_pipeworx: available through the gateway's shared tools for natural-language routing across the catalog.

Limitations and notes

The npm bridge depends on network access. PostHog API credentials are supplied by the caller rather than provided by the gateway. Pack endpoints include shared Pipeworx meta-tools in addition to the pack-specific tools, while the local package lists only the Posthog tools unless PIPEWORX_META_TOOLS is enabled. The project is licensed under MIT.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Posthog

Posthog is an MCP server that connects AI agents to the PostHog Analytics API through the Pipeworx gateway. Its main tools are `get_events` for recent events, `get_persons` for user profiles, and `get_insights` for saved charts, trends, funnels, and their configurations. It supports hosted MCP and local npm stdio connections.

Run `npx -y @pipeworx/mcp-posthog` from an MCP client's stdio configuration. The package forwards calls to the hosted Pipeworx endpoint, so it needs network access. Alternatively, configure the hosted URL `https://gateway.pipeworx.io/posthog/mcp` directly.

PostHog API calls use a `_apiKey` argument containing your PostHog API key. The local Pipeworx bridge does not require a Pipeworx key to run, but unauthenticated use is capped at 50 calls per day; `PIPEWORX_API_KEY` raises the allowance to 200 calls per day for a free account.

Yes. Cursor is named as a supported MCP client in the setup examples. Configure Cursor with either the hosted Posthog endpoint or the local `npx` stdio command.

Set `PIPEWORX_META_TOOLS=1` in the local stdio server configuration. This adds shared tools such as `ask_pipeworx` to the Posthog pack's directly listed tools; hosted pack endpoints include those shared tools by default.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPosthog AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/posthog?style=directory)](https://allmcps.com/mcp/posthog)
HTML Embed
<a href="https://allmcps.com/mcp/posthog"><img src="https://allmcps.com/api/badge/posthog?style=directory" alt="Posthog on AllMCPs" /></a>