Serveur MCP
LibreTranslate peut fournir des capacités de traduction automatique aux agents IA qui prennent en charge le protocole MCP.
Configuration
Section intitulée « Configuration »Ajoutez ceci à la configuration de votre client :
OpenCode
Section intitulée « OpenCode »{ "mcp": { "LibreTranslate": { "type": "local", "command": ["npx", "-y", "@libretranslate/mcp"], "environment": { "LIBRETRANSLATE_API_URL": "https://libretranslate.com", "LIBRETRANSLATE_API_KEY": "your-api-key" } } }}{ "mcpServers": { "libretranslate": { "command": "npx", "args": ["-y", "@libretranslate/mcp"], "env": { "LIBRETRANSLATE_API_URL": "https://libretranslate.com", "LIBRETRANSLATE_API_KEY": "your-api-key" } } }}| Variable | Description |
|---|---|
LIBRETRANSLATE_API_URL | URL de l’API LibreTranslate (par défaut : https://libretranslate.com) |
LIBRETRANSLATE_API_KEY | Clé API pour le service LibreTranslate (requise pour libretranslate.com) |
Outils disponibles
Section intitulée « Outils disponibles »Détecter la langue d’un texte donné.
translate
Section intitulée « translate »Traduire un texte d’une langue à une autre.
languages
Section intitulée « languages »Lister toutes les langues prises en charge pour la traduction.
Voir LibreTranslate-MCP pour les détails d’implémentation.