Box MCP Server

by hmk

Integrations

  • Enables searching for files and reading file content from Box, with support for PDF and Word document formats, using either JWT or Developer Token authentication.

box-mcp-服务器

用法

您将需要:

  • BOX_USER_ID

以及下列之一:

  • BOX_JWT_BASE64 (推荐)
  • BOX_JWT_CONFIG_PATH
  • BOX_JWT

授权

JSON Web Token(JWT)授权(推荐)

如何获取 JWT

使用 JWT 配置可以实现与 Box 的持久连接。

您将需要一个付费的 Box 企业帐户,或者您可以注册一个免费的开发者帐户(请确保在单击该链接之前已退出 Box)。

访问Box 开发者控制台并创建一个新的应用程序。确保授权类型为 JSON Web Token。

前往Configuration > Add and Manage Public Keys ,并生成公钥/私钥对。如果您尚未设置,Box 会提示您设置双因素身份验证,并在您的 Box 帐户中以管理员身份授权该应用程序。您需要执行以下操作:

  1. 授予应用程序App + Enterprise Access ,并且
  2. make API calls using the as-user header

通过 Box 应用程序的配置页面。如果您要修改这些设置,请务必重新授权该应用程序

Base64 编码 JWT

要以 Base64 编码您的 JWT,您可以在终端中使用以下命令:

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

/path/to/your/box-jwt-config.json替换为你的 JWT 配置文件的实际路径。这将输出 Base64 编码的 JWT,你可以在环境变量中使用它。

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

开发者令牌授权(最简单)

使用开发者令牌是与 Box 集成的最简单方法,但只能持续 60 分钟。

首先,将BOX_DEV_TOKEN设置为Box 开发者令牌

首先访问Box 开发者控制台并创建一个新的应用程序。授权类型目前无关紧要,因为所有应用程序都支持 Box 开发者令牌。

创建应用程序后,导航到其配置设置并单击Generate Developer Token

Claude桌面配置
{ "mcpServers": { "box": { "command": "npx", "args": ["box-mcp-server"], "env": { "BOX_DEV_TOKEN": "YOUR_DEV_TOKEN_GOES_HERE" } } } }

功能

  1. 搜索文件
  2. 读取文件
  • [x] PDF
  • [x] 字
  • [ ] 其他的

发展

先决条件

开始之前,请确保已安装以下软件:

  • Node.js(建议使用 v22 或更高版本)
  • npm
  • git
  • dotenv

设置开发环境

要设置开发环境,请按照以下步骤操作:

  1. 分叉存储库
    • 点击此仓库右上角的“Fork”按钮
    • 这将在您的 Github 帐户下创建您自己的存储库副本
  2. 克隆你的 Fork:
    git clone https://github.com/YOUR_USERNAME/box-mcp-server.git cd box-mcp-server
  3. 添加上游远程
    git remote add upstream https://github.com/hmk/box-mcp-server.git
  4. 复制 dotenv 文件
    cp .env.template .env
  5. 安装依赖项:
    npm install
  6. 运行 watch 来保持 index.js 更新:
    npm run watch
  7. 启动模型上下文协议开发服务器:
    dotenv npx @modelcontextprotocol/inspector node PATH_TO_YOUR_CLONED_REPO/dist/index.js
  8. 如果开发服务器未正确加载环境变量,请在 mcp 检查器的左侧设置BOX_DEV_TOKEN
-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Box MCP 服务器使用开发人员令牌身份验证方便在 Box 中搜索和阅读 PDF 和 Word 文件。

  1. Usage
    1. Auth
      1. JSON Web Token (JWT) Authorization (recommended)
      2. Developer Token Authorization (easiest)
    2. Capabilities
      1. Development
        1. Prerequisites
        2. Setting up Development Environment

      Related MCP Servers

      • A
        security
        A
        license
        A
        quality
        An MCP server that provides access to project files and their contents, allowing users to retrieve file data from specified project directories with error handling and configuration options.
        Last updated -
        1
        4
        TypeScript
        MIT License
      • -
        security
        F
        license
        -
        quality
        A server providing PDF form manipulation tools via MCP's API, allowing users to find PDFs across directories, extract form field information, and visualize form fields in documents.
        Last updated -
        Python
      • A
        security
        F
        license
        A
        quality
        An MCP server that provides a tool to extract text content from local PDF files, supporting both standard PDF reading and OCR capabilities with optional page selection.
        Last updated -
        1
        2
        Python
        • Apple

      View all related MCP servers

      ID: ssufe2n9eo