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

# AnthropicのMessages API

Box MCPサーバーを[AnthropicのMessages API](https://docs.anthropic.com/en/api/messages)と接続します。[こちらのサンプルチャットボットプロジェクト](https://github.com/box-community/mcp-client-remote-mcp-react)を複製すると、すぐに作業を開始できます。これにより、Anthropicモデルとの対話が可能になります。このモデルから、Box MCPサーバーが提供するツールにアクセスできます。

## 前提条件

* 管理者によってMCPサーバーが有効化されているBox Enterpriseアカウント。[MCPサーバーの設定](/guides/box-mcp/setup)を参照してください。
* Messages APIへのアクセス権限を持つAnthropic APIキー。

## BoxでのBox統合の有効化

<Badge color="orange" size="lg">管理者</Badge>

1. [サンプルチャットボットプロジェクト](https://github.com/box-community/mcp-client-remote-mcp-react)を複製します。
2. プロジェクトのREADMEに従って、BoxのOAuth資格情報とAnthropicのAPIキーを構成します。
3. アプリケーションを起動し、プロンプトが表示されたらBoxで認証を行います。

以下のサンプルプロジェクトは、Box MCPを活用したReactベースのチャットボットです。ここでは、MCPエンドポイントと認証トークンをAnthropicのMessages APIに渡す方法を示しています。

```python theme={null}
response = await client.beta.messages.create(
    model="claude-3-opus-20240229",
    max_tokens=4096,
    messages=conversation_history,
    mcp_servers=[
        {
            "type": "url",
            "url": "https://mcp.box.com",
            "name": "box-remote-mcp",
            "authorization_token": BEARER_TOKEN,
        }
    ],
    betas=["mcp-client-2025-04-04"]
)
```

## チュートリアル動画

Box MCPを利用しているReactベースのチャットボットのデモプロジェクトを紹介する動画をご覧ください。

<iframe width="100%" height="315" src="https://www.youtube.com/embed/Rcn8p-nLJtI?si=ayj86_qbkHdGgE5I" title="Unlock your enterprise data: Connect AI agents to Box with MCP (企業データの可能性を解き放つ: MCPを活用したAIエージェントとBoxの連携)" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />
