# Systran MCP

> Systran provides professional machine translation and deep linguistic analysis for your AI agent. It translates text between dozens of languages, detects source language automatically, performs dictionary lookups for specific terms, and extracts grammatical information from foreign texts.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** translation, localization, nlp, language-detection, linguistics

## Description

**Systran API MCP Server - Machine Translation & Linguistics**

Listen up. If your agent needs to handle anything outside plain English, you're gonna need this server. Systran isn't just a word swap; it's a deep linguistic toolkit that handles everything from basic text translation across dozens of languages right through to complex morphological analysis. You connect your AI client and suddenly your agent can deal with international texts like a pro.

### **Handling the Language Barrier**

First off, you don't gotta guess what language the source material is in. Your agent uses the `detect_language` tool to automatically identify the native language code—say, 'fr' or 'de'—from any text snippet you throw at it. It’s fast and accurate.

When you're ready to translate, there are a couple of ways you can run it. For small batches of text, you use `translate_text`. You send the source language and specify your target language; you can even leave that initial detection set to 'auto.' This converts those small strings into whatever tongue you need.

But what if you've got a whole document? Don't sweat it. The `translate_file` tool lets you process entire documents, and the best part is that it keeps the original formatting structure intact. You get the translation without losing the layout—no mess here.

### **Deep Linguistic Analysis**

You need more than just a good Google Translate replacement; you're running deep linguistic analysis. For serious work, your agent can pull out specific grammar data using `extract_morphology`. This process analyzes text segments to find all the grammatical components—you'll get parts of speech and detailed word forms back.

Need to know what a single term means? The `dictionary_lookup` tool checks definitions and translations. You can use professional dictionaries or custom ones you've set up, giving your agent precision when checking specific terms.

### **Workflow in Action**

Here’s how it works together: Your agent first uses the server to run `detect_language` on a new document. Once that source language is confirmed, if you need to translate small portions of text, you fire off `translate_text`. If those texts are part of a massive report, you use `translate_file`, knowing it'll preserve the original layout while converting the content across dozens of languages.

If your task requires verifying specialized jargon or getting technical definitions, you pass the term to `dictionary_lookup`—it handles both industry-standard and user-defined vocabulary. Finally, if the goal is pure academic analysis, running a piece through `extract_morphology` pulls out every grammatical detail: the parts of speech and how those words are formed. You're talking full linguistic depth here, not just superficial word swaps.

## Tools

### detect_language
Identifies the source language code (e.g., 'fr', 'de') from any given text snippet.

### dictionary_lookup
Checks definitions and translations for terms using either professional or custom dictionaries.

### extract_morphology
Analyzes a segment of text to pull out its grammatical components, like parts of speech and word forms.

### translate_file
Translates entire documents while preserving the original file format and layout structure.

### translate_text
Converts text from a source language to a target language, allowing 'auto' for initial detection.

## Prompt Examples

**Prompt:** 
```
Translate the following sentences to French: ['Hello world', 'How are you today?']
```

**Response:** 
```
I've translated your text using Systran. The results are: 'Bonjour le monde' and 'Comment allez-vous aujourd'hui ?'.
```

**Prompt:** 
```
Identify the language of this text: 'Guten Tag, wie kann ich Ihnen helfen?'
```

**Response:** 
```
The `detect_language` tool identified this text as German (de).
```

**Prompt:** 
```
Look up the term 'cloud computing' in the English to Spanish dictionary.
```

**Response:** 
```
Performing dictionary lookup... For 'cloud computing', the Spanish translation is 'computación en la nube'. It is categorized as a technical noun.
```

## Capabilities

### Detect Source Language
The tool automatically identifies the native language of any text you send it.

### Translate Text Strings
It translates small batches of text from a source language to a target language.

### Translate Entire Documents
You can process large files and receive the translation while keeping the original formatting structure.

### Look Up Vocabulary Terms
This tool provides definitions and translations for specific words using professional or custom dictionaries.

### Extract Grammar Data
It processes text to pull out morphological information, like parts of speech and word forms.

## Use Cases

