PostHog MCP Server
概要
作者による説明(英語の原文)
Official PostHog MCP Server for product analytics, feature flags, experiments, and more.
PopNx MCPの3つの柱
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
- 利用者の声iレビューはまだありませんレビューは今後のステップで、アカウント機能と一緒に始まります
- 私たちの基本チェックi1項目中1項目に合格公開情報からチェック。コードはまだスキャンしていません
- 利用状況iとても新しい★ –
できること
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
- 接続方法: クラウドで動く
- トランスポート: Streamable HTTP, SSE
- カテゴリ: マーケティング・SNS
- 入力が必要なもの:Authorization
インストール
使っているAIアプリを選んで、設定をコピーしてください。
インストールの前に
- 基本チェック:1項目中1項目に合格
- 作者のサーバーで動きます。あなたが頼んだ内容は、作者のサーバーを通ります。
- 自分で入力するもの:
Authorization
「秘密」と表示された値は、あなたのアカウントの鍵です。絶対に人に教えたり、チャットに貼り付けたりしないでください。
必要なもの
- クラウドで動くインストール不要。インターネット経由でつながります
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
このアドレスはリクエストの header にキーが必要ですが、コネクタを追加するメニューでは設定できません。代わりにClaude Code、Cursor、VS Codeを使ってください。
ターミナルでこれを実行します
claude mcp add --transport http posthog https://mcp.posthog.com/mcp --header 'Authorization: Bearer {api_key}'動かす前に、空欄の値を入力してください。
または、設定を自分でコピーする
プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer {api_key}"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
または、設定を自分でコピーする
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"posthog": {
"type": "http",
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer {api_key}"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
このアドレスはリクエストの header にキーが必要ですが、コネクタを追加するメニューでは設定できません。代わりにClaude Code、Cursor、VS Codeを使ってください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
自分で入力する値
Authorization秘密 必須 HTTP headerBearer token with your PostHog personal API key. Create one at https://us.posthog.com/settings/user-api-keys with the 'MCP Server' preset.
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
できること
このサーバーのツール一覧はまだ読み取っていません。エンドポイントは順番にチェックしています。
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月9日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント PostHog で確認済みです
- … 未チェック
今もメンテナンスされている
このリポジトリはまだGitHubから読み取っていません
- … 未チェック
ライセンスがある
このリポジトリはまだGitHubから読み取っていません
- … 未チェック
エンドポイントが応答する
まだチェックしていません。エンドポイントは順番にチェックしています
- … 未チェック
OAuthでサインイン
まだチェックしていません。エンドポイントは順番にチェックしています
- … 未チェック
ツールの説明に隠れた指示がない
まだチェックしていません。エンドポイントをチェックするときにツール一覧を読み取ります
マーケティング・SNSのほかのサーバーとの比較i
- このカテゴリのほかの3690件のうち0%よりスターが多い
- このカテゴリのほかの3690件のうち1%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの3690件のうち100%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
PostHog MCP Serverは安全ですか?
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
入力が必要なもの:Authorization
パソコンで動きますか、それともクラウドですか?
作者のクラウドで動きます。インストール不要でインターネット経由でつながりますが、送った内容は作者のサーバーを通ります。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は–、最新バージョン(1.0.1)がレジストリに届いたのは10 か月前です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。URLでつながるので、リモートMCPサーバーに対応したアプリ(開発者モードのChatGPTなど)でも使えます。
代わりに使えるものは?
同じカテゴリには:MCP YouTube Transcript, Google Analytics MCP, BibiGPT YouTube Video Summarizer
代わりの候補
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
Google Analytics MCP
GA4 MCP server for AI agents: schema discovery, server-side aggregation, analysis-ready defaults.
BibiGPT YouTube Video Summarizer
AI video summarizer: summarize and transcribe YouTube, Bilibili, TikTok and podcast videos.
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
PostHog MCP
The official MCP server for PostHog. PostHog makes your product self-driving — it reads your data and ships changes with you, never without you — and this server gives MCP clients (Claude, Cursor, VS Code, Zed, and more) that full surface: analytics and SQL, dashboards, experiments, feature flags, surveys, session replay, error tracking, and more.
Documentation: https://posthog.com/docs/model-context-protocol
Use the MCP Server
Quick install
You can install the MCP server automatically into Cursor, Claude, Claude Code, VS Code and Zed by running the following command:
npx @posthog/wizard@latest mcp add
Manual install
- Obtain a personal API key using the MCP Server preset.
- Add the MCP configuration to your desktop client (e.g. Cursor, Windsurf, Claude Desktop) and add your personal API key
{
"mcpServers": { "posthog": { "command": "npx", "args": [ "-y", "mcp-remote@latest", "https://mcp.posthog.com/mcp", "--header", "Authorization:${POSTHOG_AUTH_HEADER}" ], "env": { "POSTHOG_AUTH_HEADER": "Bearer {INSERT_YOUR_PERSONAL_API_KEY_HERE}" } } } }
Minimal Node client (Streamable HTTP)
If you want to call MCP from Node (outside an IDE), use the Model Context Protocol SDK’s Streamable HTTP transport.
- Auth: Use a personal PostHog API key and pass it as a Bearer token in
Authorization. - Accept header: Clients must include
Accept: application/json, text/event-stream. - Lifecycle: MCP requires
initializethen a clientnotifications/initialized; the SDK performs this duringconnect().
// tools-list.mjs
import { Client } from '@modelcontextprotocol/sdk/client/index.js' import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js' import { ListToolsResultSchema } from '@modelcontextprotocol/sdk/types.js' import { mkdirSync, writeFileSync } from 'node:fs' import { join } from 'node:path' import { URL } from 'node:url'
const AUTH = process.env.POSTHOG_AUTH_HEADER // "Bearer phx_…" const MCP_URL = process.env.MCP_URL || 'https://mcp.posthog.com/mcp'
if (!AUTH?.startsWith('Bearer ')) { console.error('Set POSTHOG_AUTH_HEADER="Bearer phx_..."') process.exit(1) }
const transport = new StreamableHTTPClientTransport(new URL(MCP_URL), { requestInit: { headers: { Authorization: AUTH, // Required for Streamable HTTP (JSON + SSE) Accept: 'application/json, text/event-stream', }, }, serverInfo: { name: 'example-node-client', version: '0.0.1' }, })
const client = new Client({ name: 'example-node-client', version: '0.0.1' })
// Handles initialize + notifications/initialized await client.connect(transport)
const toolsResp = await client.request({ method: 'tools/list' }, ListToolsResultSchema) // { tools: [...] } const tools = toolsResp?.tools ?? [] console.log('Tools:', tools.length)
// (Optional) Save the full JSON-RPC envelope to a file (run from repo root) const envelope = { jsonrpc: '2.0', id: 'list-1', result: toolsResp } mkdirSync('reports', { recursive: true }) writeFileSync(join('reports', 'tools-list-http.json'), JSON.stringify(envelope, null, 2)) console.log('Saved: reports/tools-list-http.json')
await client.close()
Why these headers & steps?
- Streamable HTTP requires the
Acceptheader to include both JSON and SSE. - After
initialize, the client must sendnotifications/initialized; the SDK does this for you inconnect().
See also the main PostHog MCP docs for available tools and setup flows: https://posthog.com/docs/model-context-protocol
Example Prompts
Below are detailed examples showing realistic prompts and expected outputs:
Example 1: Feature flag management
Prompt: "Create a feature flag called 'new-checkout-flow' that's enabled for 20% of users, and show me the configuration"
What happens:
- The
create-feature-flagtool creates the flag with a 20% rollout - Returns the flag configuration including the key, rollout percentage, and targeting rules
Expected output:
Created feature flag 'new-checkout-flow':
- Key: new-checkout-flow
- Active: true
- Rollout: 20% of all users
- URL: https://us.posthog.com/project/ /feature_flags/12345
Example 2: Analytics query
Prompt: "How many unique users signed up in the last 7 days, broken down by day?"
What happens:
- The
query-trendstool executes a trends query filtering for$signupevents - Returns daily counts with unique user aggregation
Expected output:
Signups over the last 7 days:
| Date | Unique users |
|---|---|
| 2025-01-17 | 142 |
| 2025-01-18 | 156 |
| 2025-01-19 | 98 |
| ... | ... |
Total: 847 unique signups
Example 3: A/B test creation and monitoring
Prompt: "Create an A/B test for our pricing page that measures conversion to the checkout page"
What happens:
- The
experiment-createtool creates an experiment with control/test variants - Sets up a funnel metric: pricing page view → checkout page view
- Creates an associated feature flag for variant assignment
Expected output:
Created experiment 'Pricing page test':
- Feature flag: pricing-page-test
- Variants: control (50%), test (50%)
- Primary metric: Funnel conversion (pricing_page → checkout)
- Status: Draft (ready to launch)
- URL: https://us.posthog.com/project/ /experiments/789
Example 4: Error investigation
Prompt: "What are the top 5 errors in my project this week and how many users are affected?"
What happens:
- The
query-error-tracking-issues-listtool fetches error groups sorted by occurrence count - Returns error details including affected user counts
Expected output:
Top 5 errors this week:
- TypeError: Cannot read property 'id' of undefined
- Occurrences: 1,247
- Users affected: 89
- First seen: 2 days ago
- NetworkError: Failed to fetch
- Occurrences: 856
- Users affected: 234
- First seen: 5 days ago
...
Quick prompts
For simpler queries, you can use shorter prompts:
- "What feature flags do I have active?"
- "Show me my LLM costs this week"
- "List my dashboards"
- "What events are being tracked?"
Feature Filtering
You can limit which tools are available by adding query parameters to the MCP URL. If no features are specified, all tools are available. When features are specified, only tools matching those features are exposed.
https://mcp.posthog.com/mcp?features=flags,workspace,dashboards
Available features:
| Feature | Description |
|---|---|
actions | Actions |
alerts | Alerts |
annotations | Annotations |
batch_exports | Data pipelines |
business_knowledge | Business knowledge |
canvas | Canvas |
cohorts | Cohorts |
conversations | Conversations |
core | Core utilities (project switching, docs search) |
customer_analytics | Customer analytics |
dashboards | Dashboards |
data_catalog | Data catalog |
data_schema | Data schema exploration |
data_warehouse | Data warehouse |
debug | Debug and diagnostic tools |
docs | PostHog documentation search |
early_access_features | Early access features |
endpoints | Endpoints |
engineering_analytics | Engineering analytics |
error_tracking | Error tracking alerts |
events | Event and property definitions |
experiments | Experiments |
feedback | Send feedback to the PostHog team |
field_notes | Field notes |
flags | Feature flags |
health_issues | Health |
hog_function_templates | CDP function template browsing |
hog_functions | Functions |
insights | Run insight queries |
integrations | Integrations |
links | PostHog app URL generation |
llm_analytics | AI observability |
logs | Logs |
managed_migrations | Managed migrations |
marketing_analytics | Marketing analytics |
messaging | Messaging |
mcp_analytics | MCP analytics |
mcp_store | MCP Store |
| metrics | Metrics
冒頭だけを表示しています。続きはリポジトリで読めます