Skip to main content
Glama

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

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).

Related MCP server: DeepL MCP Server

Install

npx -y dualtran-mcp            # once published to npm
# 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.

Available Tools

3 tools
list_enginesList EnginesA

Report which translation engines are available and how the AI engine is configured (never the key itself).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It helpfully discloses that the AI engine key is never returned, which is real information beyond structured fields, but it says nothing about whether this is a network call, its cost/latency, caching, or the shape of the result.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; what the tool reports and the key-redaction caveat both land immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a trivial read-only, zero-parameter listing tool with no output schema, the description covers what is returned well enough for correct invocation. A brief note on result format or that it requires a configured backend would close the remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing for the description to disambiguate; the baseline for a parameterless tool applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('report') and two concrete resources (available translation engines, AI engine configuration), so the agent knows exactly what comes back. It is inherently distinct from the translate_* siblings, though it never names them explicitly to reinforce the contrast.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to call this versus translate_text/translate_batch, nor any prerequisite or ordering guidance. The discovery use-case (check engines before translating) is inferable only from the purpose, not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

translate_batchTranslate BatchA

Translate up to 50 texts in one call (one batched Google request, or one AI call per text).

ParametersJSON Schema
NameRequiredDescriptionDefault
textsYesThe texts to translate, in order.
engineNoTranslation engine override: google (free) or ai (BYOK).
source_langNoSource language code, or "auto" to detect. Defaults to auto.
target_langNoTarget language code (e.g. en, zh-CN, ja). Defaults to the server config.

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose a meaningful behavioral trait: the engine-dependent call pattern ('one batched Google request, or one AI call per text'), which has latency/cost implications. However it says nothing about per-text failure handling, partial results, result ordering, or BYOK/auth requirements for the ai engine.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with the core batch capability front-loaded and a compact parenthetical for the engine nuance. Nothing is redundant and the size matches the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter batch tool with no annotations, no output schema, and a 50-item input, the description is adequate but thin: it omits how partial failures or ordering are handled and what auth the ai engine needs. The description need not cover return values, but batch failure semantics are a real gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents texts, engine, source_lang, and target_lang; baseline of 3 applies. The description reinforces the 50-item cap and hints that the engine choice changes call behavior, but adds no format or default details beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Translate ... texts') plus a concrete capacity ceiling ('up to 50 texts in one call'), which distinguishes it from the singular translate_text sibling. It stops short of naming the sibling or contrasting directly against it, so differentiation is inferable rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'up to 50 texts in one call' phrasing implies this is the batch alternative to translate_text, giving usable but implicit guidance. No explicit when-to-use, when-not-to-use, or reference to translate_text / list_engines is provided, so the agent must infer the routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

translate_textTranslate TextB

Translate one piece of text with Google or the configured AI provider (BYOK).

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe text to translate.
engineNoTranslation engine override: google (free) or ai (BYOK).
source_langNoSource language code, or "auto" to detect. Defaults to auto.
target_langNoTarget language code (e.g. en, zh-CN, ja). Defaults to the server config.

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full disclosure burden, yet it only restates the engine choice already documented in the schema enum ("google" free vs "ai" BYOK). It says nothing about rate limits, auth/BYOK setup requirements, defaults applied, or failure behavior for a tool that depends on external providers.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the action first and the qualifier (engine/provider) after. No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description should carry more weight than it does. The schema covers the parameters well, but the description is silent on what is returned and on the BYOK configuration dependency implied by "the configured AI provider".

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents text, engine, source_lang, and target_lang with defaults and examples. The description confirms the single-text scope but adds no format, language-code, or engine-selection detail beyond the schema, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ("Translate one piece of text") and names the backends used, scoping it to a single item which implicitly sets it apart from the translate_batch sibling. It stops short of explicitly naming that sibling, so the differentiation must be inferred from the word "one".

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase "one piece of text" implies the single-item case versus a batch, but no explicit when-to-use, when-not-to-use, or alternative routing (e.g., translate_batch or list_engines) is stated. Usage is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedlist_engines
    • First observedtranslate_batch
    • First observedtranslate_text

TDQS

A3.7/5.0

Scored across 3 tools

Disambiguation5/5

The three tools have clearly distinct purposes: single-text translation, batched translation, and engine introspection. An agent can easily select the right one with no overlap.

Naming Consistency5/5

All names follow a consistent snake_case verb_noun pattern (translate_text, translate_batch, list_engines). The convention is predictable and readable.

Tool Count4/5

Three tools is at the low end but reasonable for a narrow translation-focused server. Each tool earns its place, though the surface is slightly thin.

Completeness4/5

Core translation workflows (single, batch) plus engine introspection are covered. Minor gaps like explicit per-call engine selection or language detection could be worked around.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers