Query events, get insights, list feature flags, and check experiments via PostHog API.
60+ deploysclaude mcp add posthog --url https://datafaucet.dev/api/mcp/t/posthog
Run this command in your terminal · most users connect in under 60s
POST endpoints
run_hogql_query
Run a HogQL query against your PostHog data. Returns rows with column names. Supports SQL-like syntax over events, persons, and sessions.
https://{host}/api/projects/{project_id}/query/
GET endpoints
list_feature_flags
List all feature flags with name, key, active status, rollout percentage, and filters.
https://{host}/api/projects/{project_id}/feature_flags/
list_experiments
List A/B experiments with name, status, variants, start/end dates, and significance results.
https://{host}/api/projects/{project_id}/experiments/
list_insights
List saved insights (trends, funnels, retention). Returns name, filters, last refresh time, and result summaries.
https://{host}/api/projects/{project_id}/insights/?limit=20
list_annotations
List timeline annotations (deploy markers, incidents). Returns content, date, and scope.
https://{host}/api/projects/{project_id}/annotations/
list_cohorts
List user cohorts with name, count, filters, and whether they are static or dynamic.
https://{host}/api/projects/{project_id}/cohorts/
Run this in your terminal:
claude mcp add posthog https://datafaucet.dev/api/mcp/t/posthog
Connect PostHog Analytics to your AI agent in under 60 seconds. No account required.
{notion_token}) with your real credentialsNeed API keys? Try our free sandbox templates first to see MCP in action with zero setup.
Replace these placeholders with your real values before deploying:
{hogql}Your value{host}Your value{posthog_key}Your value{project_id}Resource identifierPreview:
POST https://{host}/api/projects/{project_id}/query/ Authorization: Bearer {posthog_key} Content-Type: application/json {"query":{"kind":"HogQLQuery","query":"{hogql}"}}
claude mcp add posthog --url https://datafaucet.dev/api/mcp/t/posthogWhat your AI agent sees
I have access to 6 tools from PostHog Analytics: run_hogql_query, list_feature_flags, list_experiments, and 3 more.
“Run a HogQL query against your PostHog data. Returns rows with column names. Supports SQL-like syntax over events, persons, and sessions.”
Calling run_hogql_query... Done. Here are the results.
Try these prompts
“Show me which feature flags are currently active and their rollout percentages”
Copy“Query pageview events from the last 7 days grouped by path”
Copy“List all running experiments and tell me which ones have reached significance”
CopyClick any prompt to copy, then paste into your AI client.