mcpField
D
dualtran-mcp

dualtran-mcp

Local
github.com/seigwenProductivity0Updated 2d ago

About dualtran-mcp

dualtran-mcp is a translation MCP server for people using MCP clients. It translates with Google or a user-configured AI provider, and supports both individual texts and batches of up to 50.

Key features

  1. 01Translate text with Google or AI
  2. 02Translate batches of up to 50 texts
  3. 03Set source and target languages
  4. 04List engines and AI configuration

Use cases

  1. 01Translate individual text from an MCP client
  2. 02Translate a batch of text in one call

MCP support

It exposes translation and engine-information tools to MCP clients, including `translate_text`, `translate_batch`, and `list_engines`.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"seigwen-dualtran": {
"command": "npx",
"args": [
"-y",
"dualtran-mcp"
],
"env": {
"DUALTRAN_PROVIDER": "<DUALTRAN_PROVIDER>",
"DUALTRAN_API_KEY": "<DUALTRAN_API_KEY>",
"DUALTRAN_MODEL": "<DUALTRAN_MODEL>",
"DUALTRAN_TARGET_LANG": "<DUALTRAN_TARGET_LANG>"
}
}
}
}
Run commandnpx -y dualtran-mcp
Environment variables to set
DUALTRAN_PROVIDERAI provider id (openai, anthropic, google, deepseek, ...). Optional — Google works without a key.
DUALTRAN_API_KEYSecretAPI key for the selected AI provider (BYOK). Optional.
DUALTRAN_MODELModel id for the AI provider (e.g. gpt-4o-mini). Optional.
DUALTRAN_TARGET_LANGDefault target language code (default: en).

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmdualtran-mcp0.1.0

Tools

3

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
textstringYesThe text to translate.
engineenumNoTranslation engine override: google (free) or ai (BYOK).google | ai
source_langstringNoSource language code, or "auto" to detect. Defaults to auto.
target_langstringNoTarget language code (e.g. en, zh-CN, ja). Defaults to the server config.

Details

From the project 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

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-mini
DUALTRAN_BASE_URL=              # optional endpoint override
DUALTRAN_TARGET_LANG=en         # default target language
DUALTRAN_ENGINE=google          # default engine: google | ai

or with ~/.dualtran/config.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):

{
  "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

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

License

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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.