developer-toolsoauth2

PostHog MCP

Analyze PostHog product data, feature flags, experiments, and error tracking.

Verdict

PostHog MCP connects your product analytics workspace to Switchy, letting teams query user behavior data, feature flags, and experiment results without leaving the conversation. Product managers can pull funnel metrics mid-discussion, engineers can check flag rollout status during incident triage, and designers can validate feature adoption before the next sprint. Because PostHog hosts both analytics and experimentation, this integration consolidates what usually requires three separate dashboards. OAuth setup takes two minutes, but you'll need admin access to grant read permissions across projects.

Common use cases

  • Pull funnel conversion rates during standups
  • Check feature flag rollout before deployment
  • Compare A/B test results across cohorts
  • Audit user retention trends for roadmap planning
  • Validate experiment significance mid-sprint

Integration

Vendor
PostHog MCP
Category
developer-tools
Auth
OAUTH2
Composio slug
posthog_mcp

Tools

Per-tool listings haven't synced yet for PostHog MCP. The connection itself works - your Project can already @-mention it. Tool descriptions will fill in on the next Composio ingest.

Setup

Setup guide

  1. 11. In Switchy, open your workspace settings and navigate to the Integrations tab. 2. Find PostHog MCP in the developer tools section and click Connect. 3. You'll redirect to PostHog's OAuth consent screen—sign in with an account that has project read access. 4. Grant permissions for insights, feature flags, experiments, and persons data (PostHog groups these under 'Analytics Read' scope). 5. After authorization, Switchy redirects you back and displays a green checkmark next to PostHog MCP. 6. Open any Project, type '@PostHog' in the chat, and ask it to summarize active feature flags or pull conversion data for a specific funnel—if it responds with structured data, the connection works. 7. If you see an auth error, return to Integrations and verify your PostHog account has access to the projects you're querying.

