Lara Translate MCP Server

Lara Translate MCP Server

An MCP server providing machine translation capabilities via the Lara Translate API, featuring language detection and context-aware translations between numerous language pairs.

translated

Research & Data
Visit Server

Tools

translate

Translate text between languages with support for language detection and context-aware translations.

README

Lara Translate MCP Server

A Model Context Protocol (MCP) Server for Lara Translate API, enabling powerful translation capabilities with support for language detection and context-aware translations.

Table of Contents

Introduction

What is MCP?

Model Context Protocol (MCP) is a standardized communication protocol that allows AI applications to connect with external tools and services. MCP servers act as bridges between AI models and specific functionalities, enabling AI applications to perform specialized tasks beyond their built-in capabilities.

How Lara Translate MCP Works

The Lara Translate MCP Server enables AI applications to access Lara Translate API. When integrated with an MCP-compatible AI application:

  1. Connection: The AI application connects to the Lara Translate MCP Server
  2. Request: When translation is needed, the application sends a structured request to the MCP server
  3. Processing: The MCP server forwards the request to Lara Translate's API
  4. Response: Translation results are returned to the AI application

This integration allows AI applications to seamlessly incorporate high-quality translations into their workflows without needing to directly implement the translation API.

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

Available Tools

  1. 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 content
        • translatable (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 quality
      • instructions (optional string[]): Instructions to adjust translation behavior
      • source_hint (optional string): Guidance for language detection
    • Returns: Translated text blocks maintaining the original structure

Prerequisites

Before installing, you need to:

  1. Obtain API credentials from Lara Translate:
    • Create an account on the Lara website
    • Subscribe to any plan (including the free tier)
    • Navigate to the API section in your account
    • Generate a new pair of Lara API credentials
    • Store your LARA_ACCESS_KEY_ID and LARA_ACCESS_KEY_SECRET securely

Note: If you lose your credentials, they cannot be recovered, and you'll need to generate new ones.

Installation & Setup

There are three ways to install and run the Lara Translate MCP Server:

Option 1: Using Docker (recommended)

This option requires Docker to be installed on your system.

  1. Add the following to your MCP configuration file:
{
  "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>"
      }
    }
  }
}
  1. Replace <YOUR_ACCESS_KEY_ID> and <YOUR_ACCESS_KEY_SECRET> with your actual Lara API credentials.

Option 2: Using NPX

This option requires Node.js to be installed on your system.

  1. Add the following to your MCP configuration file:
{
  "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>"
      }
    }
  }
}
  1. Replace <YOUR_ACCESS_KEY_ID> and <YOUR_ACCESS_KEY_SECRET> with your actual Lara API credentials.

Option 3: Building from Source (recommended for development)

Using Node.js

  1. Clone the repository:
git clone https://github.com/translated/lara-mcp.git
cd lara-mcp
  1. Install dependencies and build:
# Install dependencies
pnpm install

# Build
pnpm run build
  1. Add the following to your MCP configuration file:
{
  "mcpServers": {
    "lara-translate": {
      "command": "node",
      "args": ["<FULL_PATH_TO_PROJECT_FOLDER>/dist/index.js"],
      "env": {
        "LARA_ACCESS_KEY_ID": "<YOUR_ACCESS_KEY_ID>",
        "LARA_ACCESS_KEY_SECRET": "<YOUR_ACCESS_KEY_SECRET>"
      }
    }
  }
}
  1. Replace:
    • <FULL_PATH_TO_PROJECT_FOLDER> with the absolute path to your project folder
    • <YOUR_ACCESS_KEY_ID> and <YOUR_ACCESS_KEY_SECRET> with your actual Lara API credentials.

Building a Docker Image

  1. Clone the repository:
git clone https://github.com/translated/lara-mcp.git
cd lara-mcp
  1. Build the Docker image:
docker build -t lara-mcp .
  1. Add the following to your MCP configuration file:
{
  "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>"
      }
    }
  }
}
  1. Replace <YOUR_ACCESS_KEY_ID> and <YOUR_ACCESS_KEY_SECRET> with your actual credentials.

Configuration Location

The MCP configuration file location depends on the AI application you're using. Common locations include:

  • Claude Desktop:

    • Windows: %APPDATA%\Claude Desktop\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude Desktop/claude_desktop_config.json
    • Linux: ~/.config/Claude Desktop/claude_desktop_config.json
  • Other Applications: Refer to the specific application's documentation for configuration file location

If the configuration file doesn't exist, you'll need to create it.

Verifying Installation

After setting up the MCP server and restarting your AI application:

  1. Open your MCP-compatible application
  2. Check if the translation functionality is available by trying a simple translation command:
    Translate with Lara "Hello world" to Spanish
    

Usage Examples

Basic Translation

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
    }
]

With Instructions

Prompt:

Translate with Lara "Buongiorno, come stai?" to English, use a formal tone.

API Input:

{
    "text": [
        { "text": "Buongiorno, come stai?", "translatable": true }
    ],
    "target": "en-US",
    "instructions": ["Use a formal tone"]
}

API Output:

[
    {
        "text": "Good morning, how are you?",
        "translatable": true
    }
]

Support

For issues with Lara Translate API, contact Lara Support.

For issues with this MCP Server, open an issue on the GitHub repository.

License Docker Pulls npm downloads

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python