Box (community)
Visit ProjectFile access and search for Box.
Visit ProjectCategory
Tags
what is Box (community)?
Box (community) is a project that provides file access and search capabilities for Box, a cloud storage and content management platform. It integrates with Model Context Protocol (MCP) to enhance functionality within the Box ecosystem.
How to use Box (community)?
To use Box (community), you need to set up authentication via JSON Web Token (JWT) or developer token. Here are the steps:
- JWT Authorization (recommended):
- Set
BOX_JWT_BASE64
via Base64 encoding your JWT configuration file. - Provide your
BOX_USER_ID
.
- Set
- Developer Token Authorization:
- Set
BOX_DEV_TOKEN
using a Box Developer Token (limited to 60 minutes).
- Set
Configure the project by setting these environment variables in your Claude Desktop configuration.
Key features of Box (community)?
- Searching files across your Box account.
- Reading files in the following formats:
- Word
- Integration with Model Context Protocol (MCP) for seamless file access.
Use cases of Box (community)?
- Content Retrieval: Quickly find and access files stored in Box.
- Document Processing: Read and process PDF and Word files directly from Box.
- Developer Integration: Build applications that interact with Box files efficiently.
- Testing and Development: Use the developer token for quick testing and prototyping.
FAQ from Box (community)?
-
How do I authenticate with Box (community)?
You can use either JWT (recommended for long-term connections) or a developer token (for quick testing, limited to 60 minutes).
-
What permissions are required for JWT authorization?
You need
App + Enterprise Access
and must enable themake API calls using the as-user header
option in the Box Developer Console. -
Which file formats does Box (community) support for reading?
Currently, it supports reading PDF and Word documents. Support for other formats may be added in the future.
-
How do I set up the development environment?
Follow the steps in the Development section: fork the repository, install dependencies, and configure environment variables.
box-mcp-server
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:
- give the application
App + Enterprise Access
, and - 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
- Searching files
- 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:
-
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
-
Clone Your Fork:
git clone https://github.com/YOUR_USERNAME/box-mcp-server.git cd box-mcp-server
-
Add Upstream Remote
git remote add upstream https://github.com/hmk/box-mcp-server.git
-
Copy the dotenv file
cp .env.template .env
-
Install dependencies:
npm install
-
Run watch to keep index.js updated:
npm run watch
-
Start the model context protocol development server:
dotenv npx @modelcontextprotocol/inspector node PATH_TO_YOUR_CLONED_REPO/dist/index.js
-
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.