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 "Install 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: Google Analytics MCP Server
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JiayuuWang/posthog-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server