Skip to content

Commit 3d2c8ec

Browse files
committed
docs: document MCP support and remove BokeBox link
1 parent f1fee1e commit 3d2c8ec

5 files changed

Lines changed: 62 additions & 40 deletions

File tree

‎docs/.vitepress/config.mts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default defineConfig({
3131
{ text: '上传与分享', link: '/guide/upload' },
3232
{ text: '管理面板', link: '/guide/management' },
3333
{ text: '存储配置', link: '/guide/storage' },
34+
{ text: 'MCP 接入', link: '/guide/mcp' },
3435
],
3536
},
3637
{ text: 'API', link: '/api/' },
@@ -64,6 +65,7 @@ export default defineConfig({
6465
{ text: '文件上传', link: '/guide/upload' },
6566
{ text: '文件分享', link: '/guide/share' },
6667
{ text: '文件管理', link: '/guide/management' },
68+
{ text: 'MCP 接入', link: '/guide/mcp' },
6769
],
6870
},
6971
{
@@ -148,6 +150,7 @@ export default defineConfig({
148150
{ text: 'Getting Started', link: '/en/guide/getting-started' },
149151
{ text: 'Upload & Share', link: '/en/guide/upload' },
150152
{ text: 'Admin Panel', link: '/en/guide/management' },
153+
{ text: 'MCP Integration', link: '/en/guide/mcp' },
151154
{ text: 'Storage', link: '/en/guide/storage' },
152155
],
153156
},
@@ -185,6 +188,7 @@ export default defineConfig({
185188
{ text: 'File Upload', link: '/en/guide/upload' },
186189
{ text: 'File Sharing', link: '/en/guide/share' },
187190
{ text: 'File Management', link: '/en/guide/management' },
191+
{ text: 'MCP Integration', link: '/en/guide/mcp' },
188192
],
189193
},
190194
{

‎docs/en/guide/mcp.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# MCP Integration
2+
3+
FileCodeBox provides a **Model Context Protocol (MCP)** endpoint over Streamable HTTP. Compatible AI clients can create text or file shares through it.
4+
5+
## Connection
6+
7+
Add a remote HTTP server in your MCP client:
8+
9+
- **Transport**: Streamable HTTP
10+
- **Server URL**: `http://<FileCodeBox host>:12345/mcp`
11+
- **Authentication**: no token required by default
12+
13+
For a local instance, use `http://localhost:12345/mcp`. If the administrator disables guest uploads or enables MCP token validation in the admin settings, configure `Authorization: Bearer <admin token>` in the client. Never commit the token to public configuration or source code.
14+
15+
## Available tools
16+
17+
- `share_text`: create a text share. Required: `text`; optional: `expire_value`, `expire_style`.
18+
- `share_file`: upload a Base64-encoded file and create a share. Required: `filename`, `content_base64`; optional: `content_type`, `expire_value`, `expire_style`.
19+
20+
`expire_style` accepts `day`, `hour`, `minute`, `forever`, or `count`; `expire_value` must be greater than zero. Successful calls return a share code, URL, and Markdown link.
21+
22+
## Security and limits
23+
24+
MCP uploads follow FileCodeBox's guest-upload switch, admin-token validation, upload-size and file-type limits, and upload rate limits. Expose the endpoint only to trusted AI clients. Use HTTPS for public deployments and keep the admin token secure.

‎docs/guide/mcp.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# MCP 接入
2+
3+
FileCodeBox 提供 **Model Context Protocol (MCP)** 接口,支持通过 Streamable HTTP 让兼容的 AI 客户端创建文本或文件分享。
4+
5+
## 连接配置
6+
7+
在 MCP 客户端添加远程 HTTP 服务:
8+
9+
- **传输方式**:Streamable HTTP
10+
- **服务地址**:`http://<FileCodeBox 地址>:12345/mcp`
11+
- **认证**:默认无需 Token
12+
13+
例如本机部署时,地址为 `http://localhost:12345/mcp`。若管理员关闭了游客上传,或在管理设置中启用了 MCP Token 校验,请在客户端设置 `Authorization: Bearer <管理员 Token>`。不要把 Token 提交到公开配置或代码仓库。
14+
15+
## 可用工具
16+
17+
- `share_text`:创建文本分享。必填参数 `text`;可选 `expire_value`、`expire_style`。
18+
- `share_file`:上传 Base64 文件并创建分享。必填参数 `filename`、`content_base64`;可选 `content_type`、`expire_value`、`expire_style`。
19+
20+
过期方式 `expire_style` 支持 `day`、`hour`、`minute`、`forever` 和 `count`,`expire_value` 必须大于 0。调用成功后返回分享码、链接和 Markdown 链接。
21+
22+
## 安全与限制
23+
24+
MCP 上传遵循 FileCodeBox 的游客上传开关、管理员 Token 校验、上传大小限制、文件类型校验及上传频率限制。仅向可信任的 AI 客户端提供服务地址;使用公网部署时请配置 HTTPS 并妥善保管管理员 Token。

‎readme.md‎

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ docker run -d --restart unless-stopped \
3636
```
3737

3838
访问 `http://localhost:12345`,完成首次初始化。生产环境建议固定版本号;`latest` 指向最新正式版。
39+
## AI 客户端与 MCP
40+
41+
FileCodeBox 支持 **MCP Streamable HTTP**,可从兼容的 AI 客户端创建文本和文件分享。服务端点为 `http://<你的服务器地址>:12345/mcp`(本机部署可用 `http://localhost:12345/mcp`),默认无需 Token。工具包括 `share_text` 和 `share_file`。若关闭游客上传或启用 MCP Token 校验,客户端需配置 `Authorization: Bearer <管理员 Token>`。
42+
43+
详见 [MCP 接入指南](https://fcb-docs.aiuo.net/guide/mcp)。
3944

4045
## 简单,但足够强大
4146

@@ -78,26 +83,6 @@ docker run -d --restart unless-stopped \
7883
- [API 文档](https://fcb-docs.aiuo.net/api/) · 上传、取件与管理接口
7984
- [前端源码](https://github.com/vastsa/FileCodeBoxFronted) · 当前 2024 主题
8085

81-
## 相关项目
82-
83-
如果你也喜欢「盒子」系列的自托管工具,可以看看同作者的:
84-
85-
### [BokeBox](https://github.com/vastsa/BokeBox/) · 私人 AI 播客盒
86-
87-
把视频、链接或文稿丢进去,生成可听完的个人播客,支持自定义主持人设与声音。
88-
89-
<p align="center">
90-
<a href="https://github.com/vastsa/BokeBox/">
91-
<img src="./.github/images/readme/bokebox/banner_zh.webp" alt="BokeBox 横幅" width="860" />
92-
</a>
93-
</p>
94-
95-
<p align="center">
96-
<a href="https://github.com/vastsa/BokeBox/">
97-
<img src="./.github/images/readme/bokebox/home_zh.webp" alt="BokeBox 首页" width="860" />
98-
</a>
99-
</p>
100-
10186
## 参与项目
10287

10388
欢迎 [提交 Issue](https://github.com/vastsa/FileCodeBox/issues/new/choose) 或 Pull Request。项目基于 [LGPL-3.0](./LICENSE) 发布。

‎readme_en.md‎

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ docker run -d --restart unless-stopped \
3636
```
3737

3838
Open `http://localhost:12345` and complete first-run setup. Pin a version in production; `latest` tracks the newest stable release.
39+
## MCP for AI clients
40+
41+
FileCodeBox supports **MCP over Streamable HTTP**, allowing compatible AI clients to create text and file shares. Use `http://<your-server>:12345/mcp` (or `http://localhost:12345/mcp` for a local instance). No token is required by default. The available tools are `share_text` and `share_file`. If guest uploads are disabled or MCP token validation is enabled, configure `Authorization: Bearer <admin token>` in the client.
42+
43+
See the [MCP integration guide](https://fcb-docs.aiuo.net/en/guide/mcp).
3944

4045
## Simple, yet capable
4146

@@ -78,26 +83,6 @@ Open `http://localhost:12345` and complete first-run setup. Pin a version in pro
7883
- [API reference](https://fcb-docs.aiuo.net/en/api/) · upload, retrieval, and administration
7984
- [Frontend source](https://github.com/vastsa/FileCodeBoxFronted) · the active 2024 theme
8085

81-
## Related projects
82-
83-
If you enjoy self-hosted “box” tools, also check out this project from the same author:
84-
85-
### [BokeBox](https://github.com/vastsa/BokeBox/) · Private AI Podcast Box
86-
87-
Drop in videos, links, or drafts, and get listen-worthy personal podcasts with custom host persona and voice.
88-
89-
<p align="center">
90-
<a href="https://github.com/vastsa/BokeBox/">
91-
<img src="./.github/images/readme/bokebox/banner_en.webp" alt="BokeBox banner" width="860" />
92-
</a>
93-
</p>
94-
95-
<p align="center">
96-
<a href="https://github.com/vastsa/BokeBox/">
97-
<img src="./.github/images/readme/bokebox/home_en.webp" alt="BokeBox home" width="860" />
98-
</a>
99-
</p>
100-
10186
## Contributing
10287

10388
[Issues](https://github.com/vastsa/FileCodeBox/issues/new/choose) and pull requests are welcome. FileCodeBox is released under [LGPL-3.0](./LICENSE).

0 commit comments

Comments
 (0)