L10n.dev - AI Localization Agent

v1.2.2
io.github.l10n-dev/ai-l10n-mcp Checked 1 day ago Published 20 days ago

MCP Server that turns your AI agent into a localization expert with token-efficient i18n translation

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

l10n_translate_file Translate i18n File, configs, md documents, and other text-based formats

Translate an i18n source file to one or more target languages using l10n.dev AI. Supports JSON, JSONC, Flutter ARB, YAML, PO (gettext), XLIFF, MD, and all other text-based localization formats. Format is auto-detected from the file extension. If sourceFile is omitted, scan the project for i18n source files. Common patterns to look for: - `locales/en.json`, `locales/en-US.json` (flat file-based) - `locales/en/common.json`, `locales/en/messages.json` (folder-based) - `locales/common.en.json`, `locales/en-US.common.json` (language code inside the file name) - `app_en.arb` (Flutter ARB) - `*.po`…

ParameterTypeDescription
sourceFile *stringAbsolute or relative path to the source i18n file (JSON, JSONC, ARB, YAML, PO, XLIFF, MD, etc.)
generateGlossarybooleanGenerate and save a glossary from this translation for consistent future translations. With translateOnlyNewStrings, only new and changed strings are charged. Default false.
generatePluralFormsbooleanGenerate plural form strings with suffixes (e.g. for i18next). Do not enable for strict source-to-target mapping. Default false.
instructionstringLinguistic instruction for this translation e.g. 'Use formal tone, never translate Dashboard'. Overrides the active saved instruction for this request. Max 1000 characters.
languageCodeRegexstringRegex locating the language code in file names, overriding the built-in detection. Must contain a (?<language>...) named capture group, e.g. '^common\\.(?<language>[\\w-]+)\\.json$'. The text around t…
replacebooleanReplace existing target files in-place. When false (default), uniquely-named copies are created.
targetLanguagesarrayBCP-47 language codes e.g. ['es','fr','de']. Auto-detected from project structure if omitted.
translateMetadatabooleanTranslate metadata entries along with UI strings (e.g. Flutter ARB @key descriptions). When false (default), metadata entries are preserved unchanged in target files.
translateOnlyNewStringsbooleanOnly translate new/changed strings, skipping strings that already exist in the target file. Saves character quota. Default false. Note: on first run, only added strings are translated because the hash…
useShorteningbooleanAllow shorter translations where appropriate. Default false.
verbosebooleanEnable verbose SDK logging in the output. Default false.

l10n_list_instructions List Linguistic Instructions

List all saved linguistic instructions for this l10n.dev account. Linguistic instructions guide AI translation style, tone, and brand voice (e.g. "Use formal tone", "Never translate the word Dashboard"). Call this before translating if the user hasn't specified tone preferences, to check whether instructions are already configured.

l10n_create_instruction Create Linguistic Instruction

Create and save a new linguistic instruction for a source→target language pair. The instruction is stored in l10n.dev and applied automatically to future translations for that language pair (unless overridden per-request). Use this when the user wants to set a tone, style, or brand rule — for example after they answer the suggestion made during translation. Examples: - "Use formal tone (Sie, not du)" - "Keep product names Dashboard, Workspace, and Settings untranslated" - "Use simple, friendly language suitable for children"

ParameterTypeDescription
sourceLanguageCode *stringSource language BCP-47 code e.g. 'en'
targetLanguageCode *stringTarget language BCP-47 code e.g. 'de'
text *stringThe instruction text e.g. 'Use formal tone (Sie, not du)'. Max 1000 characters. Use instructions for style/tone guidance. For specific term mappings, use glossaries instead.
namestringOptional display name for this instruction

l10n_update_instruction Update Linguistic Instruction

Update the text, name, or active status of an existing linguistic instruction. Use to edit a previously saved instruction without deleting and recreating it. Setting isActive to true deactivates all other instructions for the same language pair.

ParameterTypeDescription
instructionId *integerNumeric ID of the instruction to update
isActivebooleanEnable or disable this instruction. Setting true deactivates all other instructions for the same language pair.
namestringNew display name
textstringNew instruction text. Max 1000 characters.

l10n_delete_instruction Delete Linguistic Instruction

Permanently delete a linguistic instruction. This cannot be undone. If the deleted instruction was active, no other instruction is automatically activated.

ParameterTypeDescription
instructionId *integerNumeric ID of the instruction to delete

l10n_list_glossaries List Glossaries

