# Posthog [Health: Active]

**Category:** 👤 Customer Data Platforms  
**Repository:** https://github.com/pipeworx-io/mcp-posthog  
**GitHub Stars:** 0  
**npm Downloads (last month):** 263  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/posthog

## Description
PostHog MCP — wraps PostHog Analytics API (app.posthog.com/api)

## Tools
Capabilities this server exposes over MCP:

- **get_events** — Fetch recent events from a PostHog project. Returns event names, timestamps, and properties. Example: get_events({ project_id: "12345", limit: 50, _apiKey: "phx_..." })
- **get_persons** — Search for persons (users) in a PostHog project. Returns user profiles with properties. Example: get_persons({ project_id: "12345", search: "john@example.com", _apiKey: "phx_..." })
- **get_insights** — List saved insights (charts, trends, funnels) for a PostHog project. Returns insight names, types, and configurations. Example: get_insights({ project_id: "12345", _apiKey: "phx_..." })

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

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

## Documentation

## 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:

```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`:

```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.

_Full upstream README: https://allmcps.com/mcp/posthog/readme_

