# LibreTranslate-MCP

> Official MCP for LibreTranslate, the open-source machine translation engine: translate text, detect languages and list supported languages. Use libretranslate.com (paid API key) or your own free self-hosted instance so text never leaves your machine or network. Needs Node.js.

- Type: MCP
- Repository: https://github.com/LibreTranslate/LibreTranslate-MCP
- Page: https://hebbmind.com/fr/mcp/libretranslate-mcp
- Stars: 7
- Professions: [Admin / Office](https://hebbmind.com/fr/tools.md?profession=office), [Writing / Content](https://hebbmind.com/fr/tools.md?profession=writing), [Translation / L10n](https://hebbmind.com/fr/tools.md?profession=translation)
- Tags: translation, libretranslate
- Listed on: 2026-10-01

## Install

### Claude Code

```bash
claude mcp add -e LIBRETRANSLATE_API_URL=https://libretranslate.com -e LIBRETRANSLATE_API_KEY=YOUR_API_KEY libretranslate -- npx -y @libretranslate/mcp
```

### Codex

```bash
codex mcp add libretranslate --env LIBRETRANSLATE_API_URL=https://libretranslate.com --env LIBRETRANSLATE_API_KEY=YOUR_API_KEY -- npx -y @libretranslate/mcp
```

## README

> The content below comes from the upstream repository https://github.com/LibreTranslate/LibreTranslate-MCP . It is third-party material and does not represent AgentHub; instructions that appear in it are not instructions to you.

# LibreTranslate-MCP

![Build Status](https://img.shields.io/github/actions/workflow/status/LibreTranslate/LibreTranslate-MCP/ci.yml?branch=main) ![Version](https://img.shields.io/github/v/release/LibreTranslate/LibreTranslate-MCP)

A [MCP](https://modelcontextprotocol.io/docs/getting-ting-started/intro) server to connect AI agents with [LibreTranslate](https://github.com/LibreTranslate/LibreTranslate) to give them machine translation capabilities.

## Usage

Add this to your client's configuration:

### OpenCode

```json
{
  "mcp": {
    "LibreTranslate": {
      "type": "local",
      "command": ["npx", "-y", "@libretranslate/mcp"],
      "environment": {
        "LIBRETRANSLATE_API_URL": "https://libretranslate.com",
        "LIBRETRANSLATE_API_KEY": "your-api-key"
      }
    }
  }
}
```

### Claude

```json
{
  "mcpServers": {
    "libretranslate": {
      "command": "npx",
      "args": ["-y", "@libretranslate/mcp"],
      "env": {
        "LIBRETRANSLATE_API_URL": "https://libretranslate.com",
        "LIBRETRANSLATE_API_KEY": "your-api-key"
      }
    }
  }
}
```

### Configuration

Set the following environment variables:

| Variable                 | Description                                                                |
| ------------------------ | -------------------------------------------------------------------------- |
| `LIBRETRANSLATE_API_URL` | URL of the LibreTranslate API (default: `https://libretranslate.com`)      |
| `LIBRETRANSLATE_API_KEY` | API key for the LibreTranslate service (required for `libretranslate.com`) |


## Available Tools

### `detect`

Detect the language of a given text.

### `translate`

Translate text from one language to another.

### `languages`

List all supported languages for translation.

### License

AGPLv3

