
Posthog Mcp Server
io.github.friendlygeorgePublished by GitHub account friendlygeorgev1.0.0Updated Oct 24, 2026
MCP server for PostHog — product analytics for AI assistants. Query events, persons, insights, da...
Overview
Lets an assistant query PostHog product analytics — events, persons, insights, dashboards, feature flags, cohorts, and experiments.
- What you can do
- Wraps the PostHog REST API (v1) as MCP tools. Read-oriented tools include list_events, get_person, list_persons, list_dashboards, get_dashboard, execute_insight, list_feature_flags, evaluate_feature_flag, list_cohorts, list_experiments, get_experiment, list_actions, and get_project_info. It lets an assistant pull event and person data, run saved insights, check flag state for a user, and inspect experiment results.
- When to use it
- Useful when you want an assistant to answer product-analytics questions from PostHog in chat, such as recent events, active users, dashboard status, feature-flag rollout, cohort sizes, or A/B test results, without switching to the PostHog UI.
- Requirements
- Runs locally over stdio, typically via npx posthog-mcp-server, so Node.js is needed. Requires a PostHog personal API key in POSTHOG_API_KEY, and optionally POSTHOG_HOST (default and POSTHOG_PROJECT; if the project is empty it must be given per call. Network access to the PostHog instance is required.
Installation
In SourceWeft
- Open Posthog Mcp Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
PostHog MCP Server
Connect AI assistants to PostHog — query events, persons, insights, dashboards, feature flags, cohorts, and experiments through the Model Context Protocol.
Works with Claude Desktop, Cursor, Windsurf, Cline, Continue, and any MCP-compatible client.
Features
Quick Start
1. Get a PostHog API Key
Go to PostHog → Settings → Personal API Keys and create a key with read access.
Or visit: https://your-instance.posthog.com/settings/user-api-keys
2. Configure your MCP client
Claude Desktop — add to claude_desktop_config.json:
Cursor — add to MCP settings (.cursor/mcp.json):
3. Run manually (for testing)
Environment Variables
Self-hosted PostHog
If you run PostHog on your own infrastructure, set POSTHOG_HOST to your instance URL:
Example Queries
Once configured, ask your AI assistant:
- "Show me the last 20 pageview events"
- "Who are the most active users this week?"
- "What's the status of our signup conversion experiment?"
- "Is the new-checkout-flow feature flag enabled for user abc123?"
- "Show me all active dashboards"
- "Execute insight 42 and show me the trend"
- "List all feature flags that are currently active"
- "How many people are in the 'Power Users' cohort?"
API Reference
This server wraps the PostHog REST API (v1). Full documentation:
- PostHog API docs: https://posthog.com/docs/api
- MCP protocol: https://modelcontextprotocol.io
- PostHog: https://posthog.com
Development
License
MIT © Nova
Source: README.md at commit fbae87e
Tools
0Version history
1- v1.0.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts