PostHog MCP Integration
Connect PostHog to your AI agents through Weldable.
PostHog is an open-source product analytics platform that provides event tracking, session recording, feature flags, and A/B testing in a single tool. The PostHog MCP integration through Weldable gives AI agents the ability to query analytics data, check feature flag statuses, and pull experiment results using natural language. Connect your PostHog instance and let your agent surface product insights without building custom dashboards or writing HogQL queries.
Use cases
Query product usage metrics
Ask your AI agent how many users performed a specific action, such as completing onboarding or clicking a CTA, over the past week. The agent queries PostHog and returns the event counts, unique users, and trends so your product team can assess feature performance quickly.
Check feature flag status
Ask your agent which feature flags are currently active and what percentage of users are in each variant. The agent retrieves flag configurations from PostHog, which is useful for verifying rollout states during a release or debugging why a user is seeing a specific experience.
Review A/B test results
Tell your agent to pull the results of a running experiment, including conversion rates for each variant and statistical significance. The agent queries PostHog's experiment data and presents a summary so your team can decide whether to ship or iterate.
Analyze retention by cohort
Ask your agent to pull retention data for users who signed up during a specific period. The agent queries PostHog and returns a cohort retention table showing what percentage of users came back on day 1, day 7, and day 30. This helps your product team understand whether recent changes are improving long-term engagement or just driving initial signups.
How it works
Connect your PostHog instance to Weldable by providing your project API key and instance URL. Once connected, your AI agent handles requests like "how many users completed the signup flow this month" or "is the new checkout experiment statistically significant." Weldable translates these into PostHog API calls and returns the results.
Tips
Use event names as defined in your tracking plan. PostHog events are case-sensitive. Use the exact event names to ensure the agent queries the right data points.
Specify date ranges for all analytics queries. PostHog can store large volumes of event data. Including a time window keeps queries efficient and results relevant.
Combine with Slack for experiment updates. Schedule your agent to check A/B test results daily and post updates to a Slack channel so your team can monitor experiment progress without checking PostHog manually.
Use person properties for segmented analysis. PostHog supports custom properties on person profiles. Set properties like plan tier, company size, or signup source so your agent can break down analytics by these dimensions and give you more targeted insights.
Works well with
Connect your agent to PostHog
Connect your PostHog account and start automating with AI agents in minutes. Free to use, no credit card required.