コネクタガイド約6分で読めますMCP ツール 28 個7 言語

MCP 経由で PostHog を Claude に接続する方法

AI に PostHog のプロダクト分析に関する質問に答えさせます。イベントとパーソンに対する読み取り専用 SQL(HogQL)の実行、トレンド、ファネル、リテンションの計算、保存済みのインサイトとダッシュボードの閲覧、パーソン、コホート、アノテーション、実験の参照、インサイトとフィーチャーフラグの管理ができます。PostHog Cloud(US または EU)またはセルフホスト版に、個人用 API キーで接続します。

HC執筆: HelpCode チーム更新日 6分で読了 GitHub でオープンソース

クレジットカード不要 · 7日間の試用 · セルフホストの選択肢あり

PostHog

PostHog

Let your AI answer product analytics questions from PostHog: run read-only SQL (HogQL) over events and persons, compute trends, funnels and retention, read saved insights and dashboards, look up persons, cohorts, annotations and experiments, and manage insights and feature flags. PostHog Cloud (US or EU) or self-hosted, with a personal API key.

ツール

28

地域

INTL

カテゴリー

アナリティクス

認証

Bearer Token

必要な環境変数

POSTHOG_HOSTPOSTHOG_PERSONAL_API_KEY
Cloud にワンクリックでインストール

7日間無料トライアル · クレジットカード不要

  • 7日間の無料トライアル
    クレジットカード不要
  • GDPR・SOC 2 レディ
    EU データ保管、監査ログ
  • GitHub でオープンソース
    オープンソース · AGPL-3.0
  • ChatGPT、Claude、Gemini に対応
    MCP 対応クライアントすべて

インストール不要。2分以内に動きます。

cloud.anythingmcp.com で無料トライアルを開始し、PostHog をワンクリックで追加して、AI クライアント(Claude、ChatGPT、Copilot、Cursor)を生成された MCP エンドポイントに向けるだけ。Docker も git clone も、開発経験も不要です。

無料トライアルを開始

AnythingMCP は Claude のコネクタディレクトリに掲載されています。ワンクリックで Claude に追加 (新しいタブで開きます)し、サインインして Claude が使える MCP サーバーを選んでください。

概要

AI に PostHog のプロダクト分析に関する質問に答えさせます。イベントとパーソンに対する読み取り専用 SQL(HogQL)の実行、トレンド、ファネル、リテンションの計算、保存済みのインサイトとダッシュボードの閲覧、パーソン、コホート、アノテーション、実験の参照、インサイトとフィーチャーフラグの管理ができます。PostHog Cloud(US または EU)またはセルフホスト版に、個人用 API キーで接続します。

こう聞いてみよう

PostHog のサンプルプロンプト

プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。

PostHog · MCP 経由でライブ
共有
Opus 4.7

Claude は AI のため誤ることがあります。回答をご確認ください。

💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → PostHog をクリック、認証情報を貼り付け、MCP API キーを発行すれば完了です。Docker も git clone もローカルサーバーも不要。

PostHog + Claude

AI に PostHog のプロダクト分析に関する質問に答えさせます。イベントとパーソンに対する読み取り専用 SQL(HogQL)の実行、トレンド、ファネル、リテンションの計算、保存済みのインサイトとダッシュボードの閲覧、パーソン、コホート、アノテーション、実験の参照、インサイトとフィーチャーフラグの管理ができます。PostHog Cloud(US または EU)またはセルフホスト版に、個人用 API キーで接続します。

前提条件

完全なセットアップ手順はコネクタ自体に組み込まれています (ストアでコネクタを選択すると表示)。必要な環境変数:

POSTHOG_HOST, POSTHOG_PERSONAL_API_KEY

