# PostHog MCP

> PostHog MCP connects your AI client directly to your product analytics data. List saved insights, track specific users, check feature flag status, and audit recent events using natural conversation. Get full control of your user behavior metrics without leaving your agent.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** product-analytics, feature-flags, user-behavior, event-tracking, funnel-analysis, retention-metrics

## Description

This MCP lets you take over your product analytics from right inside your development workflow. Forget switching tabs or writing SQL queries just to answer a simple question about user adoption. You can talk to your AI client and get real-time data on how people use your app.

Need to know if the new checkout flow is working? Ask it. Want to check which feature flags are currently active? Just ask. This connector handles everything, giving you instant access to trends, funnels, and user property details. When you connect this MCP via Vinkius, your AI agent treats your product data like a native API endpoint—it's just part of the conversation. You can audit recent activity logs or pull detailed metadata on any saved insight instantly.

## Tools

### get_event
Pulls detailed information for one specific user action (event).

### get_insight
Retrieves the full details of a single saved analysis insight.

### get_person
Gets all known properties and data for one specific identified user.

### list_actions
Lists every defined custom action that users can take in the product.

### list_dashboards
Shows a list of all existing dashboards within your PostHog project.

### list_events
Retrieves a list of the most recent user events captured by the system.

### list_experiments
Shows all active and previously run product experiments.

### list_feature_flags
Lists every feature flag configured for your project.

### list_insights
Retrieves a list of all saved analytic insights available in the project.

### list_persons
Lists all identified users or persons tracked by PostHog.

## Prompt Examples

**Prompt:** 
```
List all saved insights in our PostHog project.
```

**Response:** 
```
I've retrieved 12 saved insights. Some of the most recent ones are 'Daily Active Users', 'Signup Funnel', and 'Feature Adoption Trend'.
```

**Prompt:** 
```
Check the status of all feature flags.
```

**Response:** 
```
You have 8 feature flags. 5 are currently active (e.g., 'new-onboarding-flow', 'beta-search') and 3 are disabled.
```

**Prompt:** 
```
List the last 5 persons identified in our project.
```

**Response:** 
```
I've fetched the latest identified users. Here are the 5 most recent persons, including their distinct IDs and key properties like email and signup date.
```

## Capabilities

### Analyze user flow and trends
Retrieve deep details for specific insights, like conversion funnels or retention charts.

### Review individual user activity
Get a complete profile on any identified person, seeing all their properties and behavior data.

### Manage feature flag status
List every defined feature flag and confirm whether it's currently active or disabled.

### Track product improvements
Check the status of all experiments, both running and completed, to measure impact.

### Audit recent user actions
List the most recent events captured by your project, verifying data ingestion or specific user steps.

## Use Cases

### Debugging a broken signup funnel
A growth engineer needs to know why signups dropped last night. They ask their agent to list insights, focusing on funnels. The agent retrieves the 'Signup Funnel' insight and reports that retention charts show a drop-off at step 3.

### Auditing data ingestion after an outage
A data analyst suspects event logging failed. They ask their agent to list recent project events. The MCP quickly returns the last 50 actions, allowing them to verify that user activity resumed correctly.

### Checking feature rollout status for a release
A product manager needs confirmation before launch. They ask their agent to list feature flags and confirm that 'beta-search' is active only for the QA team, not general users.

### Investigating a high-value user's behavior
A PM wants to understand why one specific enterprise client (a person ID) is using the product differently. They ask their agent to get details for that person, retrieving all associated properties and historical data points.

## Benefits

- Stop writing repetitive queries. You can ask your agent to list insights and get detailed metadata (like funnels or trends) instantly.
- No more manual lookups for users. Simply request details on a specific person, and the MCP provides their full profile, including key properties.
- Manage product rollouts without context switching. Check the status of all feature flags directly by asking to list them, confirming if 'new-onboarding' is live or disabled.
- Verify data integrity immediately. Use the tool to list recent project events and confirm that user actions are logging correctly.
- Understand your testing efforts better. The MCP lets you list experiments so you can track product improvements and results without leaving your workflow.

## How It Works

The bottom line is you talk to your agent, and it pulls specific analytics directly from your PostHog project.

1. Subscribe to this MCP and input your PostHog Personal API Key and Project ID.
2. If needed, provide the PostHog Host URL for regional instances (like EU).
3. Your AI client can now analyze product data conversationally—just ask it a question.

## Frequently Asked Questions

**Where do I find my Project ID?**
You can find your Project ID in PostHog under **Project Settings**. It is a numeric ID usually found at the top of the settings page.

**Does this support PostHog EU instances?**
Yes! Use the optional `POSTHOG_HOST` credential and set it to `https://eu.posthog.com`. By default, it uses the US host (`https://app.posthog.com`).

**Can I see individual user properties?**
Absolutely. Use the `get_person` tool with a Person ID to retrieve all properties, tags, and identification metadata for a specific user.