Connecting your AI agent to the ai-l10n MCP server turns it into a professional localization tool. Instead of pasting raw i18n file content into context, the agent calls l10n.dev as a dedicated translation engine โ with format guarantees, persistent glossaries, custom style instructions, and token-efficient output.
The naive approach โ pasting your i18n file into the chat โ breaks down fast. Here's what changes when your agent uses a professional localization engine instead:
The ai-l10n MCP server adds capabilities your AI agent cannot replicate on its own:
Ask the agent to generate a glossary from your source content before translating. The glossary is saved to your l10n.dev account and automatically applied to every subsequent file and every chunk โ ensuring consistent terminology across your entire application, indefinitely.
Create linguistic instructions per language pair โ for example, "Use informal tone, targeting Latin American Spanish" or "Always keep brand terms in English." Instructions persist in your account and are applied automatically on every translation call, without repeating yourself each session.
Without the MCP, translating a large i18n file means loading the entire file into the agent's context window โ expensive and often truncated. With the MCP, the agent sends only a file path and receives only metadata in return. The entire translation is processed server-side, keeping your context window free.
The server validates that the output format matches the source after every translation โ preserving JSON structure, Flutter ARB metadata, YAML keys, PO catalogs, XLIFF segments, and all placeholder syntax. Validation happens server-side before results are returned.
Enable hash-based change detection to skip strings that have already been translated. Only new or modified strings are sent for translation, saving your character quota and protecting existing translations from being overwritten.
Create a free account and get your API key at l10n.dev/ws/api-keys. You can set the key as an environment variable in your agent config (shown below), or ask your agent to store it once with the l10n_set_api_key tool โ which saves it to ~/.ai-l10n/config.json for automatic use.
Choose your agent below and add the MCP server configuration. All agents use the same npm package โ only the config format differs.
Open Settings โ Developer โ Edit Config. Claude Desktop will open the correct MCP config file for your installation. Add the l10n server block:
{
"mcpServers": {
"l10n": {
"command": "npx",
"args": ["-y", "ai-l10n-mcp"],
"env": {
"L10N_API_KEY": "your-api-key-here"
}
}
}
}Open Customize in Cursor to manage MCP servers, or add the config manually. Use ~/.cursor/mcp.json for a user-wide setup or .cursor/mcp.json in your project for a workspace-specific setup:
{
"mcpServers": {
"l10n": {
"type": "stdio",
"command": "npx",
"args": ["-y", "ai-l10n-mcp"],
"env": {
"L10N_API_KEY": "your-api-key-here"
}
}
}
}Open the MCPs panel in Cascade, or go to Devin Settings โ Cascade โ MCP Servers. For manual setup, edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"l10n": {
"command": "npx",
"args": ["-y", "ai-l10n-mcp"],
"env": {
"L10N_API_KEY": "your-api-key-here"
}
}
}
}Open the Command Palette and select MCP: Open User Configuration, or create a .vscode/mcp.json file in your workspace:
{
"servers": {
"l10n": {
"type": "stdio",
"command": "npx",
"args": ["-y", "ai-l10n-mcp"],
"env": {
"L10N_API_KEY": "your-api-key-here"
}
}
}
}Add to ~/.codex/config.toml for a user-wide setup, or .codex/config.toml in a trusted project:
[mcp_servers.l10n]
command = "npx"
args = ["-y", "ai-l10n-mcp"]
[mcp_servers.l10n.env]
L10N_API_KEY = "your-api-key-here"Or add it directly from the terminal:
codex mcp add l10n --env L10N_API_KEY=your-api-key-here -- npx -y ai-l10n-mcpAdd the server from the terminal. This works for both the CLI and VS Code extension:
claude mcp add --env L10N_API_KEY=your-api-key-here --transport stdio l10n -- npx -y ai-l10n-mcpOnce the MCP is connected, your agent proactively checks for instructions and glossaries before translating. Here's what a typical session looks like when you say: "Translate my app to Spanish and French":
l10n_list_instructions โ finds no instruction for es/fr language pairsl10n_create_instruction with the style rulel10n_list_glossaries โ finds no active glossary for es/frl10n_translate_file with instructions, glossary generation, and incremental mode enabledThe MCP includes a built-in l10n_project_setup prompt that guides your agent through checking and configuring linguistic instructions and glossaries for optimal translation quality. Run it at the start of every new project or when reviewing your localization settings.
"Run the l10n_project_setup prompt" or "Set up l10n.dev for this project"
The MCP includes a built-in l10n_automation_setup prompt that guides your agent through configuring automated translation of your i18n files. Run it once to set up automatic translation for all future commits, eliminating the need to manually trigger translations.
"Run the l10n_automation_setup prompt" or "Set up automatic localization for this project"
Ready to give your AI agent professional localization capabilities?
Adding the ai-l10n MCP server to your AI agent transforms a fragile, token-heavy workflow into professional-grade localization. Persistent glossaries, custom tone instructions, format guarantees, and incremental updates give your agent capabilities it cannot replicate on its own.
Connect your agent today and start shipping production-ready translations โ in 165 languages, with consistency across every file and every session.