ステップ 1 — 認証情報を取得

  1. PostHog で Settings → User → Personal API keys を開き(US Cloud: https://us.posthog.com/settings/user-api-keys、EU Cloud: https://eu.posthog.com/settings/user-api-keys)、+ Create a personal API key をクリックします。
  2. キーにラベルを付け(例: 「AnythingMCP」)、organization and project access を選びます。すべて、1 つの組織、または特定のプロジェクトから選べます。特定のプロジェクトに限定したキーでは組織やプロジェクトの一覧を取得できませんが、posthog_get_current_user は動作し、現在のプロジェクトを確認できます。
  3. 次のスコープを選択します。
    • user:read, organization:read, project:read
    • query:read, person:read, cohort:read, experiment:read
    • insight:read, insight:write, dashboard:read
    • feature_flag:read, feature_flag:write
    • annotation:read, annotation:write
  4. すぐにキーをコピーします。PostHog が表示するのは一度だけです。キーは phx_ で始まります(phc_ で始まるプロジェクトトークンはここでは使えません)。Bearer という語を付けずに POSTHOG_PERSONAL_API_KEY に貼り付けます。
  5. POSTHOG_HOST には PostHog を開くときのアドレスを設定します。US Cloud は https://us.posthog.com、EU Cloud は https://eu.posthog.com、セルフホストの場合は自分のインスタンスのアドレスです。末尾のスラッシュやパスは付けません。インジェスト用ホストの us.i.posthog.com と eu.i.posthog.com は受け付けられず、キーは作成したクラウドリージョンでのみ有効です。その後、コネクターをインストールします。
  6. まず posthog_get_current_user を実行します。キーがどの PostHog ユーザーのものか、現在のプロジェクト、組織内のプロジェクトを確認できます。

読み取り専用の設定: :read スコープだけでキーを作成し、posthog_create_insight、posthog_update_insight、posthog_create_feature_flag、posthog_update_feature_flag、posthog_create_annotation をオフにします。HogQL は SELECT しか受け付けないため、クエリがデータを変更することはありません。AI が閲覧、変更できる範囲は、キーのユーザーと同じです。

インストール時にオフになっているツール: posthog_delete_insight、posthog_delete_feature_flag、posthog_delete_annotation。PostHog は API 経由で完全に削除することはなく、これらのツールはインサイト、フラグ、アノテーションに削除済みの印を付けるだけで、PostHog アプリから復元できます。削除したフラグはオフになり、そのキーを確認するコードは false を受け取ります。

プロジェクト ID: プロジェクト単位のツールはすべて project_id を受け取ります。PostHog の URL にある数字(/project/12345/...)で、Settings → Project → General にも表示されます。@current も使えますが、ユーザーがアプリで最後に開いたプロジェクトを指すため変わることがあります。数字の指定をおすすめします。ほかのプロジェクトは posthog_list_organizations と posthog_list_projects で一覧できます。

クエリ: posthog_run_hogql_query は events、persons、sessions、groups に対して HogQL(PostHog の SQL)の SELECT を 1 つ実行します。プロパティは properties.$browser や person.properties.email のように読みます。必ず時間で絞り込んでください(例: WHERE timestamp >= now() - INTERVAL 7 DAY)。絞り込まないスキャンは遅く、読み取り予算を消費します。LIMIT がなければ 100 行、指定すれば最大 50,000 行です。OFFSET は拒否されるため、AI は timestamp や id でページングします。日付はプロジェクトのタイムゾーンで解釈され、UTC ではありません。トレンド、ファネル、リテンション、スティッキネス、ライフサイクル、パスには posthog_run_insight_query を使います。コンバージョン率やリテンション率は count の値から計算します。クエリのエンドポイントはその場の分析向けで、大量エクスポート用ではありません。

インサイト、ダッシュボード、フラグ: posthog_get_insight はデフォルトで最後にキャッシュされた結果を返し、refresh blocking を指定すると古い結果を再計算します。posthog_get_dashboard はタイルとそのインサイトを返します。フィーチャーフラグは実際のユーザーに表示される内容を左右します。フラグを作成、変更する前に、AI はフラグのキー、active、ロールアウトを提示し、あなたの承認を待ちます。新しいフラグは active を false にするか、ロールアウトを 0 にするのが最も安全です。変更時には最後に読み取ったフラグの version を送るため、他の人の変更を上書きしません。

ページング: 一覧系のツールは limit と offset を受け取り、count、next(最後のページでは null)、results を返します。200 KB を超える応答は切り詰められます。

レート制限: 組織単位で適用され、すべてのキーとユーザーで共有されます。通常の読み書きは毎分 480 件、毎時 4,800 件、パーソンやインサイト計算などの分析は毎分 240 件、毎時 1,200 件です。クエリのエンドポイントは毎分 240 件、毎時 2,400 件で、同時実行はプロジェクトごとに最大 3 件、さらにプロジェクトごとの 1 時間あたりの読み取り予算を消費します(無料プランでは少なめ)。制限を超えると PostHog は 429 を返し、予算を使い切ると api_queries_budget_exceeded が返りますが、キャッシュ済みの結果は引き続き使えます。

よくあるエラー: 401 はキーが間違っている、削除された、または別のクラウドリージョンのものです。POSTHOG_HOST を確認してください。403 "API key missing required scope" は追加すべきスコープを示します(キーのスコープは後から変更できます)。それ以外の 403 は、キーが別のプロジェクトや組織に限定されているか、組織がメンバーの個人用 API キーを許可していないことを意味します。404 "Project not found." は project_id が間違っているか、ユーザーから見えないプロジェクトです。400 は無効なフィールドを示し、HogQL ではパーサーのエラーを含みます。フラグでの 409 は version が古いことを意味します。フラグを読み直してください。

このコネクターは、イベントの送信やパーソンのプロパティ設定、パーソンの削除、セッションリプレイやアンケートの閲覧、ダッシュボード、コホート、実験の作成や編集、バッチエクスポート、メンバー、請求の管理には対応していません。

ステップ 2 — アダプターをインストール

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

ステップ 3 — Claude にコネクタを追加

サーバーURL: AnythingMCP で MCP Servers を開き、このコネクタがあるサーバーを選んで URL(https://cloud.anythingmcp.com/mcp/…)をコピーします。このガイドで YOUR_SERVER_ID と表示されている箇所に使ってください。

推奨ルート:設定ファイルを触らずに claude.ai web で動作します。

  1. Claude で Customize → Connectors を開きます。
  2. + をクリックし、Add custom connector を選びます。
  3. 名前(例: PostHog)とリモート MCP サーバー URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID を入力し、Add をクリックします。
  4. Connect をクリックし、AnythingMCP にサインイン(OAuth)してアクセスを許可します。

下記のすべてのツールがチャットに表示されます。プロンプトを入力し始めてください。

利用可能なツール

ToolWhat it does
posthog_get_current_userGet the user the personal API key belongs to: uuid, email and name, the current project (id, name, project_id, timezone), the current…
posthog_list_organizationsList the organizations the user belongs to: id (a UUID), name, slug, membership_level, and each organization's projects
posthog_list_projectsList the projects of an organization: id (the project_id every other tool takes), name, project_id, timezone, tags, is_demo and…
posthog_get_projectGet one project's settings: name, timezone, week_start_day, base_currency, app_urls, test account filters, group types, whether events…
posthog_run_hogql_queryRun one read-only HogQL (PostHog SQL) SELECT over events, persons, sessions, groups or warehouse tables and return columns, results (rows…
posthog_run_insight_queryRun one of PostHog's insight calculations without saving it: TrendsQuery, FunnelsQuery, RetentionQuery, StickinessQuery, LifecycleQuery or…
posthog_list_personsList or search persons (identified users and anonymous visitors): id, uuid, name, distinct_ids, properties, created_at and last_seen_at.…
posthog_get_personGet one person by numeric id or UUID: name, distinct_ids, all person properties (email, initial UTM and referrer, geo), created_at and…
posthog_list_insightsList saved insights (charts): id, short_id, name, description, query, tags, favorited, dashboard_tiles, created_by and last_modified_at
posthog_get_insightGet one insight by numeric id or 8-character short_id: name, description, query, result, columns, last_refresh, is_cached, the hogql it ran…
posthog_create_insightSave a new insight (chart) in the project from a query: a product analytics chart or a SQL insight
posthog_update_insightChange a saved insight: name, description, query, tags or favorited
posthog_delete_insightDelete a saved insight (PostHog marks it deleted; it disappears from every dashboard and can be restored in the app)
posthog_list_dashboardsList dashboards: id, name, description, pinned, tags, created_by, created_at and last_viewed_at
posthog_get_dashboardGet one dashboard with its filters and tiles: each tile carries its insight (id, short_id, name, query and the last cached result) or a…
posthog_list_feature_flagsList feature flags: id, key, name (the description), active, filters (release conditions with rollout_percentage, variants, payloads)…
posthog_get_feature_flagGet one feature flag by id: key, name, active, filters (release condition groups with properties and rollout_percentage, multivariate…
posthog_create_feature_flagCreate a feature flag
posthog_update_feature_flagChange a feature flag: switch it on or off, change its rollout or targeting, rename its description, archive it or retag it
posthog_delete_feature_flagDelete a feature flag (PostHog marks it deleted and switches it off; code that checks the key then gets false)
posthog_list_cohortsList cohorts (saved groups of persons): id, name, description, count (persons in it), is_static, is_calculating, filters and created_at
posthog_get_cohortGet one cohort by id: name, description, its definition (filters or query), count of persons, whether it is static or behavioral…
posthog_list_annotationsList annotations (notes on charts such as releases or incidents): id, content, date_marker, scope, the insight or dashboard they belong to…
posthog_get_annotationGet one annotation by id: content, date_marker, scope (project, organization, dashboard or insight), emoji, the insight or dashboard it is…
posthog_create_annotationAdd an annotation, a note shown on charts at a point in time, e.g. a release, a campaign start or an incident
posthog_delete_annotationDelete an annotation (PostHog marks it deleted; it disappears from every chart and can be restored)
posthog_list_experimentsList A/B test experiments: id, name, description, status, start_date, end_date, feature_flag_key, type, conclusion, archived and created_by
posthog_get_experimentGet one experiment by id: status, start and end dates, its feature flag and variants, metrics, parameters, exposure cohort, conclusion and…

プロンプトの例

  • 「先週、料金ページを訪れたユニークユーザー数を日別に、使われたブラウザーと合わせて教えてください。」
  • 「過去 30 日間の登録ファネルについて、料金ページの閲覧から購入完了までのコンバージョン率を教えてください。」
  • 「現在有効になっているフィーチャーフラグと、それぞれのロールアウト率を一覧にしてください。」
  • 「メインプロジェクトに今日の日付でアノテーションを追加してください。内容は「春のキャンペーン開始」です。」

FAQ

Claude Code は Claude Desktop と同じように動作しますか? はい。両方を https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID に向けてください。

次のステップ

このガイドは役に立ちましたか?

PostHog エージェントまで、あとワンクリック。

コネクタをインストールし、キーを貼り付けて、Claude に聞くだけ。7 日間無料、クレジットカード不要。

関連ガイド

コネクタ

MCP 経由で PostHog を ChatGPT に接続する方法

AI に PostHog のプロダクト分析に関する質問に答えさせます。イベントとパーソンに対する読み取り専用 SQL(HogQL)の実行、トレンド、ファネル、リテンションの計算、保存済みのインサイトとダッシュボードの閲覧、パーソン、コホート、アノテーション、実験の参照、インサイトとフィーチャーフラグの管理ができます。PostHog Cloud(US または EU)またはセルフホスト版に、個人用 API キーで接続します。

コネクタ

MCP 経由で PostHog を Cursor に接続する方法

AI に PostHog のプロダクト分析に関する質問に答えさせます。イベントとパーソンに対する読み取り専用 SQL(HogQL)の実行、トレンド、ファネル、リテンションの計算、保存済みのインサイトとダッシュボードの閲覧、パーソン、コホート、アノテーション、実験の参照、インサイトとフィーチャーフラグの管理ができます。PostHog Cloud(US または EU)またはセルフホスト版に、個人用 API キーで接続します。

コネクタ

MCP 経由で PostHog を Gemini に接続する方法

AI に PostHog のプロダクト分析に関する質問に答えさせます。イベントとパーソンに対する読み取り専用 SQL(HogQL)の実行、トレンド、ファネル、リテンションの計算、保存済みのインサイトとダッシュボードの閲覧、パーソン、コホート、アノテーション、実験の参照、インサイトとフィーチャーフラグの管理ができます。PostHog Cloud(US または EU)またはセルフホスト版に、個人用 API キーで接続します。

コネクタ

MCP 経由で PostHog を Meta Muse に接続する方法

AI に PostHog のプロダクト分析に関する質問に答えさせます。イベントとパーソンに対する読み取り専用 SQL(HogQL)の実行、トレンド、ファネル、リテンションの計算、保存済みのインサイトとダッシュボードの閲覧、パーソン、コホート、アノテーション、実験の参照、インサイトとフィーチャーフラグの管理ができます。PostHog Cloud(US または EU)またはセルフホスト版に、個人用 API キーで接続します。

コネクタ

PostHog を MCP に:あらゆる AI エージェントから PostHog を操作

AI に PostHog のプロダクト分析に関する質問に答えさせます。イベントとパーソンに対する読み取り専用 SQL(HogQL)の実行、トレンド、ファネル、リテンションの計算、保存済みのインサイトとダッシュボードの閲覧、パーソン、コホート、アノテーション、実験の参照、インサイトとフィーチャーフラグの管理ができます。PostHog Cloud(US または EU)またはセルフホスト版に、個人用 API キーで接続します。

コネクタ

MCP 経由で Canva を Claude に接続する方法

AI に Canva で作業させます。デザインの検索と参照、新しいデザインの作成、PDF、PNG、PowerPoint、動画へのエクスポート(ダウンロードリンク付き)、フォルダーの整理、リンクからの画像アップロード、ブランドテンプレートの参照、デザインへのコメントができます。