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
- 01Translate text with Google or AI
- 02Translate batches of up to 50 texts
- 03Set source and target languages
- 04List engines and AI configuration
Use cases
- 01Translate individual text from an MCP client
- 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.
npx -y dualtran-mcpDUALTRAN_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.
Tools
3Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | The text to translate. |
| engine | enum | No | Translation engine override: google (free) or ai (BYOK).google | ai |
| source_lang | string | No | Source language code, or "auto" to detect. Defaults to auto. |
| target_lang | string | No | Target language code (e.g. en, zh-CN, ja). Defaults to the server config. |
Details
From the project READMEdualtran-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
| Tool | What it does |
|---|---|
translate_text | Translate one piece of text. Optional target_lang, source_lang, engine (google | ai). |
translate_batch | Translate up to 50 texts in one call (one batched Google request). |
list_engines | Report 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
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.