### Handling an entire product catalog update
A team needs to localize 50 PDF manuals. They run `translate_file` on every document, preserving the original formatting and ensuring all technical diagrams are still readable in the target language. The agent tracks a request ID until all files are done.

### Building a multilingual chat bot
The chatbot receives an incoming message. It first runs `detect_language` to know if it's Spanish, Mandarin, or German. Then, it sends the text to `translate_text` (specifying 'auto') and continues the conversation in English.

### Validating legal compliance text
A researcher copies a snippet of foreign law. They run `detect_language` first, then use `dictionary_lookup` to confirm that key terms like 'tort' or 'jurisdiction' have the correct, verified translation for their target market.

### Deep linguistic analysis of literature
A linguist feeds a block of classical text into the server. First, they run `extract_morphology` to map every word's parts of speech. Then, they can use this structural data for deeper research beyond simple translation.

## Benefits

- The `translate_file` tool handles document translation without losing formatting, which is a massive time saver compared to manual copy-pasting and reformatting in a word processor.
- Instead of guessing the language, use `detect_language`. It reads any text and gives you the source code, guaranteeing your subsequent translations start correctly.
- Stop relying on general translation APIs. Use `dictionary_lookup` to verify specific industry terms against professional dictionaries before publishing content.
- The `extract_morphology` tool takes simple strings and breaks them down grammatically. This is essential if you need to build rules based on parts of speech, not just whole words.
- By combining `translate_text` with language detection, your agent automatically routes the text through the correct translation pipeline—no manual source language setting required.

## How It Works

The bottom line is: you connect your agent to Systran and tell it what linguistic task needs doing; everything else happens automatically.

1. Subscribe to the server and enter your unique Systran API Key.
2. Your AI client calls one of the five tools (e.g., `translate_text`).
3. The tool returns the processed data—whether it's a translation, a language code, or a dictionary definition.

## Frequently Asked Questions

**How does Systran handle translating a large PDF document using translate_file?**
The `translate_file` tool processes entire documents while keeping the original formatting intact. You submit the file, and the server handles the translation, ensuring that tables, headers, and layouts remain structured in the output.

**Can I use detect_language before translating text with translate_text?**
Yes. Running `detect_language` first guarantees your source language is correctly identified. This prevents errors when you run `translate_text`, especially if the input text contains mixed languages.

**What is the difference between dictionary_lookup and extract_morphology?**
`dictionary_lookup` verifies definitions and translations for specific terms in a glossary. `extract_morphology` analyzes grammar, showing you what parts of speech every word belongs to.

**Does translate_text handle text with HTML tags?**
Yes, the tool supports translating strings that contain HTML markup. This is useful when your content needs to maintain specific formatting like bolding or links after translation.

**What happens if I hit rate limits when using `detect_language`?**
The system returns a specific error code indicating you've exceeded the allowable requests per minute. You need to wait for the specified cooldown period or implement exponential backoff in your agent workflow.

**Does `translate_text` handle multiple distinct sentences, and what input format is best?**
Yes, it handles arrays of strings efficiently. When you have several separate sentences, passing them as a list or array guarantees that each item is treated as an independent translation unit.

**Can I use `extract_morphology` to correct grammar errors, or does it only analyze the text?**
It analyzes existing text; it doesn't fix grammar. The tool extracts grammatical tags and parts of speech from your input string for deep linguistic review.

**How should I manage authentication when calling `translate_file`?**
You must subscribe to the server first, which generates your required API key. You pass this credential directly through your AI client's connection setup before attempting any document translation.

**Can I translate HTML content while preserving the tags?**
Yes! Use the `translate_text` tool and set the `format` parameter to 'html'. The engine will translate the text content while keeping your HTML structure intact.

**How do I find the specific meaning of a technical term in another language?**
Use the `dictionary_lookup` tool. Provide the term in the `input` field along with the `source` and `target` language codes to get professional dictionary definitions and translations.

**Can the AI identify a language if I don't know what it is?**
Absolutely. Use the `detect_language` tool with any text input. The server will return the detected language code and confidence level.