🚀 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