Box

by hmk

5 stars
4.2k downloads
Not rated
GitHub

About

Integrates with Box cloud storage to enable searching, reading, and processing of PDF and Word documents for applications like automated document analysis and content extraction.

Details

Author
hmk
Repository
hmk/box-mcp-server
GitHub stars
5
Downloads
4,152
License
BSD 3-Clause "New" or "Revised" License
Categories
File Management, Community, Other, Developer Tools, Design, Workplace, AI, Search, Infrastructure, Automation, Security
Tags
#integration

1. Searching files
2. Reading files

- [x] PDF
- [x] Word
- [ ] Others

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Box
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 box-mcp-server
    Environment
    • BOX_USER_ID 123456
    • BOX_JWT_BASE64 YOUR_BASE64_ENCODED_JWT

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

You will need:

- BOX_USER_ID

and one of the following:

- BOX_JWT_BASE64 (recommended)
- BOX_JWT_CONFIG_PATH
- BOX_JWT

{
  "mcpServers": {
    "box": {
      "command": "npx",
      "args": ["box-mcp-server"],
      "env": {
        "BOX_DEV_TOKEN": "YOUR_DEV_TOKEN_GOES_HERE"
      }
    }
  }
}

To set up the development environment, follow these steps:

1. Fork the repository

- Click the "Fork" button in the top-right corner of this repository
- This creates your own copy of the repository under your Github acocunt

1. Clone Your Fork:

   git clone https://github.com/YOUR_USERNAME/box-mcp-server.git
   cd box-mcp-server
   

1. Add Upstream Remote

   git remote add upstream https://github.com/hmk/box-mcp-server.git

1. Copy the dotenv file

    cp .env.template .env

1. Install dependencies:

   npm install
   

1. Run watch to keep index.js updated:

   npm run watch
   

1. Start the model context protocol development server:

   dotenv npx @modelcontextprotocol/inspector node PATH_TO_YOUR_CLONED_REPO/dist/index.js
   

1. If the development server did not load the environment variable correctly, set the BOX_DEV_TOKEN on the left-hand side of the mcp inspector.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "box": {
            "env": {
                "BOX_USER_ID": "123456",
                "BOX_JWT_BASE64": "YOUR_BASE64_ENCODED_JWT"
            },
            "args": [
                "box-mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": {
        "BOX_USER_ID": "123456",
        "BOX_JWT_BASE64": "YOUR_BASE64_ENCODED_JWT"
    },
    "args": [
        "box-mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": {
        "BOX_USER_ID": "123456",
        "BOX_JWT_BASE64": "YOUR_BASE64_ENCODED_JWT"
    },
    "args": [
        "box-mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": {
        "BOX_USER_ID": "123456",
        "BOX_JWT_BASE64": "YOUR_BASE64_ENCODED_JWT"
    },
    "args": [
        "/c",
        "npx",
        "box-mcp-server"
    ],
    "command": "cmd"
}

box-mcp-server

CI

Usage

You will need:

- BOX_USER_ID

and one of the following:

- BOX_JWT_BASE64 (recommended)
- BOX_JWT_CONFIG_PATH
- BOX_JWT

Auth

JSON Web Token (JWT) Authorization (recommended)

How to get a JWT

Using a JWT Config allows persistent connection to Box.

You will need a paid Box enterprise account, or you can sign up for a free developer account (make sure you are signed out of Box before clicking that link).

Visit the Box Developer Console and create a new application. Make sure the authorization type is JSON Web Token.

Go to Configuration > Add and Manage Public Keys and Generate a Public/Private Keypair.
If you have not already, Box prompt you to set up 2 factor authentication and Authorize the application as an administrator in your box account. You will need to:

1. give the application App + Enterprise Access, and
2. enable the make API calls using the as-user header option

via the Box Application's Configuration page. Make sure to reauthorize the application if you are modifying these settings.

Base64 encoding JWT

To encode your JWT in Base64, you can use the following command in your terminal:

cat /path/to/your/box-jwt-config.json | base64

Replace /path/to/your/box-jwt-config.json with the actual path to your JWT configuration file. This will output the Base64 encoded JWT which you can then use in your environment variables.

Claude Desktop Configuration

{
  "mcpServers": {
    "box": {
      "command": "npx",
      "args": ["box-mcp-server"],
      "env": {
        "BOX_JWT_BASE64": "YOUR_BASE64_ENCODED_JWT",
        "BOX_USER_ID": "123456"
      }
    }
  }
}

Developer Token Authorization (easiest)

Using a developer token is the easiest way to integrate with Box, but will only last 60 minutes.

To get started, set the BOX_DEV_TOKEN to a Box Developer Token.

Begin by visiting the Box Developer Console and create a new application. The authorization type does not currently matter, as all support Box Developer Token.

Once your application is created, navigate to its configuration setings and click Generate Developer Token.

Claude Desktop Configuration

{
  "mcpServers": {
    "box": {
      "command": "npx",
      "args": ["box-mcp-server"],
      "env": {
        "BOX_DEV_TOKEN": "YOUR_DEV_TOKEN_GOES_HERE"
      }
    }
  }
}

Capabilities

1. Searching files
2. Reading files

- [x] PDF
- [x] Word
- [ ] Others

Development

Prerequisites

Before you begin, ensure you have the following installed:

- Node.js (recommended v22 or higher)
- npm
- git
- dotenv

Setting up Development Environment

To set up the development environment, follow these steps:

1. Fork the repository

- Click the "Fork" button in the top-right corner of this repository
- This creates your own copy of the repository under your Github acocunt

1. Clone Your Fork:

   git clone https://github.com/YOUR_USERNAME/box-mcp-server.git
   cd box-mcp-server
   

1. Add Upstream Remote

   git remote add upstream https://github.com/hmk/box-mcp-server.git

1. Copy the dotenv file

    cp .env.template .env

1. Install dependencies:

   npm install
   

1. Run watch to keep index.js updated:

   npm run watch
   

1. Start the model context protocol development server:

   dotenv npx @modelcontextprotocol/inspector node PATH_TO_YOUR_CLONED_REPO/dist/index.js
   

1. If the development server did not load the environment variable correctly, set the BOX_DEV_TOKEN on the left-hand side of the mcp inspector.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.