MCP Integration
LocaleKit exposes a Model Context Protocol (MCP) server, enabling AI assistants to manage your translations through natural language.
Setup
First, make sure you're logged in:
bash
localekit loginThen add LocaleKit to your editor:
Claude Code
One command:
bash
claude mcp add localekit -- localekit mcpOr add to .mcp.json in your project root:
json
{
"mcpServers": {
"localekit": {
"command": "localekit",
"args": ["mcp"]
}
}
}
Cursor
Add to mcp.json (Settings → MCP Servers → Add):
json
{
"mcpServers": {
"localekit": {
"command": "localekit",
"args": ["mcp"]
}
}
}
Windsurf
Add to mcp.json (Settings → MCP Servers → Add):
json
{
"mcpServers": {
"localekit": {
"command": "localekit",
"args": ["mcp"]
}
}
}Available Tools
The MCP server exposes 9 tools that your AI assistant can use:
| Tool | Description |
|---|---|
list_workspaces | List all LocaleKit workspaces |
get_workspace | Get workspace details (languages, files, engine) |
scan | Scan a directory for localization files |
status | Translation coverage per language |
validate | Check for placeholder mismatches, empty values, duplicates |
translate | Translate missing keys (DeepL / OpenAI) |
export | Export to any format (xcstrings, arb, xml, json...) |
convert | Convert between localization formats |
diff | Show changes since last translation |
Example Prompts
Once configured, you can ask your AI assistant things like:
"Check the translation status of my project"
"Translate all missing keys to German and French"
"Validate my localization files for placeholder mismatches"
"Export my Xcode strings to ARB format for Flutter"
"Show me what changed since the last translation"How It Works
The localekit mcp command starts a JSON-RPC server over stdio. The AI editor connects to it automatically using the config above. The server:
- Requires authentication — your existing
localekit loginsession is used - Loads workspaces from the LocaleKit macOS app
- Exposes the same capabilities as the CLI commands, but accessible via natural language
Command Reference
bash
localekit mcpStarts the MCP server over stdio. No arguments or flags — configuration is handled by the editor connection above.
