> ## Documentation Index
> Fetch the complete documentation index at: https://docs.caylex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Posthog

> Integrate AI with PostHog for seamless analytics

The PostHog MCP Server connects AI agents to PostHog's product analytics platform, enabling programmatic interaction with PostHog projects directly from within Caylex. Agents can create and manage feature flags, query analytics insights and dashboards, explore error tracking data, run SQL queries against PostHog data, and access project resources for streamlined setup and debugging. This makes it possible to automate common PostHog workflows — such as rolling out features, investigating product issues, or pulling usage metrics — without leaving the AI agent environment. The server is built on PostHog's official API and supports both cloud and self-hosted PostHog instances.

<Warning>
  **Prerequisites:**

  * A PostHog account (cloud or self-hosted) with at least one project created.
  * A PostHog Personal API key with read/write permissions for the project resources you intend to manage.
</Warning>

<Note>
  **Important API details:**

  * The official PostHog MCP repository has been archived (as of January 2026); users should verify which version of the server is active in the Caylex catalog and consult PostHog's current API documentation for the latest capabilities.
  * A valid PostHog Personal API key with appropriate project-level permissions is required to authenticate and invoke tools.
  * Operations such as creating feature flags and querying insights are scoped to a specific PostHog project; ensure the API key has access to the intended project.
</Note>

## Server Details

| Property        | Value                                                      |
| --------------- | ---------------------------------------------------------- |
| **Transport**   | Streamable HTTP                                            |
| **Server Type** | External                                                   |
| **Endpoint**    | [https://mcp.posthog.com/mcp](https://mcp.posthog.com/mcp) |
| **Categories**  | Business Intelligence, Analytics & Data                    |

## Authentication

This server supports the following authentication method:

### Header Authentication

This server authenticates via HTTP headers. During the server onboarding flow, you will be prompted to confirm the required headers. Note that you do not provide the values for the headers during the server on-boarding.
Header values are provided by the users during the [Auth Link](/auth/auth-links) flow.

## Getting Started

<Steps>
  <Step title="Add the server">
    Navigate to the **Server Library** and click on the **New Server** button. Find **Posthog** in the Caylex Catalog.
  </Step>

  <Step title="Server Onboarding flow">
    Go through the server onboarding flow.
  </Step>

  <Step title="Use in a project">
    Add the server to a [project](https://app.caylex.dev/projects) by configuring project connections. Its tools are now available to any agents connected to that project.
  </Step>
</Steps>

## Related Servers

<CardGroup cols={2}>
  <Card title="Datadog" href="/server-catalog/datadog" icon="https://d338mlbnszozgc.cloudfront.net/logos/datadog.svg" />

  <Card title="BetterStack" href="/server-catalog/betterstack" icon="https://d338mlbnszozgc.cloudfront.net/logos/betterstack.svg" />

  <Card title="Sentry" href="/server-catalog/sentry" icon="https://d338mlbnszozgc.cloudfront.net/logos/sentry.svg" />
</CardGroup>

## References

<CardGroup cols={1}>
  <Card title="https://posthog.com/docs/model-context-protocol" href="https://posthog.com/docs/model-context-protocol" icon="arrow-up-right-from-square" />

  <Card title="https://github.com/PostHog/mcp" href="https://github.com/PostHog/mcp" icon="arrow-up-right-from-square" />
</CardGroup>
