LangAPI Documentation

Localize your iOS, Android, Flutter and React Native app into 100 languages. Connect the MCP server once, then let Cursor or Claude Code translate your locale files in place — placeholders, plurals and terminology stay intact.

Quick Start

# 1. Sign in — shows a code to enter at langapi.io/device
# (1,000 free credits on sign-up)
npx @langapi/mcp-server login
# 2. Add the MCP server to your AI tool (see Setup below)
# 3. Start chatting with your AI:
"Scan my project for translations"
"What keys are missing in German?"
"Sync all translations"

Authentication

Authenticate the MCP server with a one-time browser login. No API keys to create or paste — sign in once and the CLI keeps your session refreshed automatically.

Browser login

Run this once in your terminal. It shows a short code and a link to langapi.io/device— open it in any browser, sign in, and enter the code to approve. The CLI then stores a session token at ~/.langapi/credentials.json and refreshes it automatically as needed.

npx @langapi/mcp-server login

Your MCP config just points at the server — no credentials live in the config:

{
  "mcpServers": {
    "langapi": {
      "command": "npx",
      "args": ["@langapi/mcp-server"]
    }
  }
}

Sign out and revoke the session with:

npx @langapi/mcp-server logout

Setup by Tool

Add the LangAPI MCP server to your preferred AI tool, then sign in once with npx @langapi/mcp-server login. The configs below carry no credentials.

Claude Desktop

Config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "langapi": {
      "command": "npx",
      "args": ["@langapi/mcp-server"]
    }
  }
}

Restart Claude Desktop after editing.

Claude Code (CLI)

Option 1: CLI Command (Recommended)

Run this command in your terminal:

claude mcp add langapi -- npx -y @langapi/mcp-server

Option 2: Config File

Create .mcp.json in your project root:

{
  "mcpServers": {
    "langapi": {
      "command": "npx",
      "args": ["@langapi/mcp-server"]
    }
  }
}

Configuration Scopes

  • Project scope (default): Stored in .mcp.json, shared via version control
  • User scope: Add --scope user to store in ~/.claude.json (available across all projects)

Verify installation: Run /mcp inside Claude Code to check server status.

Cursor

Create .cursor/mcp.json in your project root, or use Settings → MCP:

{
  "mcpServers": {
    "langapi": {
      "command": "npx",
      "args": ["@langapi/mcp-server"]
    }
  }
}

VS Code with Cline

Install the Cline extension, then create .vscode/cline_mcp_settings.json:

