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
| Name | Type | Required | Description |
|---|---|---|---|
text | string | yes | Text to translate |
source | string | no | Source language code or “auto” (default “auto”) |
target | string | yes | Target language code (e.g., “es”, “fr”, “ja”) |
format | string | no | text (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
| Field | Type | Description |
|---|---|---|
text | string | Original text that was translated |
source | string | Source language code or ‘auto’ |
target | string | Target language code |
format | string | Format type (text or html) |
translated_text | string | null | Translated text or null if unavailable |
detected_source | string | null | Auto-detected source language code or null |
detected_confidence | number | null | Confidence 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.