# mcp-server-box

> MCP Server

MCP Server Box is a Python project integrating with the Box API for file operations like search, text extraction, and AI-based querying. It uses the Model Context Protocol to manage

## Overview

- **Category:** AI
- **Language:** Python
- **Stars:** 102
- **Forks:** 0
- **Owner:** box-community
- **GitHub:** https://github.com/box-community/mcp-server-box
- **Created:** 2025-02-24T21:55:16+00:00
- **Updated:** 2025-03-25T15:27:24+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-server-box-api-file-operations

## Setup

## Setup

1. Clone the repository:

    ```sh
    git clone https://github.com/box-community/mcp-server-box.git
    cd mcp-server-box
    ```

2. Install `uv` if not installed yet:

    2.1 MacOS+Linux

    ```sh MacOS+Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    ```

    2.2 Windows

    ```powershell Windows
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
    ```
    
3. Create and set up our project:

    3.1 MacOS+Linux

    ```sh
    # Create virtual environment and activate it
    uv venv
    source .venv/bin/activate

    # Lock the dependencies
    uv lock
    ```

    3.1 Windows

    ```sh
    # Create virtual environment and activate it
    uv venv
    .venv\Scripts\activate

    # Lock the dependencies
    uv lock
    ```


4. Create a `.env` file in the root directory and add your Box API credentials:

    ```.env
    BOX_CLIENT_ID=your_client_id
    BOX_CLIENT_SECRET=your_client_secret
    ```

### Running the MCP Server

To start the MCP server, run the following command:

```sh
uv --directory /path-to-the-project/mcp-server-box run src/mcp_server_box.py
```

### Using Claude as the client

1. Edit your `claude_desktop_config`.json

```sh
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
```

2. And add the following:
```json
{
    "mcpServers": {
        "mcp-server-box": {
            "command": "uv",
            "args": [
                "--directory",
                "/path-to-your-project/mcp-server-box",
                "run",
                "src/mcp_server_box.py"
            ]
        }
    }
}
```

3. If CLaude is running restart it

## Tools

## Available Tools

1.  `box_who_am_i` (Get your current user information and check connection status.)
2.  `box_authorize_app_tool` (Start the Box application authorization process.)
3.  `box_search_tool` (Search for files in Box.)
4.  `box_read_tool` (Read the text content of a Box file.)
5.  `box_ask_ai_tool` (Ask Box AI about a file.)
6.  `box_search_folder_by_name` (Locate a folder by name.)
7.  `box_ai_extract_data` (Extract data from a file using AI.)
8.  `box_list_folder_content_by_folder_id` (List folder contents.)