{
  "mcpServers": {
    "langapi": {
      "command": "npx",
      "args": ["@langapi/mcp-server"]
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "langapi": {
      "command": "npx",
      "args": ["@langapi/mcp-server"]
    }
  }
}

Available Tools

The MCP server provides these tools that your AI assistant can use:

list_local_locales

Scans your project to detect the i18n framework and find all locale files. Returns language codes, file paths, and key counts.

get_translation_status

Compares your source language against targets to identify missing keys. Shows cost estimates before you sync.

sync_translations

Translates missing keys and writes them to your locale files. Runs in preview mode by default for safety.

get_account_status

Check your remaining credits and current plan directly from your AI assistant.

Pricing & Plans

Billing is simple: 1 word = 1 credit. Only new or changed strings are translated — unchanged text is reused for free.

Free

2,000 words / mo

Free every month, so you can try it on a small project. No card required.

Starter

$15

Adds 100,000 credits, once. Buy as needed; credits never expire.

Pro

$24/mo

50,000 words/month, then $2 per extra 10,000 words. For teams shipping every release.

See full details on the pricing page, or manage top-ups and your subscription in billing.

Prompt Examples

Here are example prompts you can use with your AI assistant:

Scanning Your Project

"Scan my project for translations"

"What i18n framework am I using?"

"List all my locale files"

"How many translation keys do I have?"

Checking Status

"What translations are missing?"

"Compare English to all other languages"

"How much will it cost to sync German?"

"Which languages are out of sync?"

Preview & Sync

"Preview what would happen if I sync all languages"

"Do a dry run for French translations"

"Sync all missing translations"

"Translate to German and French"

Advanced Operations

"Skip the settings.* keys when syncing"

"Are there extra keys in German not in English?"

Glossary & Account

"Sync German using the glossary in src/i18n/glossary"

"How many credits do I have left?"

Supported Frameworks

LangAPI automatically detects these i18n frameworks:

FrameworkLocale Patterns
next-intlmessages/*.json
i18nextpublic/locales/*/*.json
react-intlsrc/lang/*.json
genericlocales/*.json
Flutterlib/l10n/*.arb
iOS/macOS*.lproj/*.strings, *.xcstrings

Resources

Troubleshooting

"MCP server not found"

Ensure npx is in your PATH. Try running npx @langapi/mcp-server manually to test.

"Not authenticated" / session expired

Sign in again with npx @langapi/mcp-server login. Sessions refresh automatically, but revoking or logging out elsewhere requires a fresh login.

"No locale files found"

Check that your locale files match supported patterns (see Frameworks above). Verify files are valid JSON.

Server not connecting

Restart your IDE completely (not just reload). Check the config file syntax is valid JSON.

Supported Languages

LangAPI supports translation to and from these languages:

  • Afrikaans(af)
  • Amharic(am)
  • Arabic(ar)
  • Assamese(as)
  • Azerbaijani(az)
  • Bashkir(ba)
  • Bulgarian(bg)
  • Bhojpuri(bho)
  • Bangla(bn)
  • Tibetan(bo)
  • Bodo(brx)
  • Bosnian(bs)
  • Catalan(ca)
  • Czech(cs)
  • Welsh(cy)
  • Danish(da)
  • German(de)
  • Dogri(doi)
  • Lower Sorbian(dsb)
  • Divehi(dv)
  • Greek(el)
  • English(en)
  • Spanish(es)
  • Estonian(et)
  • Basque(eu)
  • Persian(fa)
  • Finnish(fi)
  • Filipino(fil)
  • Fijian(fj)
  • Faroese(fo)
  • French(fr)
  • French (Canada)(fr-CA)
  • Irish(ga)
  • Galician(gl)
  • Konkani(gom)
  • Gujarati(gu)
  • Hausa(ha)
  • Hebrew(he)
  • Hindi(hi)
  • Chhattisgarhi(hne)
  • Croatian(hr)
  • Upper Sorbian(hsb)
  • Haitian Creole(ht)
  • Hungarian(hu)
  • Armenian(hy)
  • Indonesian(id)
  • Igbo(ig)
  • Inuinnaqtun(ikt)
  • Icelandic(is)
  • Italian(it)
  • Inuktitut(iu)
  • Inuktitut (Latin)(iu-Latn)
  • Japanese(ja)
  • Georgian(ka)
  • Kazakh(kk)
  • Khmer(km)
  • Kurdish (Northern)(kmr)
  • Kannada(kn)
  • Korean(ko)
  • Kashmiri(ks)
  • Kurdish (Central)(ku)
  • Kyrgyz(ky)
  • Lingala(ln)
  • Lao(lo)
  • Lithuanian(lt)
  • Ganda(lug)
  • Latvian(lv)
  • Chinese (Literary)(lzh)
  • Maithili(mai)
  • Malagasy(mg)
  • Māori(mi)
  • Macedonian(mk)
  • Malayalam(ml)
  • Mongolian (Cyrillic)(mn-Cyrl)
  • Mongolian (Traditional)(mn-Mong)
  • Manipuri(mni)
  • Marathi(mr)
  • Malay(ms)
  • Maltese(mt)
  • Hmong Daw(mww)
  • Myanmar (Burmese)(my)
  • Norwegian(nb)
  • Nepali(ne)
  • Dutch(nl)
  • Sesotho sa Leboa(nso)
  • Nyanja(nya)
  • Odia(or)
  • Querétaro Otomi(otq)
  • Punjabi(pa)
  • Polish(pl)
  • Dari(prs)
  • Pashto(ps)
  • Portuguese (Brazil)(pt)
  • Portuguese (Portugal)(pt-PT)
  • Romanian(ro)
  • Russian(ru)
  • Rundi(run)
  • Kinyarwanda(rw)
  • Sindhi(sd)
  • Sinhala(si)
  • Slovak(sk)
  • Slovenian(sl)
  • Samoan(sm)
  • Shona(sn)
  • Somali(so)
  • Albanian(sq)
  • Serbian (Cyrillic)(sr-Cyrl)
  • Serbian (Latin)(sr-Latn)
  • Sesotho(st)
  • Swedish(sv)
  • Swahili(sw)
  • Tamil(ta)
  • Telugu(te)
  • Thai(th)
  • Tigrinya(ti)
  • Turkmen(tk)
  • Setswana(tn)
  • Tongan(to)
  • Turkish(tr)
  • Tatar(tt)
  • Tahitian(ty)
  • Uyghur(ug)
  • Ukrainian(uk)
  • Urdu(ur)
  • Uzbek (Latin)(uz)
  • Vietnamese(vi)
  • Xhosa(xh)
  • Yoruba(yo)
  • Yucatec Maya(yua)
  • Cantonese (Traditional)(yue)
  • Chinese Simplified(zh-Hans)
  • Chinese Traditional(zh-Hant)
  • Zulu(zu)