> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 実験結果を Notion にエクスポートする

> Claude を使用して実験結果を Notion にエクスポートします。

このガイドでは、Kameleoon の実験結果を、Claude との単一の会話から Notion のデータベースにエクスポートします。スクリプトも、管理すべき保存済み API 認証情報も、コードも必要ありません。Claude は Kameleoon と Notion それぞれのリモート MCP（Model Context Protocol）サーバーに接続し、平易な言葉で依頼するとエクスポートを実行します。

どちらの MCP サーバーも、読み取り専用にとどまらないツールを公開しています。Kameleoon MCP サーバーは実験やフィーチャーフラグの開始・一時停止・停止・削除も行えます。Notion MCP サーバーは、本ドキュメント執筆時点では検索、作成、更新のツールのみを公開しており、ページやデータベースを削除・アーカイブするツールはありません。特に Kameleoon 側では、いずれのコネクタが提案する操作も、承認する前に確認してください。

## 前提条件

* エクスポート対象の実験にアクセスできる Kameleoon アカウント
* 結果データベースを配置するページへの編集アクセス権を持つ Notion ワークスペース
* Connectors を利用可能な Claude アカウント

## ステップ 1: コネクタを追加する

同じ結果に至る 2 つの方法があります。すでに Claude をどのように使っているかに合わせて、いずれかを選んでください。

### コーディングツール経由で接続する

