🚀 Bluente Translate MCP Server
AI 驱动。保留格式。专为专业文档翻译工作流打造。

bluente-translate-mcp-server 是 Bluente 官方开源 MCP 服务器,用于向 AI 客户端开放 Bluente 翻译能力。
它将 Bluente API 封装为生产级 MCP 工具,让团队可以从 Claude Desktop、Cursor 以及其他兼容 MCP 的运行时中自动化多语言文档工作流。
🎯 为什么选择 Bluente
Bluente 专注于企业级文档翻译,尤其关注准确性、格式完整性和速度。
根据 Bluente.com 和 Blu Translate,核心产品定位如下:
- 面向专业用例的 AI 驱动翻译
- 面向以文档为中心的工作流保留原始版式
- 广泛的语言和文件类型支持
- 对敏感内容采用安全优先的处理方式
本 MCP 服务器通过标准协议接口,将这些能力引入智能体工作流。
🏷️ 品牌标识
本仓库由 Bluente 维护,是 Bluente 公共开发者生态的一部分。
📑 目录
- ✨ 你能获得什么
- 🏗️ 架构
- 🔌 支持的 Bluente API
- 🧰 MCP 工具
- 🚀 快速开始
- 🔗 MCP 客户端集成
- 📌 运维说明
- 🔐 安全
- 🗺️ 路线图
- 🤝 贡献与治理
- 📄 许可证
✨ 你能获得什么
- 模块化 Node.js MCP 服务器,分层清晰(
config、client、service、tools)
- 每个工具一个文件,便于维护
- 统一的工具响应封装(
ok/tool/data 和结构化错误)
- 端到端翻译工作流工具(上传 -> 启动 -> 轮询 -> 下载)
- CI 检查与本地冒烟测试
🏗️ 架构
AI Client (Claude / Cursor / Agents)
|
| MCP (stdio)
v
+---------------------------------------+
| Bluente Translate MCP Server |
| |
| tools/ -> MCP tool handlers |
| services/ -> workflow orchestration |
| clients/ -> Bluente HTTP API client |
| config/ + lib/ -> env/errors/results |
+---------------------------------------+
|
| HTTPS
v
Bluente Translation APIs
项目布局:
src/
clients/bluente-http-client.js
config/env.js
constants/api.js
lib/errors.js
lib/mcp-result.js
services/translation-workflow-service.js
tools/*.tool.js
tools/schemas.js
tools/register-tools.js
server.js
index.js
tests/smoke/core-smoke.test.js
🔌 支持的 Bluente API
GET /blu_translate/supported_languages
POST /blu_translate/upload_file
GET /blu_translate/get_translation_status
POST /blu_translate/translate_file
GET /blu_translate/download_file
参考:Bluente API 文档
🧰 MCP 工具
bluente_get_supported_languages
bluente_upload_file
bluente_get_translation_status
bluente_translate_file
bluente_download_file
bluente_translate_document_workflow
工具行为说明:
bluente_translate_file:当 action="start" 时,from 和 to 为必填;当 action="cancel" 时为可选。
bluente_translate_document_workflow:status_entry 可配置(pdf 或 word),用于状态轮询。
成功响应封装:
{
"ok": true,
"tool": "bluente_upload_file",
"data": {
"code": 0,
"message": "success",
"data": { "id": "task_xxx" }
}
}
错误响应封装:
{
"isError": true,
"ok": false,
"tool": "bluente_translate_file",
"error": {
"name": "BluenteApiError",
"message": "Bluente API request failed.",
"details": { "status": 401 }
}
}
🚀 快速开始
1. 环境要求
- Node.js
>= 20
- Bluente API 密钥
2. 安装
npm install
cp .env.example .env
3. 配置
BLUENTE_API_KEY=your_api_key_here
BLUENTE_API_BASE_URL=https://api.bluente.com/api/20250924
BLUENTE_API_TIMEOUT_MS=90000
4. 运行
npm start
5. 本地验证
npm run check
npm test
🔗 MCP 客户端集成
Claude Desktop 示例:
{
"mcpServers": {
"bluente-translate": {
"command": "node",
"args": ["/absolute/path/to/bluente-translate-mcp-server/src/index.js"],
"env": {
"BLUENTE_API_KEY": "your_api_key_here",
"BLUENTE_API_BASE_URL": "https://api.bluente.com/api/20250924",
"BLUENTE_API_TIMEOUT_MS": "90000"
}
}
}
}
📌 运维说明
- 工作流工具会轮询,直到进入终态(
READY 或 ERROR)。
- 可通过
auto_download=false 禁用输出下载。
- 超时可通过
BLUENTE_API_TIMEOUT_MS 配置。
- 生产环境请为每个环境使用单独的 API 密钥。
🔐 安全
- 不要提交 API 密钥或
.env 文件。
- 泄露的密钥请立即轮换。
- 使用仓库的私有漏洞报告功能。
披露政策见 SECURITY.md。
🗺️ 路线图
- 如果公共 API 文档中开放,则添加文本翻译工具
- 添加带 API mocking 的更丰富集成测试
- 添加容器镜像和一键本地启动配置
🤝 贡献与治理
- 贡献指南:CONTRIBUTING.md
- 安全政策:SECURITY.md
- 变更日志:CHANGELOG.md
- 代码所有权:.github/CODEOWNERS
🏢 关于 Bluente
Bluente 为专业团队构建 AI 翻译和商务沟通解决方案。
📄 许可证
MIT