List all saved glossaries for this l10n.dev account. Each glossary maps source terms to preferred translations for a language pair. Active glossaries are applied automatically during translation. Call this when the user asks about their glossaries, or to check whether a glossary exists for a language pair before suggesting generateGlossary.

l10n_get_glossary Get Glossary

Get the full details and all term entries of a specific glossary by ID. Use when the user wants to review or audit the terms in a glossary.

ParameterTypeDescription
glossaryId *integerNumeric ID of the glossary to retrieve

l10n_create_glossary Create Glossary

Create a new empty glossary for a source→target language pair. After creating, use l10n_add_glossary_entry to add term mappings. Note: to auto-generate a glossary from a translation, use generateGlossary: true in l10n_translate_file instead.

ParameterTypeDescription
name *stringDisplay name for this glossary e.g. 'My App German Glossary'
sourceLanguageCode *stringSource language BCP-47 code e.g. 'en'
targetLanguageCode *stringTarget language BCP-47 code e.g. 'de'

l10n_update_glossary Update Glossary

Update the name or active status of an existing glossary. Setting isActive to true deactivates all other glossaries for the same language pair.

ParameterTypeDescription
glossaryId *integerNumeric ID of the glossary to update
isActivebooleanEnable or disable this glossary. Setting true deactivates all other glossaries for the same language pair.
namestringNew display name

l10n_delete_glossary Delete Glossary

Permanently delete a glossary and all its term entries. This cannot be undone.

ParameterTypeDescription
glossaryId *integerNumeric ID of the glossary to delete

l10n_add_glossary_entry Add Glossary Entry

Add a term mapping to an existing glossary. Maps a source term to a preferred translation, with an optional context note for disambiguating polysemous terms (e.g. 'bank' = financial institution vs. river bank).

ParameterTypeDescription
glossaryId *integerNumeric ID of the glossary to add to
sourceTerm *stringTerm in the source language
targetTerm *stringPreferred translation of the term
contextstringDisambiguation note e.g. 'financial institution' to clarify the intended meaning

l10n_delete_glossary_entry Delete Glossary Entry

Remove a single term mapping from a glossary.

ParameterTypeDescription
entryId *integerNumeric ID of the entry to remove
glossaryId *integerNumeric ID of the glossary

l10n_get_balance Get Account Balance

Check the remaining character balance for this l10n.dev account. Each translation consumes characters from the balance. Use this when the user asks how many characters they have left, or proactively if a translation result shows a low remaining balance. If balance is insufficient, suggest upgrading the plan or renewing early on the Billing page of the user's l10n.dev account (unused characters carry over). Plans: https://l10n.dev/#pricing

l10n_set_api_key Set API Key

Store an l10n.dev API key locally in the user's home directory (~/.ai-l10n/config.json). Once stored, the key is used automatically by all l10n tools without needing to set L10N_API_KEY. Get an API key at https://l10n.dev/ws/keys (new users get a 3-day free trial with 10,000 characters, then a monthly plan is required: https://l10n.dev/#pricing) Use this when: - The user provides an API key and wants to save it - A translation fails with an authorization error and the user wants to persist their key Note: if L10N_API_KEY environment variable is set in the MCP config, that takes preced…

ParameterTypeDescription
apiKey *stringThe l10n.dev API key to store. Get yours at https://l10n.dev/ws/keys

l10n_get_api_key_status Get API Key Status

Check whether an l10n.dev API key is configured (via environment variable or stored config). Use this to diagnose authorization errors or to confirm the key is set up correctly.

l10n_detect_project_structure Detect i18n Project Structure

Scan an i18n source file to understand the project's localization structure. Returns: structure type (folder-based, file-based or unknown), source language code, all detected target languages, and the resolved target file path for each language (showing whether files already exist). Structure types: - folder-based: a language-code directory per language (locales/en/common.json) - file-based: the language code is in the file name, either as the whole name (locales/en.json) or next to other parts (app_en.arb, locales/common.en.json, locales/en-US.common.json, locales/messages_en_US.propert…

ParameterTypeDescription
sourceFile *stringAbsolute or relative path to the i18n source file (e.g. './locales/en.json', './lib/l10n/app_en.arb', './locales/en/common.json', './locales/common.en.json'). This is the file in the source language f…
languageCodeRegexstringRegex locating the language code in file names, overriding the built-in detection. Must contain a (?<language>...) named capture group, e.g. '^common\\.(?<language>[\\w-]+)\\.json$'. Only needed when…