# PromptRails + PostHog Integration

Source: https://0.0.0.0:8080/integrations/posthog

---

[All Integrations](/integrations)

![PostHog](/images/logos/posthog.svg)

# PostHog

Developer Tools

Access product analytics, events, and feature flags with PostHog. Your agents can run HogQL queries, list events and persons, and manage feature flags.

## How to Connect

1.  1Go to the MCP Templates marketplace.
2.  2Find the PostHog template.
3.  3Enter your PostHog API key and project ID.
4.  4Add the template to your agent.

## Available Tools

`posthog_query`

Run HogQL query

`posthog_list_events`

List recent events

`posthog_get_event`

Get event details

`posthog_list_persons`

List persons/users

`posthog_list_feature_flags`

List feature flags

[Documentation](/docs/mcp-tools)[PostHog API Reference](https://posthog.com/docs/api)

[Get Started](https://app.promptrails.ai)