What teammates see: by default, memories from PostHog MCP are scoped to the Project (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.

Works well with

Top models

Compatibility data appears once enough Projects have used this MCP together with a given model.

How Switchy teams use it

Not enough Projects yet to publish anonymised usage stats (we require ≥ 50 Projects per week).

Starter prompts

Flag Rollout Status

@PostHog list all active feature flags in the production project and show their current rollout percentages.

Funnel Conversion Summary

@PostHog show me the conversion funnel for signup to first purchase over the last 30 days, broken down by step.

Experiment Results Check

@PostHog get the latest results for the checkout redesign experiment, including conversion lift and confidence interval.

Retention Cohort Analysis

@PostHog pull 7-day retention data for users who signed up in the last month, grouped by acquisition channel.

Event Volume Audit

@PostHog how many 'video_played' events were tracked yesterday, and compare that to the weekly average.

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

@PostHog show me the top 5 feature flags currently active in production and their rollout percentages

Output

Based on your PostHog project, here are the active feature flags: `new-checkout-flow` (85% rollout, targeting users with >3 orders), `dark-mode-toggle` (100% rollout, all users), `experimental-search` (20% rollout, beta group only), `mobile-nav-redesign` (50% rollout, A/B test in progress), and `premium-upsell-banner` (10% rollout, high-value segment). The checkout flow flag shows the highest engagement delta at +12% conversion in the exposed cohort.

Notes

This example demonstrates read access to feature flag configuration and basic analytics. Requires OAuth scope for feature flags and insights. The percentages and targeting rules reflect your current PostHog setup — results will differ based on your account's active experiments.

Prompt

@PostHog create a new feature flag called 'ai-suggestions' rolled out to 5% of users in the 'early-adopters' group

Output

Feature flag `ai-suggestions` created successfully. Rollout configuration: 5% of users matching the `early-adopters` group property. Flag is now live in your production environment. You can monitor adoption at posthog.com/feature_flags/ai-suggestions. Note: changes take effect immediately for new sessions; existing sessions may require a refresh to evaluate the new flag.

Notes

This write operation creates a flag with targeting rules. Be aware that flags go live instantly — test in a staging environment first if your app doesn't gracefully handle undefined flags. Requires write permissions on feature flags. The MCP cannot roll back flags automatically if issues arise.

Prompt

@PostHog analyze the last 7 days of 'checkout_completed' events and tell me which user properties correlate with higher conversion

Output

Analyzing 3,847 `checkout_completed` events from the past week: users with `account_age > 30 days` convert 2.3x more often than new users. The `mobile_app` property shows 18% higher conversion than web. Users who triggered `product_view` events 5+ times before checkout have a 34% higher average order value. Geographically, US and UK users account for 68% of conversions but only 52% of sessions, indicating above-average intent.

Notes

This synthesis example pairs PostHog's event data with AI reasoning to surface patterns. The analysis is illustrative — actual correlations depend on your event volume and property schema. Large date ranges or high-cardinality properties may hit API rate limits. Use this for hypothesis generation, not statistical certainty.

Use-case deep-dives

Feature flag rollout coordination

When PostHog MCP speeds up flag decisions in Slack

A 6-person eng team ships features behind flags and needs to check adoption before flipping them to 100%. The PostHog MCP lets anyone in the Switchy workspace query flag status, user counts, and error rates without leaving the conversation. The OAuth2 flow means each person authenticates once and the team shares a single workspace view. This works when your feature set is under 30 active flags and you're checking metrics a few times per sprint. If you're running 100+ flags or need sub-hour latency on metric updates, you'll hit rate limits or stale data. For small teams doing weekly flag reviews in standup, this MCP turns a 5-minute context-switch into a 30-second inline query.

Customer support funnel diagnosis

PostHog MCP for support teams triaging drop-off

A 3-person support team sees a spike in checkout abandonment tickets and needs to confirm whether it's a product bug or a payment gateway issue. The PostHog MCP pulls funnel data and session replays directly into the Switchy thread where the ticket is being discussed. OAuth2 means the support lead grants access once and the whole team can query without sharing API keys. This scenario wins when you're triaging 10-20 incidents per week and your funnel has fewer than 8 steps. If your product has dozens of parallel funnels or you need to correlate events across multiple tools, the MCP's single-source view becomes a bottleneck. For small support teams doing root-cause analysis in real time, this MCP collapses the investigation loop.

Product experiment readout in retros

When PostHog MCP fits weekly experiment reviews

A 5-person product team runs A/B tests on onboarding flows and reviews results every Friday retro. The PostHog MCP lets the PM pull experiment stats, significance levels, and variant breakdowns into the retro thread without opening the PostHog UI. OAuth2 keeps access scoped to the workspace, so the designer and engineers see the same data without credential handoffs. This works when you're running 2-4 concurrent experiments and your sample sizes hit significance within a week. If you're running 20+ tests or need Bayesian priors and custom cohorts, the MCP's generic query interface won't expose the depth you need. For teams doing lightweight experiment reviews in a shared doc, this MCP turns dashboard screenshots into live data.

Frequently asked

What does the PostHog MCP do in Switchy?

It connects your PostHog analytics account to Switchy so your team can query product metrics, user behavior data, and feature flags directly in AI conversations. Instead of switching to the PostHog dashboard, you ask questions about conversion funnels, session replays, or experiment results and get answers inline. Useful for product managers and engineers who need analytics context during planning or debugging.

Do I need admin access to connect PostHog via OAuth?

You need a PostHog account with API access, which typically means member-level permissions or higher. The OAuth flow requests read access to your projects, events, and feature flags. If your PostHog instance has strict access controls, check with your admin about API token policies. Personal API keys work too if your team prefers that over OAuth.

Can the PostHog MCP write data or only read it?

This integration focuses on reading analytics data — querying events, viewing dashboards, checking feature flag states. It won't create new events, modify experiments, or change feature flag rollouts. If you need to instrument new tracking or toggle flags, use PostHog's SDK or dashboard directly. The MCP is for pulling insights, not pushing changes.

How does this compare to just opening PostHog in a browser tab?

The MCP lets you ask natural language questions about your data without learning PostHog's query syntax or navigating multiple dashboard views. You get answers in context during Switchy conversations instead of context-switching to another tool. Trade-off: complex custom queries or visual charts still work better in PostHog's native interface. Use the MCP for quick checks, the dashboard for deep dives.

Who on the team should connect the PostHog integration?

Whoever owns your PostHog account and understands which projects contain relevant data. Usually a product manager, engineering lead, or data analyst. Once connected, anyone in your Switchy workspace can query the data through AI conversations. The connection itself doesn't count against PostHog's event limits — it just reads existing data.

More developer tools MCPs

See all developer tools MCPs →

Data last verified 61 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.