> ## 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's Messages API

Connect the Box MCP server with [Anthropic's Messages API](https://docs.anthropic.com/en/api/messages). Clone [this sample chat bot project](https://github.com/box-community/mcp-client-remote-mcp-react) to get started quickly. It allows you to have a conversation with an Anthropic model, which has access to tools provided by the Box MCP server.

## Prerequisites

* A Box enterprise account with the MCP server enabled by an admin. See [Set up the MCP server](/guides/box-mcp/setup).
* An Anthropic API key with access to the Messages API.

## Enable Box integration in Box

<Badge color="orange" size="lg">Admin</Badge>

1. Clone the [sample chat bot project](https://github.com/box-community/mcp-client-remote-mcp-react).
2. Follow the project README to configure your Box OAuth credentials and Anthropic API key.
3. Start the application and authenticate with Box when prompted.

The sample project is a React-based chat bot that leverages Box MCP. It demonstrates how to pass the MCP endpoint and authorization token to Anthropic's 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"]
)
```

## Video walkthrough

Watch a video that features a demo project, a React-based chat bot that leverages Box MCP.

<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" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />
