PostHog Analytics MCP リモートMCPサーバー – 公式URL・MCP接続設定・ツール一覧
PostHog Analytics MCP は PostHog が提供するリモートMCPサーバー(公式運営、カテゴリ:開発者ツール・Git・クラウド・インフラ・DevOps)です。エンドポイント https://mcp.posthog.com/mcp を通じて、AIエージェントが直接呼び出せる 39 個の構造化ツールを提供します。
このページでは、公式リモートエンドポイント、トランスポート、認証方式、全ツールスキーマ、リアルタイムの死活監視・セキュリティ監査結果を掲載し、Cursor・Claude Code・VS Code・ChatGPT など 10 のクライアントへのMCP接続手順を解説します。
🔒 Client-side only — never leaves your browser.
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}claude mcp add --transport http posthog https://mcp.posthog.com/mcp
With credential header:
claude mcp add --transport http posthog https://mcp.posthog.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
Or add to .vscode/mcp.json:
{
"servers": {
"posthog": {
"type": "http",
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}- Open Settings → Connectors (Integrations) → Add Custom Connector.
- Paste the endpoint URL:
https://mcp.posthog.com/mcp - Provide your API key / Bearer token when prompted.
Bridge the remote endpoint into stdio with mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.posthog.com/mcp",
"--header",
"Authorization: Bearer YOUR_API_KEY"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"posthog": {
"serverUrl": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace), then reopen Kiro's Agent panel to pick up the server:
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.codex/config.toml — Codex reads remote HTTP servers from [mcp_servers.*] tables:
[mcp_servers.posthog] url = "https://mcp.posthog.com/mcp" bearer_token_env_var = "POSTHOG_TOKEN"
Add to cline_mcp_settings.json (Cline → MCP Servers → Configure), or paste it via Cline's MCP marketplace file:
{
"mcpServers": {
"posthog": {
"type": "streamableHttp",
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:
{
"mcpServers": {
"posthog": {
"httpUrl": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}🧰 PostHog Analytics のMCPツールとスキーマ(39)
| Tool | Safety | Description | Parameters |
|---|---|---|---|
| organizations-get ~30 tok | 🟢 Read | List PostHog organizations. | — |
| projects-get ~28 tok | 🟢 Read | List PostHog projects. | — |
| project-get ~30 tok | 🟢 Read | Get details of a PostHog project. | — |
| project-property-definitions ~36 tok | 🟢 Read | List property definitions of a project. | — |
| docs-search ~29 tok | 🟢 Read | Search PostHog documentation. | — |
| query-run ~31 tok | 🟢 Read | Run a HogQL query against project data. | — |
| list-errors ~32 tok | 🟢 Read | List captured error-tracking exceptions. | — |
| error-details ~33 tok | 🟢 Read | Get details of an error-tracking exception. | — |
| dashboards-get-all ~30 tok | 🟢 Read | List PostHog dashboards. | — |
| dashboard-get ~29 tok | 🟢 Read | Get details of a dashboard. | — |
| dashboard-create ~30 tok | 🟠 Write | Create a PostHog dashboard. | — |
| dashboard-update ~28 tok | 🟠 Write | Update a dashboard. | — |
| dashboard-delete ~28 tok | 🔴 Destructive | Delete a dashboard. | — |
| dashboard-reorder-tiles ~31 tok | 🟠 Write | Reorder dashboard tiles. | — |
| insights-get-all ~29 tok | 🟢 Read | List PostHog insights. | — |
| insight-get ~29 tok | 🟢 Read | Get details of an insight. | — |
| insight-create-from-query ~33 tok | 🟠 Write | Create an insight from a query. | — |
| insight-update ~30 tok | 🟠 Write | Update an existing insight. | — |
| insight-delete ~27 tok | 🔴 Destructive | Delete an insight. | — |
| insight-query ~32 tok | 🟢 Read | Run an insight query and get results. | — |
| experiments-get-all ~31 tok | 🟢 Read | List A/B test experiments. | — |
| experiment-get ~30 tok | 🟢 Read | Get details of an experiment. | — |
| experiment-create ~29 tok | 🟠 Write | Create an experiment. | — |
| experiment-update ~29 tok | 🟠 Write | Update an experiment. | — |
| experiment-delete ~29 tok | 🔴 Destructive | Delete an experiment. | — |
| experiment-results-get ~35 tok | 🟢 Read | Get statistical results of an experiment. | — |
| feature-flag-get-all ~29 tok | 🟢 Read | List feature flags. | — |
| feature-flag-get-definition ~34 tok | 🟢 Read | Get a feature flag definition. | — |
| feature-flag-create ~30 tok | 🟠 Write | Create a feature flag. | — |
| feature-flag-update ~30 tok | 🟠 Write | Update a feature flag. | — |
| feature-flag-delete ~30 tok | 🔴 Destructive | Delete a feature flag. | — |
| surveys-get-all ~28 tok | 🟢 Read | List PostHog surveys. | — |
| survey-create ~27 tok | 🟠 Write | Create a survey. | — |
| survey-update ~27 tok | 🟠 Write | Update a survey. | — |
| survey-delete ~27 tok | 🔴 Destructive | Delete a survey. | — |
| llm-get-costs ~31 tok | 🟢 Read | Get LLM observability cost metrics. | — |
| cohorts-get-all ~26 tok | 🟢 Read | List cohorts. | — |
| cohort-get ~28 tok | 🟢 Read | Get details of a cohort. | — |
| cohort-create ~27 tok | 🟠 Write | Create a cohort. | — |
🛡️ セキュリティ評価・品質・コンテキスト監査
- No prompt-injection or hidden-character anomalies detected in tool descriptions
- Streamable HTTP primary endpoint (current 2025-03-26 transport)
- Static credential (Bearer token / API key) — protect it in client config
- Official first-party endpoint operated by the vendor
- Manually verified by RemoteMCP.net
🔐 OAuth 2.1 とセキュリティ
- 認証方式
- Bearer Token
- 動的クライアント登録(DCR)
- —
- PKCE S256
- —
- 保護リソースメタデータ
- https://mcp.posthog.com/.well-known/oauth-protected-resource
📡 公式リモートエンドポイントとトランスポート
リモートエンドポイント https://mcp.posthog.com/mcp は Streamable HTTP(2025-03-26 仕様) を採用。Streamable HTTP は単一の POST エンドポイントで JSON-RPC の双方向通信を完結する現行推奨トランスポートで、npx mcp-remote ブリッジなしに Claude・Cursor・VS Code などへ URL だけでMCP接続できます。
接続前にエンドポイントを オンライン MCP Inspector に貼り付けて initialize / tools/list のハンドシェイクを確認することを推奨します。
🔐 認証・権限フロー
認証方式は Bearer Token です。クライアント設定に Authorization: Bearer <キー> ヘッダーを追加する必要があります。資格情報は PostHog のコンソールから取得できます。
🛡️ コンテキスト消費とセキュリティ監査
このサーバーには現在 39 個のツールが登録されており、定義の合計は約 1182 トークン。リクエストごとにモデルのシステムプロンプトへ注入されます。セキュリティ評価は A+(公式運営ソース)。ツール名とスキーマが簡潔なほどコンテキストウィンドウへの「税」は低くなります。feecalculator.app で呼び出しあたりのコストも試算できます。
🧩 主要クライアントへのMCP接続
PostHog Analytics MCP について、Cursor / Claude Code / VS Code / ChatGPT / Windsurf / Kiro / Codex / Cline / Gemini など 10 クライアント向けの設定を自動生成しています。ワンクリック deeplink、claude mcp add コマンド、JSON / TOML スニペットから選べます。代表的なツール:organizations-get、projects-get、project-get、project-property-definitions、docs-search など。
📖 PostHog Analytics の詳細
PostHog Analytics MCP — Remote MCP Server
PostHog's remote MCP is one of the most-used product-analytics endpoints — agents can list and run insights, execute HogQL over event tables, check feature flag state and pull error-tracking summaries with a single API key.
Official PostHog Analytics MCP Endpoint & Transport Architecture
- Endpoint URL:
https://mcp.posthog.com/mcp - Transport: Streamable HTTP
Streamable HTTP is the current MCP transport (2025-03-26 spec): a single URL accepts JSON-RPC POSTs and may stream responses over SSE, so one endpoint serves both simple and streaming workloads. PostHog Analytics MCP does not publish a separate legacy SSE endpoint, so your client must speak Streamable HTTP.
Authentication, Scopes & Permission Boundaries
PostHog Analytics MCP uses bearer-token authentication. Create an access token in your PostHog account settings, then send it as Authorization: Bearer <token>. No OAuth redirect flow is involved.
Of the 6 cataloged tools, 5 are read-only and 1 can write or mutate state (create resources, run SQL, post messages). Grant access only to the accounts and projects you intend agents to act on, and prefer scoped credentials or a dedicated workspace where the provider supports them.
Common Troubleshooting & Connection Tips
- 401/403 responses — your credential is missing or rejected. Regenerate the key/token and make sure it is sent as an
Authorization: Bearerheader on every request, including theinitializecall. - "Session expired" / stale
Mcp-Session-Id— just re-sendinitialize; stateless clients can ignore session headers entirely. - Use a personal API key from PostHog Settings → Personal API Keys.
- HogQL access means the agent can read any event data in the project — use a scoped key.
🚀 PostHog Analytics MCP リモートMCPへの接続方法
- リモートエンドポイントを取得 — 公式エンドポイント https://mcp.posthog.com/mcp をコピーし、PostHog のコンソールで API 資格情報を取得します。
- クライアント設定に追加 — Cursor の mcp.json / Claude Code CLI / 各クライアントに URL と Authorization ヘッダーを追加します(下記クライアント別ガイド参照)。
- 認可して検証 — 設定を保存後、当サイトの Inspector で initialize と tools/list を実行して接続を確認します。
🔌 PostHog Analytics × クライアント別MCP接続ガイド
❓ よくある質問
PostHog Analytics MCP のリモートMCPサーバーは公式ですか?
このエントリは「公式運営」と表示されています。エンドポイントは PostHog 公式が運営しています。掲載エンドポイントはすべて実際の MCP initialize ハンドシェイクで検証済みです。
Claude / Cursor で PostHog Analytics MCP にMCP接続するには?
リモートエンドポイント https://mcp.posthog.com/mcp をコピーします。Claude Code では claude mcp add --transport http posthog https://mcp.posthog.com/mcp を実行。Cursor ではワンクリック deeplink か ~/.cursor/mcp.json に { "mcpServers": { "posthog": { "url": "https://mcp.posthog.com/mcp" } } } を追加します。
接続時に 401 が返る/キーを要求される場合は?
このエンドポイントには Bearer Token / API キーが必要です。PostHog のコンソールで取得し、各クライアントの headers 設定に追加してください。
ローカル stdio MCP とリモート MCP の違いは?
ローカル MCP は npx / uvx で起動する stdio 子プロセスで、ローカルランタイムが必要で API キーを平文で設定ファイルに書きます。リモート MCP は PostHog がホストする HTTPS エンドポイントで、インストール不要・OAuth 2.1 対応・同一 URL をデスクトップとモバイルで共用できます。詳しくは ローカル vs リモート MCP 比較 をご覧ください。