Box MCP server

Integrates with Box API to enable document search, text extraction, content analysis, and structured data retrieval from files and folders within Box storage systems.
Back to servers
Setup instructions
Provider
Box
Release date
Mar 20, 2025
Language
Python
Stats
66 stars

The Box MCP Server is a Python project that integrates with the Box API to perform various operations including file search, text extraction, AI-based querying, and data extraction. It implements the Model Context Protocol (MCP) to standardize interactions with Box services and data sources.

Installation

Prerequisites

  • Python 3.13 or higher
  • Box API credentials

Setup Instructions

  1. Clone the repository:
git clone https://github.com/box-community/mcp-server-box.git
cd mcp-server-box
  1. Install uv package manager:

For MacOS/Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

For Windows:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
  1. Create and set up the project environment:

For MacOS/Linux:

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

# Lock the dependencies
uv lock

For Windows:

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

# Lock the dependencies
uv lock
  1. Create a .env file in the root directory with your Box API credentials:

For OAuth authentication:

BOX_CLIENT_ID=your_client_id
BOX_CLIENT_SECRET=your_client_secret
BOX_REDIRECT_URL=http://localhost:8000/callback

For CCG authentication:

BOX_CLIENT_ID=your_client_id
BOX_CLIENT_SECRET=your_client_secret
BOX_SUBJECT_TYPE=user # or enterprise
BOX_SUBJECT_ID=your user id or enterprise id

Usage

Running the MCP Server

The server supports multiple transport methods: stdio (default), SSE, HTTP, and FastAPI.

To run with stdio transport (default):

uv --directory /path/to/mcp-server-box run src/mcp_server_box.py

Client Integration

Using with Claude Desktop

  1. Edit your Claude Desktop configuration file:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  1. Add the following configuration:
{
    "mcpServers": {
        "mcp-server-box": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/mcp-server-box",
                "run",
                "src/mcp_server_box.py"
            ]
        }
    }
}
  1. Restart Claude if it's currently running.

Using with Cursor IDE

  1. Open your Cursor IDE
  2. Go to Cursor settings
  3. Select MCP from the left navigation
  4. Click "Add new global MCP server" in the top-left
  5. Add the following JSON (update paths for your system):
{
  "mcpServers": {
    "box": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/mcp-server-box",
        "run",
        "src/mcp_server_box.py"
      ]
    }
  }
}
  1. Save and restart if necessary

Available Tools

Box API Tools

  • box_who_am_i: Get your current user information
  • box_authorize_app_tool: Start Box application authorization
  • box_search_tool: Search for files in Box
  • box_search_folder_by_name_tool: Locate a folder by name

Box AI Tools

  • box_ai_ask_file_single_tool: Query Box AI about a single file
  • box_ai_ask_file_multi_tool: Query Box AI using multiple files
  • box_ai_ask_hub_tool: Ask Box AI about a hub
  • box_ai_extract_freeform_tool: Extract data using AI with freeform prompts
  • box_ai_extract_structured_using_fields_tool: Extract structured data with specified fields
  • box_ai_extract_structured_using_template_tool: Extract structured data with templates

Box File Tools

  • box_read_tool: Read the text content of a Box file
  • box_list_folder_content_by_folder_id: List a folder's content
  • box_manage_folder_tool: Create, update, or delete folders
  • box_upload_file_from_path_tool: Upload files from local filesystem
  • box_upload_file_from_content_tool: Upload content as a file
  • box_download_file_tool: Download files from Box

User and Group Management

  • box_users_list_tool: List all users in the Box enterprise
  • box_users_locate_by_email_tool: Find users by email
  • box_groups_search_tool: Search for groups by name
  • box_groups_list_members_tool: List members of a group

Metadata and Doc Gen Tools

  • box_metadata_template_create_tool: Create metadata templates
  • box_metadata_set_instance_on_file_tool: Set metadata on files
  • box_docgen_create_batch_tool: Generate documents using Box Doc Gen templates
  • box_docgen_template_list_tool: List available Box Doc Gen templates

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "box" '{"command":"uv","args":["--directory","/Users/shurrey/local/mcp-server-box","run","src/mcp_server_box.py"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "box": {
            "command": "uv",
            "args": [
                "--directory",
                "/Users/shurrey/local/mcp-server-box",
                "run",
                "src/mcp_server_box.py"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "box": {
            "command": "uv",
            "args": [
                "--directory",
                "/Users/shurrey/local/mcp-server-box",
                "run",
                "src/mcp_server_box.py"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later