Product analytics platform
## PostHog MCP Server: Product Analytics Suite The **PostHog MCP Server** integrates PostHog's open-source product analytics into Google Antigravity. This enables product analytics, session recordings, feature flags, and A/B testing in one platform. ### Why PostHog MCP? PostHog is the all-in-one product toolkit: - **Open Source**: Self-host for free - **All-in-One**: Analytics, replay, flags, experiments - **Autocapture**: No manual tracking needed - **EU Hosting**: GDPR-compliant options - **Generous Free Tier**: 1M events/month free ### Key Features #### 1. Capture Events ```python from posthog import Posthog posthog = Posthog("your-api-key", host="https://app.posthog.com") posthog.capture( "user-123", "feature_used", {"feature": "export", "format": "csv"} ) posthog.identify("user-123", {"email": "user@example.com", "plan": "pro"}) ``` #### 2. Feature Flags ```python # Check feature flag is_enabled = posthog.is_feature_enabled("new-checkout", "user-123") if is_enabled: show_new_checkout() else: show_old_checkout() # Get flag payload payload = posthog.get_feature_flag_payload("pricing-test", "user-123") ``` #### 3. Query Insights ```python import requests headers = {"Authorization": f"Bearer {api_key}"} response = requests.post( "https://app.posthog.com/api/projects/{project_id}/insights", headers=headers, json={ "events": [{"id": "pageview"}], "date_from": "-7d", "insight": "TRENDS" } ) ``` ### Configuration ```json { "mcpServers": { "posthog": { "command": "npx", "args": ["-y", "@anthropic/mcp-posthog"], "env": { "POSTHOG_API_KEY": "phc_xxx", "POSTHOG_HOST": "https://app.posthog.com" } } } } ``` ### Use Cases **Product Analytics**: Understand user behavior. **Feature Flags**: Safe feature rollouts. **Experimentation**: A/B testing built-in. The PostHog MCP Server brings open-source product analytics to Antigravity.
{
"mcpServers": {
"posthog": {
"mcpServers": {
"posthog": {
"env": {
"POSTHOG_HOST": "https://app.posthog.com",
"POSTHOG_API_KEY": "YOUR_API_KEY"
},
"args": [
"-y",
"posthog-mcp"
],
"command": "npx"
}
}
}
}
}