What is Lara Translate?
Lara Translate is a powerful translation API that offers language detection and context-aware translations, enabling users to translate text effectively across multiple languages.
How to use Lara Translate?
To use Lara Translate, you need to obtain API credentials from the Lara Translate website, and then you can make API calls to translate text by providing the necessary parameters such as source and target languages, context, and custom instructions.
Key features of Lara Translate?
- Automatic language detection for source text.
- Context-aware translations that improve accuracy based on provided hints.
- Support for multiple language pairs.
- Custom instructions to fine-tune translation behavior.
Use cases of Lara Translate?
- Translating conversations in real-time for multilingual communication.
- Enhancing translation quality for specific contexts, such as technical documents or casual chats.
- Integrating translation capabilities into applications for global reach.
FAQ from Lara Translate?
- Can Lara Translate detect languages automatically?
Yes! It can automatically detect the source language if not specified.
- Is there a limit to the number of languages supported?
No, Lara Translate supports numerous language pairs for translation.
- How do I set up the API?
You need to create an account on the Lara Translate website and generate API credentials.
Lara Translate MCP Server
MCP Server for Lara Translate API, enabling powerful translation capabilities with support for language detection and context-aware translations.
Features
- Language Detection: Automatic detection of source language when not specified
- Context-Aware Translations: Provide contextual hints to improve translation quality
- Custom Instructions: Fine-tune translation behavior with specific instructions
- Multi-Language Support: Translate between numerous language pairs
Tools
translate
- Translate text between languages with support for language detection and context-aware translations
- Inputs:
text
(array): An array of text blocks to translate, each with:text
(string): The text contenttranslatable
(boolean): Whether this block should be translated
source
(optional string): Source language code (e.g., 'en-EN' for English)target
(string): Target language code (e.g., 'it-IT' for Italian)context
(optional string): Additional context to improve translation qualityinstructions
(optional string[]): Instructions to adjust translation behaviorsource_hint
(optional string): Guidance for language detection
- Returns: Translated text blocks maintaining the original structure
Usage Examples
Prompt:
Translate with Lara "la terra è rossa", I'm talking with a tennis player.
API Input:
{
"text": [
{ "text": "la terra è rossa", "translatable": true }
],
"target": "en-US",
"context": "Conversation with a tennis player"
}
API Output:
[
{
"text": "The clay is red.",
"translatable": true
}
]
Setup
Lara Translate API Credentials
You need to obtain API credentials from Lara Translate:
- Go to the Lara website, subscribe any plan (including the free one)
- Create a new pair of Lara credentials in the API section of your account
Store them in a secure location. If lost they cannot be recovered, you will need to generate new ones.
Usage with Claude Desktop
To use this with Claude Desktop, add the following to your claude_desktop_config.json
:
Docker
{
"mcpServers": {
"lara-translate": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"LARA_ACCESS_KEY_ID",
"-e",
"LARA_ACCESS_KEY_SECRET",
"translatednet/lara-mcp:latest"
],
"env": {
"LARA_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY_ID>",
"LARA_ACCESS_KEY_SECRET": "<YOUR_ACCESS_KEY_SECRET>"
}
}
}
}
NPX
{
"mcpServers": {
"lara-translate": {
"command": "npx",
"args": ["-y", "@translated/lara-mcp"],
"env": {
"LARA_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY_ID>",
"LARA_ACCESS_KEY_SECRET": "<YOUR_ACCESS_KEY_SECRET>"
}
}
}
}
Local Development
Node
Build:
# Install dependencies
pnpm install
# Build
pnpm run build
Add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"lara-translate": {
"command": "node",
"args": ["<PROJECT_FOLDER>/dist/index.js"],
"env": {
"LARA_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY_ID>",
"LARA_ACCESS_KEY_SECRET": "<YOUR_ACCESS_KEY_SECRET>"
}
}
}
}
Docker
Build:
docker build -t lara-mcp .
Add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"lara-translate": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"LARA_ACCESS_KEY_ID",
"-e",
"LARA_ACCESS_KEY_SECRET",
"lara-mcp"
],
"env": {
"LARA_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY_ID>",
"LARA_ACCESS_KEY_SECRET": "<YOUR_ACCESS_KEY_SECRET>"
}
}
}
}