Skip to main content
Glama

wti-mcp

CI License: MIT M8ven Verified

An MCP server for WebTranslateIt. It lets an AI assistant look up keys and their translations, find what's left to translate, create and edit strings, save translations, check progress, use the glossary, and push or pull language files — the things you'd otherwise do with the wti CLI or the web UI.

It talks to the WebTranslateIt REST API the same way wti 3.x does: a Bearer token and /api/projects/current (or /api/projects/<id> for organization tokens).

This is an independent project, not made or endorsed by WebTranslateIt.

What you can ask

  • "Which keys are still untranslated in de-DE? Draft translations for them, matching the glossary."

  • "Show me booking_confirm_title in every language."

  • "Add the key rebook_card_title with the text 'Book again', label it release-5.31, and translate it into French and Spanish."

  • "How far along is each locale? Which ones are below 90% translated?"

  • "Find every key starting with checkout_ that has no developer comment."

Related MCP server: i18next MCP Server

Tools

Tool

What it does

Mode

wti_get_project

Source/target locales and master files with their ids

read

wti_get_stats

Progress per locale: done, to translate, to verify, to proofread, % done and % translated

read

wti_list_strings

List or search strings by key (exact or regex), label, file, status, date; with translations

read

wti_get_string

One string by key or id, with its translation in every locale

read

wti_download_file

Download a language file for a locale (one-file wti pull)

read

wti_search_glossary

Search the term base, optionally with translations in a locale

read

wti_create_string

Create a key with its source text, translations, comment and labels

write

wti_update_string

Rename a key, change its comment, labels (add/remove) or status

write

wti_set_translations

Save a string's translation in one or more locales

write

wti_upload_file

Compare a local language file with WebTranslateIt's copy, then upload it (one-file wti push)

write

wti_add_locale

Add a target locale

write

wti_create_term, wti_update_term, wti_set_term_translation

Edit the glossary

write

wti_delete_string, wti_delete_term, wti_remove_locale

Delete things

delete

Write tools aren't registered in read-only mode. Delete tools are only registered with WTI_ALLOW_DELETE=true.

Setup

Requires Node.js 22 or newer.

git clone https://github.com/FireZenk/wti-mcp.git
cd wti-mcp
npm install   # also builds dist/

The server is then node /path/to/wti-mcp/dist/index.js.

Configuration

Variable

Meaning

WTI_API_TOKEN

API token (wti_pw_…, wti_iw_…, …) or legacy project API key.

WTI_PROJECT_API_KEY

Same, under the name the wti gem uses.

WTI_CONFIG_FILE

Path to a .wti file to read api_key and project_id from, so an existing wti setup works as is. <%= ENV['NAME'] %> is expanded.

WTI_PROJECT_ID

Numeric project id. Needed for organization tokens only.

WTI_READ_ONLY

true to expose read tools only. Automatic for read-only tokens (wti_pr_…, wti_ir_…).

WTI_ALLOW_DELETE

true to also expose the delete tools.

WTI_BASE_URL

Defaults to https://webtranslateit.com. Must be https (localhost excepted, for testing).

Environment variables win over the .wti file.

Claude Code

Reusing the .wti of a project:

claude mcp add wti -e WTI_CONFIG_FILE=/path/to/your/app/.wti -- node /path/to/wti-mcp/dist/index.js

Or with a token:

claude mcp add wti -e WTI_API_TOKEN=wti_pw_… -- node /path/to/wti-mcp/dist/index.js

Add -e WTI_READ_ONLY=true for a read-only setup. Each server instance works on one project: add one per project (e.g. wti-android, wti-ios) if you have several.

Claude Desktop and other MCP clients

{
  "mcpServers": {
    "wti": {
      "command": "node",
      "args": ["/path/to/wti-mcp/dist/index.js"],
      "env": { "WTI_CONFIG_FILE": "/path/to/your/app/.wti" }
    }
  }
}

