
Posthog Mcp Server
io.github.friendlygeorge由 GitHub 帳號 friendlygeorge 發布v1.0.0更新於 Oct 24, 2026
MCP server for PostHog — product analytics for AI assistants. Query events, persons, insights, da...
概覽
讓助理查詢 PostHog 產品分析資料,包括事件、使用者、洞察、儀表板、功能旗標、同群組與實驗。
- 可以做什麼
- 把 PostHog REST API(v1)包裝成 MCP 工具。讀取類工具有 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 與 get_project_info。助理可藉此取得事件與使用者資料、執行已儲存的洞察、查看某位使用者的功能旗標狀態,以及檢視實驗結果。
- 適用情境
- 適合想在對話中直接取得 PostHog 產品分析答案的情境,例如最近事件、活躍使用者、儀表板狀態、功能旗標推送比例、同群組人數或 A/B 測試結果,不必切換到 PostHog 介面。
- 執行需求
- 以 stdio 在本機執行,通常透過 npx posthog-mcp-server 啟動,因此需要 Node.js。需要 PostHog 個人 API 金鑰,放在 POSTHOG_API_KEY;可選 POSTHOG_HOST(預設 POSTHOG_PROJECT,若專案為空則須在每次呼叫時指定。需要能連線到 PostHog 執行個體的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Posthog Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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
來源:README.md,提交 fbae87e
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分