# LibreTranslate API MCP

> LibreTranslate API MCP Server connects your AI agent directly to an open-source, free language service. It lets you translate text between dozens of languages and detect the primary language of any string—all without logging into a separate translation portal. You can audit language support, check the API status, and get language codes instantly for localization projects or content research.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** machine-translation, language-detection, open-source, api-integration, text-processing

## Description

This server connects your AI agent straight to LibreTranslate, an open-source service you can rely on for multilingual data handling. You get direct access to translate texts across dozens of languages and pinpoint what language any string is written in—all without needing a separate login or paying fees. It's the whole kit and caboodle for localization projects right inside your agent’s conversation flow.

Before you do anything else, you should run `check_api_status`. This tool gives you a quick confirmation that the entire translation service is currently active and ready for calls. You gotta verify it's up and running before you waste time sending requests that might fail.

Need to know what languages you can even translate? Use `list_supported_languages`. This pulls the complete, current catalog of language codes and names available in the LibreTranslate instance. It’s your definitive source for ensuring your content covers every script or locale you need to support.

When you've got the list, let's talk about detection. If you pass any text string into `detect_language`, it analyzes that input and returns two things: its detected language code and a confidence score. That score tells you just how sure the service is about the identification—that’s crucial for reliable data pipelines.

Once you know what language you're dealing with, you can translate. The `translate_text` tool takes three required inputs from you: the source text, the source language code, and the target language code. It then executes the translation process and returns the translated string. You’ll pass in everything you need to get that clean output right away.

Your agent handles the whole workflow—from checking the status first, listing available languages for discovery, identifying an unknown string's primary language, all the way through translating it into a specific target script. It keeps your entire multilingual process running smoothly and without unexpected failures.

## Tools

### check_api_status
Runs a quick check to confirm that the LibreTranslate service is currently operational.

### detect_language
Analyzes any text string you provide and returns its detected language code and confidence score.

### list_supported_languages
Retrieves the complete, up-to-date list of all languages available for translation within the instance.

### translate_text
Translates provided text from a source language to a target language using LibreTranslate's service.

## Prompt Examples

**Prompt:** 
```
Translate 'Hello world' from English to Portuguese using LibreTranslate.
```

**Response:** 
```
I've translated the text for you! 'Hello world' in Portuguese is identified as 'Olá mundo'. Would you like the full JSON response or a different target language audit?
```

**Prompt:** 
```
Detect the language of the text 'C'est la vie'.
```

**Response:** 
```
I've analyzed the text! It is identified as French (fr) with a confidence score of 99%. I can provide the full metadata list of supported languages if you'd like to confirm.
```

**Prompt:** 
```
List all languages supported by LibreTranslate.
```

**Response:** 
```
I've retrieved the language catalog! There are dozens of languages supported, including English, Spanish, French, and Chinese. I can help you translate text between any of these thematic markers.
```

## Capabilities

### Translate text between specific languages
The agent takes source text, a source language code, and a target language code to return the translated string.

### Identify a string's primary language
You pass any text, and the tool returns its detected language code and confidence level.

### List all supported languages
The agent retrieves the full catalog of language codes and names available in the LibreTranslate instance.

### Verify API operational status
You check this tool first to confirm that the translation service is currently active and ready for calls.

## Use Cases

### Building a multilingual help center
A technical writer wants to ensure their documentation covers French, German, and Japanese. Instead of checking three different translation tools, they prompt their agent: 'List all languages supported.' The agent runs `list_supported_languages`, confirms the needed codes are available, and then uses `translate_text` iteratively to create localized sample content.

### Processing incoming user feedback
A customer service bot receives a support ticket written in an unknown language. The agent immediately runs `detect_language` on the text, identifies it as Italian (it wasn't expected), and then uses `translate_text` to translate the issue into English for the human team to review.

### Validating API translations in code
A developer needs to verify that a specific key phrase translates correctly into six different languages. They use `list_supported_languages` to confirm all six codes, then loop through the set, running `translate_text` for each pair (English -> French, English -> German, etc.) and logging the results.

### Pre-flight check on a localization build
Before deploying content to 50 countries, an ops lead runs a full system audit. They first run `check_api_status` to make sure the translation service is stable, then use `detect_language` on sample strings from all target markets to confirm language detection accuracy across the board.

## Benefits

- Stop manually checking language support. Use `list_supported_languages` to get the full catalog of supported scripts, ensuring your content plan covers every needed market before a single word is written.
- Cut down on development guesswork. Run `detect_language` to confirm what language an incoming user string belongs to—this prevents data loss and lets you tailor the rest of the application's flow immediately.
- Audit entire documents for consistency. Send high-resolution text through `translate_text` to maintain a clear view of semantic distribution across multiple target languages, making content review fast.
- Eliminate integration failure risk. Always run `check_api_status` first. This simple check confirms the translation service is up and running before your agent attempts any heavy language processing tasks.
- Handle complex data flows easily. Your agent uses these tools to build a full localization pipeline: detect -> validate languages -> translate. You never have to switch between services.

## How It Works

The bottom line is: you just talk to your agent, and it handles all the language logic behind the scenes.

1. Subscribe to the server. You may need to provide your specific LibreTranslate API Key or custom instance URL.
2. Your AI client uses a natural prompt (e.g., 'Translate X from English to Spanish'). The agent determines which tool to run and gathers necessary parameters (text, source language, target language).
3. The server executes the call to LibreTranslate, processes the result, and returns the clean data—be it a translated string or a confidence score—to your AI client for use.

## Frequently Asked Questions

**How do I use LibreTranslate API MCP Server for basic translation?**
You tell your agent the source text, the source language, and the target language. The agent executes `translate_text` and returns the translated string directly.

**Can LibreTranslate API MCP Server detect languages I haven't seen before?**
The `detect_language` tool is designed to analyze text strings against its internal model. While it has high accuracy, extreme edge cases or highly specialized jargon might require human review.

**What should I do if the LibreTranslate API seems broken?**
Always run `check_api_status` first. This tool verifies the connection and service health. If it reports an error, you know the problem is with the server, not your code.

**How do I find out all languages LibreTranslate supports?**
Simply call `list_supported_languages`. This gives you the full, current catalog of available language codes and names so you can plan your localization efforts accurately.

**When I use the `detect_language` tool with LibreTranslate API MCP Server, what specific linguistic data do I receive?**
You get two key pieces of information: the primary language code and a confidence score. The score indicates how certain the system is about that identification. Use this metric to validate your content before passing it for translation.

**If I want to translate text, should I always use `detect_language` first with LibreTranslate API MCP Server?**
It's best practice. Running detection first confirms the source language and provides a confidence score. This helps you avoid translation errors that happen when your initial language assumption is incorrect.

**How can I manage request volume or potential rate limits when using LibreTranslate API MCP Server?**
The operational limits are tied to the server instance you connect to. If you hit a ceiling, you'll need to implement backoff logic in your agent code or switch to a higher-tier custom endpoint.

**What happens if I configure my own API key when using `translate_text` with LibreTranslate API MCP Server?**
You connect directly to your specific, private instance. This lets you bypass default servers and route data through a dedicated endpoint URL or custom key for better control.

**Is an API Key required for LibreTranslate API?**
No. LibreTranslate is open-source and many public instances allow free requests. However, some instances or the official site may require an API Key for higher limits.

**Can I use a custom self-hosted instance?**
Yes. Provide the `LIBRETRANSLATE_URL` in the server configuration to point your agent to your own private instance.

**Does it support language detection?**
Yes. Use the `detect_language` tool to identify the primary language of any text string along with a confidence metadata score.