Dualtran Mcp

io.github.seigwen由 GitHub 账号 seigwen 发布v0.1.0更新于 Oct 24, 2026

Translate text with Google or your own AI model (BYOK, 20+ providers) from any MCP client.

概览

AI 生成的概览

本地 MCP 服务器,让助手在任意 MCP 客户端中用 Google 或自带的 AI 模型密钥翻译文本。

可以做什么
  • 翻译单段文本,可指定目标语言、源语言和引擎(Google 或 AI)
  • 一次调用批量翻译最多 50 段文本
  • 列出可用的翻译引擎以及 AI 配置状态,且不会暴露密钥
适用场景
适合在编辑器或聊天客户端中让助手翻译单段文本或成批字符串,可使用免费的 Google 翻译,也可使用自己的模型服务商账号。
运行要求
通过 npx 在本地运行(需要 Node.js)。Google 翻译无需密钥或账号。可选的 AI 引擎需要服务商标识、模型和 API 密钥,可通过 DUALTRAN_PROVIDER、DUALTRAN_MODEL、DUALTRAN_API_KEY 等环境变量或主目录下的配置文件设置,环境变量优先。需要能访问所选翻译服务的网络。
安装前请注意
AI 引擎需要你自己的服务商 API 密钥,密钥保存在环境变量或主目录配置文件中,使用可能由该服务商计费。翻译时文本会发送给所选的翻译服务。服务器声明不含分析统计,也没有开发者服务器。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Dualtran Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

dualtran-mcp

An MCP (Model Context Protocol) server that translates text with Google or your own AI model (BYOK, 20+ providers) — usable from Claude Code, Claude Desktop, Cursor, Cline, VS Code and any other MCP client. Powered by @dualtran/core, the engine extracted from the DualTran browser extension.

Tools

ToolWhat it does
translate_textTranslate one piece of text. Optional target_lang, source_lang, engine (google | ai).
translate_batchTranslate up to 50 texts in one call (one batched Google request).
list_enginesReport available engines and the AI configuration state (never the key).

Install

bash
npx -y dualtran-mcp# or straight from this repository (works today, no registry needed):npx -y github:seigwen/dualtran-mcp

Configure

Google works out of the box — no key, no account.

For the AI engine (optional), configure a provider once — either with environment variables:

DUALTRAN_PROVIDER=openai        # openai | anthropic | google | deepseek | mistral | groq | xai | …DUALTRAN_API_KEY=sk-…DUALTRAN_MODEL=gpt-4o-miniDUALTRAN_BASE_URL=              # optional endpoint overrideDUALTRAN_TARGET_LANG=en         # default target languageDUALTRAN_ENGINE=google          # default engine: google | ai

or with ~/.dualtran/config.json:

json
{ "provider": "openai", "apiKey": "sk-…", "model": "gpt-4o-mini", "targetLang": "en", "engine": "ai" }

Environment variables win over the file.

Client configuration

Claude Code (.mcp.json in the project, or claude mcp add):

json
{  "mcpServers": {    "dualtran": {      "command": "npx",      "args": ["-y", "github:seigwen/dualtran-mcp"],      "env": { "DUALTRAN_TARGET_LANG": "en" }    }  }}

Cursor (~/.cursor/mcp.json) and Cline / other clients: same shape — command: npx, args: ["-y", "github:seigwen/dualtran-mcp"], optional env.

Privacy

No analytics, no accounts, no developer server. Text goes only to the translation service you chose, at the moment you translate. See PRIVACY.md.

Development

bash
node scripts/sync-core.mjs   # vendors @dualtran/core into vendor/ (committed)npm installnpm test                     # tsc build + vitest (in-memory server, real stdio e2e, stdout purity scan)

License

MIT — the bundled @dualtran/core portion is MPL-2.0.

Languages

The engine itself has no interface: strings this package exposes are MCP tool names/descriptions and parameter docs, which LLM clients and protocol tooling consume in English. Localising them would hurt discoverability, so they stay English by policy. Any future user-facing surface must follow the DualTran i18n standard (38 catalogues, locales/<code>/messages.json).

来源:README.md,提交 31bab75

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。