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
42 stars

The Box MCP Server allows you to interact with Box files and folders through various operations including search, text extraction, AI-based querying, and data extraction. It implements the Model Context Protocol (MCP) to standardize interactions with Box's API.

Installation

To install the Box MCP Server:

  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. 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 with your Box API credentials:
BOX_CLIENT_ID=your_client_id
BOX_CLIENT_SECRET=your_client_secret

Usage

Running the MCP Server

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

To run with the default stdio transport:

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

Integrating with Claude Desktop

  1. Edit your Claude Desktop configuration:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  1. Add the Box MCP server 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 already running.

Integrating with Cursor

  1. Open Cursor IDE settings
  2. Navigate to "Cursor settings" > "MCP"
  3. Click "Add new global MCP server"
  4. Add the following configuration (update paths accordingly):
{
  "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

Search and Information 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 with filtering options
  • box_search_folder_by_name: Find folders by name

File and Content Operations

  • box_read_tool: Read the text content of a Box file
  • box_ask_ai_tool: Ask Box AI about a file
  • box_hubs_ask_ai_tool: Ask Box AI about a hub
  • box_ai_extract_data: Extract structured data from files using AI
  • box_list_folder_content_by_folder_id: List folder contents
  • box_manage_folder_tool: Create, update, or delete folders

Box AI Tools

  • box_ai_ask_file_single_tool: Query Box AI on a single file
  • box_ai_ask_file_multi_tool: Query Box AI using multiple files
  • box_ai_extract_freeform_tool: Extract data using AI with a freeform prompt
  • box_ai_extract_structured_using_fields_tool: Extract structured data with specified fields
  • box_ai_extract_structured_using_template_tool: Extract structured data using a template

File Management Tools

  • box_upload_file_from_path_tool: Upload a file from local filesystem
  • box_upload_file_from_content_tool: Upload content as a file
  • box_download_file_tool: Download a file from Box

Metadata Tools

  • box_metadata_template_create_tool: Create a metadata template
  • box_metadata_template_get_by_key_tool: Retrieve a template by key
  • box_metadata_set_instance_on_file_tool: Set metadata on a file
  • box_metadata_get_instance_on_file_tool: Get metadata from a file
  • box_metadata_update_instance_on_file_tool: Update file metadata
  • box_metadata_delete_instance_on_file_tool: Delete file metadata

Document Generation Tools

  • box_docgen_create_batch_tool: Generate documents using a template
  • box_docgen_get_job_tool: Fetch a Doc Gen job
  • box_docgen_list_jobs_tool: List all Doc Gen jobs
  • box_docgen_template_create_tool: Mark a file as a Doc Gen template
  • box_docgen_template_list_tool: List available Doc Gen templates

Troubleshooting

If you see Error: spawn uv ENOENT on MacOS when using Claude Desktop:

  • Try reinstalling uv with Homebrew: brew install uv
  • Or use the full path to the uv executable in your configuration:
    /Users/yourusername/.local/bin/uv --directory /path/to/mcp-server-box run src/mcp_server_box.py
    

Ensure your Box API credentials in the .env file are correctly set for proper functionality.

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