mcp-translate 1.0.1

Translation MCP server — translate text, detect languages, batch translate, translation memory (200+ languages, zero config)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# Translation MCP Server

[![Crates.io](https://img.shields.io/crates/v/mcp-translate.svg)](https://crates.io/crates/mcp-translate)
[![Docs.rs](https://docs.rs/mcp-translate/badge.svg)](https://docs.rs/mcp-translate)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
[![ADK-Rust Enterprise](https://img.shields.io/badge/ADK--Rust-Enterprise-purple.svg)](https://enterprise.adk-rust.com)
[![Registry Ready](https://img.shields.io/badge/ADK_Registry-Ready-green.svg)](https://enterprise.adk-rust.com)

Multilingual translation for [ADK-Rust Enterprise](https://enterprise.adk-rust.com) agents. Provides 5 MCP tools across 200+ languages — **zero configuration, no API keys required**.

## Architecture

<p align="center">
  <img src="https://raw.githubusercontent.com/zavora-ai/mcp-translate/main/docs/assets/architecture.svg" alt="Translation MCP Architecture" width="800"/>
</p>

## Key Principles

- **Zero configuration** — works out of the box with no API keys or environment variables.
- **200+ languages** — covers every major language including African, Asian, and indigenous languages.
- **Translation memory** — leverages millions of human-verified translations from MyMemory.
- **Quality scoring** — every translation includes a confidence/quality score.
- **Batch support** — translate into multiple languages in a single call.
- **Registry-ready** — ships with `mcp-server.toml` for automatic ADK-Rust Enterprise onboarding.

## Tools

| Tool | Purpose | Risk Class |
|------|---------|------------|
| `translate` | Translate text between any two languages | Read-only |
| `detect_language` | Detect the language of input text | Read-only |
| `batch_translate` | Translate text into multiple target languages at once | Read-only |
| `search_translation_memory` | Search human-verified translation memory | Read-only |
| `list_languages` | List supported languages with ISO 639-1 codes | Read-only |

## Backends

| Backend | Purpose | Rate Limit |
|---------|---------|-----------|
| MyMemory | Primary translation engine | 5,000 words/day (anonymous) |
| MyMemory (with email) | Extended quota | 30,000 words/day |

## Installation

### From crates.io

```bash
cargo install mcp-translate
```

### Build from source

```bash
git clone https://github.com/zavora-ai/mcp-translate
cd mcp-translate
cargo build --release
```

The binary is at `target/release/mcp-translate`.

### Claude Desktop

Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

```json
{
  "mcpServers": {
    "translate": {
      "command": "mcp-translate"
    }
  }
}
```

### Kiro

Add to your project's `.kiro/settings/mcp.json`:

```json
{
  "mcpServers": {
    "translate": {
      "command": "mcp-translate"
    }
  }
}
```

### Cursor

Add to `.cursor/mcp.json` in your project root:

```json
{
  "mcpServers": {
    "translate": {
      "command": "mcp-translate"
    }
  }
}
```

### Windsurf

Add to `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "translate": {
      "command": "mcp-translate"
    }
  }
}
```

### Codex (OpenAI)

Add to `~/.codex/config.json`:

```json
{
  "mcpServers": {
    "translate": {
      "command": "mcp-translate"
    }
  }
}
```

### Open Code

Add to `~/.config/opencode/config.json`:

```json
{
  "mcp": {
    "translate": {
      "command": "mcp-translate"
    }
  }
}
```

### Any MCP Client (Streamable HTTP)

```bash
mcp-translate --transport http --port 8080
```

Then connect your client to `http://localhost:8080/mcp`.

### Docker

```bash
docker run -p 8080:8080 ghcr.io/zavora-ai/mcp-translate:latest
```

## Quick Start

### Translate text

```json
{
  "name": "translate",
  "arguments": {
    "text": "The future of artificial intelligence is bright",
    "source": "en",
    "target": "sw"
  }
}
```

**Response:**

```json
{
  "translation": "Mustakabali wa akili bandia ni mzuri",
  "source_lang": "en",
  "target_lang": "sw",
  "quality": 0.85,
  "alternatives": [
    {
      "translation": "Mustakabali wa akili bandia ni mzuri",
      "quality": "85",
      "source": "Machine Translation"
    }
  ]
}
```

### Detect language

```json
{
  "name": "detect_language",
  "arguments": {
    "text": "Bonjour le monde, comment allez-vous?"
  }
}
```

**Response:**

```json
{
  "detected_language": "fr",
  "text_sample": "Bonjour le monde, comment allez-vous?"
}
```

### Batch translate

```json
{
  "name": "batch_translate",
  "arguments": {
    "text": "Hello world",
    "source": "en",
    "targets": ["fr", "de", "ja", "ar", "sw"]
  }
}
```

**Response:**

```json
{
  "source": "en",
  "original": "Hello world",
  "translations": [
    { "language": "fr", "translation": "Bonjour le monde" },
    { "language": "de", "translation": "Hallo Welt" },
    { "language": "ja", "translation": "こんにちは、世界。" },
    { "language": "ar", "translation": "مرحبا بكم" },
    { "language": "sw", "translation": "Jambo dunia!" }
  ]
}
```

### Search translation memory

```json
{
  "name": "search_translation_memory",
  "arguments": {
    "text": "Terms and conditions",
    "source": "en",
    "target": "fr"
  }
}
```

**Response:**

```json
{
  "query": "Terms and conditions",
  "langpair": "en|fr",
  "matches": 5,
  "results": [
    {
      "segment": "Terms and Conditions",
      "translation": "Termes et conditions",
      "quality": "100",
      "source": "European Commission",
      "last_updated": "2024-03-15"
    }
  ]
}
```

## Configuration

### Environment Variables

| Variable | Required | Purpose |
|----------|:--------:|---------|
| `MYMEMORY_EMAIL` | No | Increases daily quota from 5,000 to 30,000 words |
| `RUST_LOG` | No | Log level (default: `info`) |

### MCP Server Manifest

```toml
server_id = "mcp_translate"
display_name = "Translate"
version = "1.0.0"
domain = "translation"
risk_level = "low"
writes_allowed = "none"
transports = ["stdio"]
governance_gates = []
```

## Supported Languages

### Major Languages

| Code | Language | Code | Language | Code | Language |
|:----:|----------|:----:|----------|:----:|----------|
| `en` | English | `fr` | French | `de` | German |
| `es` | Spanish | `pt` | Portuguese | `it` | Italian |
| `nl` | Dutch | `ru` | Russian | `zh` | Chinese |
| `ja` | Japanese | `ko` | Korean | `ar` | Arabic |
| `hi` | Hindi | `bn` | Bengali | `ur` | Urdu |
| `tr` | Turkish | `pl` | Polish | `uk` | Ukrainian |
| `vi` | Vietnamese | `th` | Thai | `id` | Indonesian |

### African Languages

| Code | Language | Code | Language | Code | Language |
|:----:|----------|:----:|----------|:----:|----------|
| `sw` | Swahili | `am` | Amharic | `ha` | Hausa |
| `yo` | Yoruba | `ig` | Igbo | `zu` | Zulu |
| `af` | Afrikaans | `rw` | Kinyarwanda | `so` | Somali |

### Nordic Languages

| Code | Language | Code | Language | Code | Language |
|:----:|----------|:----:|----------|:----:|----------|
| `sv` | Swedish | `no` | Norwegian | `da` | Danish |
| `fi` | Finnish | `et` | Estonian | `lv` | Latvian |

### Special Codes

| Code | Meaning |
|:----:|---------|
| `auto` | Autodetect source language |

Full list of 200+ languages available via the `list_languages` tool or at [mymemory.translated.net](https://mymemory.translated.net/doc/languages.php).

## Use Cases

### Multilingual Customer Support
```
Agent receives message in unknown language
→ detect_language → "sw" (Swahili)
→ translate (sw→en) → English for agent processing
→ translate (en→sw) → Reply in customer's language
```

### Document Localization
```
Agent has English documentation
→ batch_translate (en → [fr, de, es, ja, zh])
→ 5 localized versions in one call
```

### Legal/Compliance Translation
```
Agent needs official translation reference
→ search_translation_memory ("Terms and conditions", en→fr)
→ Returns EU Commission verified translation (quality: 100%)
```

### Content Quality Assurance
```
Agent receives translation from external source
→ translate (same text, same pair)
→ Compare quality scores and alternatives
→ Flag discrepancies for human review
```

## Testing

```bash
# Build
cargo build

# Run (zero config)
cargo run

# Test with MCP client
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1"}}}' | cargo run 2>/dev/null
```

## Documentation

| Document | Description |
|----------|-------------|
| [mcp-server.toml]mcp-server.toml | ADK-Rust Enterprise registry manifest |
| [CHANGELOG.md]CHANGELOG.md | Version history |
| [Rust Docs]https://docs.rs/mcp-translate | Generated API documentation |

## Contributing

Contributions welcome. Priority areas:
- Additional translation backends (DeepL, Google Translate with API key)
- Glossary/terminology management
- Translation caching layer
- Document-level translation with formatting preservation

## Contributors

<!-- ALL-CONTRIBUTORS-LIST:START -->
| [<img src="https://github.com/jkmaina.png" width="80px;" alt=""/><br /><sub><b>James Karanja Maina</b></sub>]https://github.com/jkmaina |
|:---:|
<!-- ALL-CONTRIBUTORS-LIST:END -->

## License

Apache-2.0 — see [LICENSE](LICENSE) for details.

---

Part of the [ADK-Rust Enterprise](https://enterprise.adk-rust.com) MCP server ecosystem.

Built with ❤️ by [Zavora AI](https://zavora.ai)

## Registry Compliance

This server implements the [ADK MCP SDK](https://crates.io/crates/adk-mcp-sdk) contract:

- **HealthCheck** — async health probe for registry monitoring
- **mcp-server.toml** — manifest declaring tools, risk classes, and credentials
- **Structured tracing**`RUST_LOG` env-filter for observability