1. Kameleoon MCP サーバーをアシスタントに接続します。Claude Code、Cursor、Codex、Antigravity での登録と認証の手順は、[Kameleoon MCP サーバー](/ja/mcp/mcp-server) を参照してください。
2. Notion MCP サーバーに接続します。Claude Code では次を実行します:

   ```
   claude mcp add --transport http notion https://mcp.notion.com/mcp
   ```

   続いて Claude Code 内で `/mcp` を実行し、ブラウザで認可します。Cursor、VS Code、その他のクライアント固有のセットアップ手順、および OAuth の代替となる個人アクセストークンについては、[Connect to Notion MCP](https://developers.notion.com/guides/mcp/get-started-with-mcp) を参照してください。
3. アシスタントが両方のサーバーからツールを読み込むように、新しい会話を開始します。

### Claude アプリ経由で接続する

1. Claude アプリでアカウントのコネクタ設定を開きます（Customize > Connectors）。
2. Kameleoon コネクタを追加し、OAuth 経由で認可します。コネクタディレクトリに表示されない場合は、URL `https://mcp.kameleoon.com/mcp` を使ってカスタムコネクタとして追加し、認可します。
3. 同じ方法で Notion コネクタを追加します。表示されない場合は、URL `https://mcp.notion.com/mcp` を使ってカスタムコネクタとして追加し、認可した上で、アクセス可能なページを選択します。
4. 新しい会話を開始し、チャット内のプラスボタンで両方のコネクタをその会話で有効にします。ある会話で有効にしたコネクタは、新しい会話には引き継がれません。

Team または Enterprise プランでは、コネクタを自分で追加することができない場合があります。**Add** の代わりに **Request** ボタンが表示される場合、組織がコネクタを追加できるユーザーを制限しており、まず管理者がリクエストを承認する必要があります。

## ステップ 2: Notion データベースを準備する

初回実行の前に、次のスキーマでデータベースを作成します。

| Notion プロパティ    | 型         | ソース                          | 変換                                                                                                                         |
| --------------- | --------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Experiment Name | Title     | `experiment.name`            | そのまま。アップサートのキーとして使用されます。                                                                                                   |
| Status          | Select    | `experiment.status`          | 大文字小文字を無視してマッピング: `active → Running`、`draft`/`planned → Implementing`、`stopped`/`diverted → Completed`、`paused → Defunct`。 |
| Start date      | Date      | `experiment.dateStarted`     | 日時を ISO 日付 (`YYYY-MM-DD`) に切り詰め。                                                                                           |
| End date        | Date      | `experiment.dateEnded`       | 日時を ISO 日付に切り詰め。                                                                                                           |
| Notes           | Rich text | `experiment.description`     | そのまま。                                                                                                                      |
| Actual          | Number    | 最良バリエーションの `improvementRate` | そのまま（計測された uplift、%）。                                                                                                      |
| Probability     | Select    | 最良バリエーションのベイズ成功確率            | 区分化: `≥95 → 80% - High`、`≥80 → 50% - Medium`、それ以外は `20% - Low`。                                                            |
| Result          | Select    | ベイズ成功確率 + `improvementRate`  | 確率 `≥ 95` かつ uplift > 0 → `Success`、`≥ 95` かつ uplift \< 0 → `Failure`、それ以外は `Inconclusive`。                                |

初回書き込みの前に、Notion で Select の選択肢（`Running`、`Implementing`、`Completed`、`Defunct`、`80% - High`、`50% - Medium`、`20% - Low`、`Success`、`Failure`、`Inconclusive`）を作成してください。

## ステップ 3: アシスタントにプロンプトを送る

Kameleoon MCP ツールは、生の結果と併せて独自の事前計算された勝者を返しますが、有意性はこのスキーマで固定されたしきい値ではなく、このアカウントに設定された信頼性しきい値に対して判定されます。以下のプロンプトは、代わりに生の数値を求めることでそのギャップを回避します。送信前に、実験 ID と Notion データベースのリンクをご自身のものに置き換えてください。

```
Using the Kameleoon MCP tools, get the results for experiment XXXXXX. In the
returned data, skip the "_reference" variation and read each remaining
variation's raw reliability and improvement rate for the experiment's
primary goal (not the tool's own winner summary, which judges significance
against this account's configured reliability threshold rather than the
fixed thresholds below). If the same reliability and improvement numbers
appear more than once under different field names, use the plain
percent-scale value tied to that goal, not a 0-1 fraction of it. Pick the
variation with the highest improvement rate as the best performer.

Then, using the Notion MCP tools, upsert a page in the database at
[your Notion database link], matching on the "Experiment Name" title
property against the experiment's name: update the existing page if one
matches, or create a new one if not. Set the properties as follows:
- Experiment Name: the experiment's name
- Status: map a status of active to Running, draft to Implementing, stopped
  to Completed, and paused to Defunct (case-insensitive; confirm the exact
  tokens your account returns)
- Start date / End date: the experiment's start and end dates, formatted as
  YYYY-MM-DD
- Notes: the experiment's description
- Actual: the best variation's improvement rate
- Probability: 80% - High if the reliability is 95 or above, 50% - Medium if
  it's 80 or above, otherwise 20% - Low
- Result: Success if the reliability is 95 or above with a positive
  improvement, Failure if the reliability is 95 or above with a negative
  improvement, otherwise Inconclusive

Don't add or change any properties outside this list.
```

このプロンプトを調整する場合に知っておくべきことがいくつかあります:

* 生の数値の代わりに、ツール独自の勝者サマリーを求めないでください。これは、このスキーマで固定された 95%/80% の区分ではなく、アカウント独自のしきい値に対して有意性を判定します。
* Notion データベース内では、各実験の名前を一意に保ってください。アップサートはその Title プロパティで照合されるため、同じ名前のページが複数存在すると、誤ったページを更新したり、重複を作成したりする可能性があります。
* Kameleoon の結果は、同じ信頼性と改善率の値をレスポンスの別の場所で、異なる名前やスケールで繰り返すことがあります。プロンプトでは、どちらを使用するかをすでに指定しています。

## ステップ 4: 自動化する

エクスポートを手動で繰り返さずにデータベースを最新の状態に保つには、同じプロンプトで定期実行のスケジュールタスクを設定します。スケジュールされた各実行は、前回の実行の記憶を持たない新しいセッションで開始されるため、毎回、実験 ID（または実行中および最近完了したすべての実験を一覧表示する依頼）と上記のプロンプト全体を含めてください。ほとんどのチームにとっては、日次または週次の頻度がこのエクスポートに適しています。

## 注意事項

* AI アシスタントは固定された関数を実行する代わりに、実行ごとにこのマッピングを新たに解釈します。書き込まれたページは、特に最初の数回、Kameleoon の値と照らして確認してください。
* Notion MCP サーバーの現在のツールセットでは、コンテンツを削除やアーカイブすることはできませんが、既存のプロパティ値は上書きできます。提案された更新は承認する前に確認してください。また、Kameleoon 側のコネクタは実行中の実験やフィーチャーフラグに影響を及ぼす可能性があるため、そちらの操作は別途確認してください。
