posthog-mcp
Provides tools for interacting with PostHog's product analytics API, including listing projects, querying events and insights (trends, funnels, retention), managing feature flags, and creating annotations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@posthog-mcpList my PostHog projects"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PostHog MCP Server
Type 3 DAuth MCP server for the PostHog product analytics API.
Tools
Tool | Description |
| List all projects in the organization |
| Query events with optional filters |
| Query TRENDS, FUNNELS, or RETENTION insights |
| List all feature flags |
| Get a specific feature flag by ID |
| Create a graph annotation |
Related MCP server: posthog-mcp
Auth Setup
Go to PostHog → Settings → Personal API Keys
Create a key with project read access
Copy the key (starts with
phc_)
Environment Variables
POSTHOG_API_KEY=phc_your_key_here # Required Credential (DAuth)Deploy
pip install -e .
python src/main.pyUsage
result = await runner.run(
input="List my PostHog projects",
mcp_servers=["JiayuWang/posthog-mcp"],
)Safety Notes
create_annotationwrites to PostHog but is non-destructiveAll other tools are read-only
This server cannot be deployed
Maintenance
Related MCP Connectors
PostHog MCP — wraps PostHog Analytics API (app.posthog.com/api)
Create projects and read their web analytics: views, referrers, countries, custom events.
Query site stats, realtime visitors, breakdowns and goals from Plausible Analytics.
Query Mixpanel events, funnels, retention, segmentation and insights (JQL).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Posthog through a standardized MCP interface, providing access to Posthog's tools and services for analytics and product management.MIT
- AlicenseBqualityDmaintenanceEnables interaction with PostHog analytics platform, allowing users to list projects, create annotations, and search insights through natural language in Claude Desktop.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables interaction with PostHog's product analytics platform through natural language, allowing users to manage feature flags, view errors, and access other platform features.1MIT
- AlicenseBqualityDmaintenanceEnables AI agents to query PostHog analytics data directly via tool calls, including insights, events, feature flags, trends, and persons.5MIT