Things worth knowing

  • Locale codes are the project's own: de-DE, not de, if that's how the project is set up. Tools check the code against the project and suggest the right one.

  • Keys are unique per file. wti_get_string and friends accept a key and find its id; pass file_id when the same key exists in several files. The API's key filter matches prefixes, so the server picks the exact match.

  • Writes are asynchronous. WebTranslateIt answers 202 Accepted and applies changes in the background; re-read after a few seconds before relying on them.

  • wti_upload_file checks WebTranslateIt before uploading. Neither wti push nor the API looks at what changed on WebTranslateIt since your last pull. Called without confirm, the tool uploads nothing: it downloads the current copy and lists the lines that are only there (someone else's changes, which the upload could overwrite) and the lines only in your file. The upload happens on a second call with the confirm token from that preview. The token is tied to both files' content, so if either changes in between you get a new preview instead of an upload. The comparison ignores line order, indentation and blank lines; it works best on files that came from a wti pull, since WebTranslateIt's export formatting may differ from a hand-written file.

  • wti_upload_file keeps missing strings by default (ignore_missing: true), unlike the API, so uploading a partial file can't mark the rest of the project obsolete. Pass ignore_missing: false to sync deletions. With merge: false (the default) your file's text replaces WebTranslateIt's where they differ; with merge: true WebTranslateIt keeps its text and only adds what it doesn't have.

  • Statuses. Translations: status_unproofread, status_proofread, status_unverified. Strings: current, hidden, obsolete. In stats, done only counts proofread strings; percent_translated also counts the ones waiting for proofreading.

  • Glossary translation statuses can only be set on creation. WebTranslateIt's API answers 500 to a status name on update and silently ignores a numeric one, so wti_set_term_translation only updates the text and description of an existing translation and says so. Statuses read back as numbers (1, 0, -1); the server shows them as approved, proposed, refused.

  • WebTranslateIt doesn't reject a translation that drops a placeholder (e.g. %1$s) when saved through the API, so check placeholders yourself.

  • Rate limits. The API allows 25 requests per second per IP. The client retries 429 responses (honouring Retry-After) and, for GET requests only, timeouts and 502/504.

  • The token only goes to the WebTranslateIt host. Pagination links pointing elsewhere are refused.

Development

npm test          # unit and MCP-level tests against a fake WebTranslateIt
npm run typecheck
npm run inspect   # open the server in the MCP Inspector (needs a token in the environment)

The code: src/client.ts (HTTP client), src/config.ts (environment and .wti), src/format.ts (compact responses for the model), src/tools/* (tool definitions), src/server.ts and src/index.ts (stdio entry point). See CONTRIBUTING.md.

Security

The server runs locally and only talks to WebTranslateIt with the token you give it. Texts coming back from WebTranslateIt (translations, comments, glossary entries) are written by people and reach the model as data; keep write access for setups where you review what the assistant does, and use WTI_READ_ONLY=true otherwise. To report a vulnerability, use GitHub's "Report a vulnerability" in the Security tab rather than a public issue.

License

MIT

Available Tools

14 tools
wti_add_localeAdd a localeC

Add a target locale to the project.

Inputs: locale (required).

wti_create_stringCreate a stringA

Create a new string (key) in a master file, optionally with its source text and translations. Fails if the key already exists in that file. In projects with one master file, file_id can be omitted.

Inputs: key (required), labels, plural, file_id, +3 more.

wti_create_termAdd a glossary termB

Add a term to the glossary, optionally with its translations.

Inputs: text (required), description, translations.

wti_download_fileDownload a language fileB
Read-only

Download a language file (e.g. strings.xml, en.json, Localizable.strings) for one locale, as WebTranslateIt would export it, like wti pull does for one file. Returns the content, or writes it to save_to.

Inputs: locale (required), file_id (required), save_to, max_chars.

wti_get_projectGet project infoA
Read-only

Project name, source and target locales, and master files with their file id per locale. Start here to get the file ids the other tools need.

Inputs: no named parameters.

wti_get_statsGet translation progressA
Read-only

Translation progress per locale: number of strings done, to translate, to verify and to proofread, and the percentage done. Filter by file, label or category id, or by how recently strings were added or changed.

Inputs: locale, file_id, label_id, added_since, +2 more.

wti_get_stringGet a string and its translationsA
Read-only

Show one string by key or id with its translations: text and status per locale, labels, developer comment and file.

Inputs: key, file_id, locales, string_id.

wti_list_stringsList or search stringsA
Read-only

List strings (segments) of the WebTranslateIt project, 250 per page. Filter by key (exact, or a regular expression with regex: true), label, file, status or creation date. Pass locale to include translations; with status to_translate / to_verify / to_proofread / done it finds the work left in that locale.

Inputs: key, page, label, regex, +7 more.

wti_search_glossarySearch the glossaryA
Read-only

Search the project's glossary (term base) for a word, case-insensitively in the term and its description, and optionally show how each match is translated in a locale. Use it to keep wording consistent.

Inputs: limit, query, locale.

wti_set_term_translationSet a glossary term translationA
DestructiveIdempotent

Create or update the translation of a glossary term in one locale. Updates the existing translation when the term has exactly one in that locale; pass translation_id when it has several. The status can only be set when the translation is created.

Inputs: text (required), locale (required), term_id (required), status, +2 more.

wti_set_translationsSet translations of a stringA
DestructiveIdempotent

Save the translation of one string in one or more locales (the source locale included). Each locale is saved separately and the result says which ones failed, e.g. on WebTranslateIt validation errors.

Inputs: translations (required), key, file_id, string_id, +2 more.

wti_update_stringUpdate a stringA
DestructiveIdempotent

Change a string's key, developer comment, labels or status (current / hidden / obsolete). Use add_labels / remove_labels to change labels without replacing them. Translations are changed with wti_set_translations.

Inputs: key, labels, plural, status, +6 more.

wti_update_termUpdate a glossary termC
DestructiveIdempotent

Change a glossary term's text or description.

Inputs: term_id (required), text, description.

wti_upload_fileUpload a language fileA
DestructiveIdempotent

Upload a local language file to a file and locale on WebTranslateIt, like wti push does for one file. Called without confirm, it uploads nothing: it downloads WebTranslateIt's current copy and returns the lines that are only there (changes by other people that the upload could overwrite) and the lines that are only in your file. Show them to the user, then call again with the confirm token to upload. The import runs in the background. By default strings missing from the upload are kept (ignore_missing: true).

Inputs: locale (required), file_id (required), local_path (required), label, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 14 tools

    Disambiguation4/5

    The set separates project, string, glossary, file, and stats operations clearly, and descriptions clarify boundaries such as update_string versus set_translations. Minor ambiguity remains between wti_set_translations (string translations) and wti_set_term_translation (glossary term translation), and between stats and filtered string listing, but an agent can distinguish them with the descriptions.

    Naming Consistency5/5

    All tools use the wti_ prefix and a snake_case verb_noun pattern, such as get_project, list_strings, create_term, and upload_file. Variations like set_translations versus set_term_translation are domain-appropriate and still predictable.

    Tool Count5/5

    14 tools is well within the appropriate range and maps cleanly to the translation-management domain. Each tool appears to cover a distinct resource or operation without obvious bloat.

    Completeness4/5

    Core workflows are covered: project discovery, string CRUD and translation, file download/upload, glossary search/create/update, and progress stats. There are minor gaps around delete/remove operations for strings, terms, or locales and no dedicated locale/term listing beyond get_project and search_glossary.

    Related MCP Connectors

    Related MCP Servers