translate

Pack: libretranslate · Endpoint: https://gateway.pipeworx.io/libretranslate/mcp

Translate text. Source can be “auto” to auto-detect. Returns translated text and the detected source (if applicable).

Parameters

NameTypeRequiredDescription
textstringyesText to translate
sourcestringnoSource language code or “auto” (default “auto”)
targetstringyesTarget language code (e.g., “es”, “fr”, “ja”)
formatstringnotext (default) | html

Example call

Arguments

{
  "text": "Hello, how are you?",
  "target": "es"
}

curl

curl -X POST https://gateway.pipeworx.io/libretranslate/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"translate","arguments":{"text":"Hello, how are you?","target":"es"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('translate', {
  "text": "Hello, how are you?",
  "target": "es"
});

More examples

{
  "text": "<p>Welcome to our website</p>",
  "target": "fr",
  "source": "en",
  "format": "html"
}

Response shape

Always returns: text, source, target, format, translated_text, detected_source, detected_confidence

FieldTypeDescription
textstringOriginal text that was translated
sourcestringSource language code or ‘auto’
targetstringTarget language code
formatstringFormat type (text or html)
translated_textstring | nullTranslated text or null if unavailable
detected_sourcestring | nullAuto-detected source language code or null
detected_confidencenumber | nullConfidence score for detected language or null
Full JSON Schema
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "description": "Original text that was translated"
    },
    "source": {
      "type": "string",
      "description": "Source language code or 'auto'"
    },
    "target": {
      "type": "string",
      "description": "Target language code"
    },
    "format": {
      "type": "string",
      "description": "Format type (text or html)"
    },
    "translated_text": {
      "type": [
        "string",
        "null"
      ],
      "description": "Translated text or null if unavailable"
    },
    "detected_source": {
      "type": [
        "string",
        "null"
      ],
      "description": "Auto-detected source language code or null"
    },
    "detected_confidence": {
      "type": [
        "number",
        "null"
      ],
      "description": "Confidence score for detected language or null"
    }
  },
  "required": [
    "text",
    "source",
    "target",
    "format",
    "translated_text",
    "detected_source",
    "detected_confidence"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "libretranslate": {
      "url": "https://gateway.pipeworx.io/libretranslate/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026