Skip to content
PreviewThis is built and live, but young. Details on this page can still change. Live at api.localize.work; compatibility with individual MCP clients is still being checked.

MCP server

The localize.work MCP server gives an AI coding assistant a controlled view of one translation project. It can search before inventing a key, inspect missing or outdated work, create source keys, check releases, and—only when explicitly allowed—publish reviewed translations.

The server uses MCP Streamable HTTP at one endpoint:

POST https://api.localize.work/mcp

Send the secret project token as a Bearer credential:

Authorization: Bearer lw_sec_…
Content-Type: application/json
Accept: application/json, text/event-stream

The transport is stateless: every request is authenticated and bound to its project independently. GET, PUT, PATCH, and DELETE are not supported and return 405; there is no resumable server session to open or close. Do not append a project ID or slug to the URL. Browser cross-origin access is denied— the endpoint is for trusted server-side MCP clients. Origin is deliberately treated as invalid because this deployment has no approved browser origin. The installed Node SDK transport and the current mcp-remote transport do not add that header. Compatibility with other native clients is still being checked.

This is an MCP protocol endpoint, not a general REST API. Use an MCP client rather than posting tool-shaped JSON yourself.

In the editor, open the project’s Settings → API keys card:

  1. Enter a descriptive name such as Codex — app repository.
  2. Select Secret — MCP / CLI / CI.
  3. Select only the capabilities the client needs.
  4. Optionally select the target locales it may read.
  5. Create the key and copy the lw_sec_… token immediately.

The generated form is lw_sec_ followed by 32 lowercase hexadecimal characters. The plaintext token is returned once. localize.work stores its SHA-256 hash, not a recoverable copy. Put the token in an environment variable or your client’s secret store; never commit it to a repository or place it in browser or mobile code. The key’s “last used” timestamp is updated at most once every five minutes, so it is operational evidence rather than a per-request log.

Public lw_pub_… keys do not work with MCP. They remain intentionally limited to SDK use such as saveMissing.

Scope What it allows Tools
project:read Project metadata, accessible locales, namespaces, glossary, style guides, activity and import jobs get_project, list_namespaces, list_glossary, get_style_guides, list_activity, get_import_job
translations:read Search keys and read translation values, review state, history, comments, translation memory and AI job status search_keys, get_key, get_translation_history, list_comments, get_translation_memory, get_translation_context (with project:read), list_batch_translation_jobs
keys:write Create, describe and delete keys, edit source text, and import files create_key, update_key, delete_key, import_translations, resume_import_job, cancel_import_job, set_translation on the source locale
translations:write Save target-language text as draft or translated, comment, and import target files set_translation, add_comment, resolve_comments, import_translations, start_batch_translation
translations:review Approve translations or send them back for changes approve_translation, request_translation_changes, set_translation with status: "reviewed"
ai:translate Run AI translation, which spends the organization’s monthly AI words ai_translate_key, start_batch_translation
glossary:write Edit glossary terms and per-language style guides create_glossary_term, update_glossary_term, delete_glossary_term, set_style_guide
project:write Rename the project and change its languages update_project
releases:read Inspect immutable releases and the active release list_releases
releases:publish Destructively publish reviewed translations, or roll back to an earlier release, moving the public latest CDN pointer publish_release, activate_release

An agent that should take text from a new key all the way to production needs keys:write, translations:write, translations:review and releases:publish (the editor’s Allow everything shortcut selects every scope). Only admins can create a key with translations:review, so a key never approves work its creator could not approve. project:write and releases:publish keys must have project-wide locale access.

A secret key must have at least one scope. A read-only assistant normally needs project:read, translations:read, and releases:read. Add keys:write only if it should create source keys. Keep releases:publish on a separate key when possible. A publish-capable key must have project-wide locale access: leave the target-locale selector empty. publish_release rejects every locale-restricted credential, even if its allowlist currently names every target locale.

Treat keys:write as production-content access: source text created through MCP is immediately marked reviewed and enters the next release without another human review gate.

Leaving the target-locale selector empty grants access to every target locale. Selecting locales creates an allowlist. For example, a key restricted to et can read the source locale and Estonian, but cannot read Russian values.

The source locale is always readable when the key has the relevant read scope; it is the context required to understand translation keys. Locale restrictions do not broaden capabilities: a locale-allowed key still cannot read translations without translations:read.

The target-locale allowlist is a read boundary, not a boundary on source creation. If the same credential has keys:write, create_key may still add reviewed source-locale text that can ship in the next release, regardless of which target locales are selected. Use a separate key without keys:write when an integration should only read one or more target locales.

Locale restrictions and publishing are intentionally incompatible. Publishing creates one project-wide release, so a key with a non-empty target-locale selection cannot call publish_release. Use a separate project-wide credential for publishing and keep its scope to releases:publish plus only the read scopes the client truly needs.

A locale allowlist applies to writes as well as reads: a key restricted to et can write, approve and AI-translate Estonian only. Deleting keys, creating or deleting whole glossary terms and editing their term text need a key without a locale restriction, because they affect every language.

First expose the one-time token to the process that starts the client:

Terminal window
export LOCALIZE_WORK_API_KEY='lw_sec_replace_with_the_token_shown_once'

Do not put a real key in a checked-in config file. These examples deliberately contain placeholders.

Add this to your Codex configuration:

[mcp_servers.localize_work]
url = "https://api.localize.work/mcp"
bearer_token_env_var = "LOCALIZE_WORK_API_KEY"

Restart Codex after setting the environment variable. Give each repository or automation its own key so it can be revoked independently.

Clients that support Streamable HTTP and environment-variable expansion commonly use this shape:

{
"mcpServers": {
"localize-work": {
"type": "http",
"url": "https://api.localize.work/mcp",
"headers": {
"Authorization": "Bearer ${LOCALIZE_WORK_API_KEY}"
}
}
}
}

The configuration filename and environment-variable syntax are client-specific. Use the client’s secret-setting mechanism if it does not expand ${…} in headers. The required wire contract is Streamable HTTP plus the Bearer header shown above.

Returns the bound project’s name, slug, source locale, locales visible to the credential, active release ID, total key count, and per-visible-target progress. Progress includes translated, reviewed, draft, awaiting-review, and outdated key counts; variant-locale totals count only explicit overrides. It takes no arguments.

Required scope: project:read.

Lists namespaces and their key counts in the bound project. limit is 1–100 (default 25) and offset is 0–10,000 (default 0). The result includes total, the applied limit and offset, and nextOffset; pass nextOffset into the next request until it is null.

Required scope: project:read.

Searches names, descriptions, and visible translation values. It can filter by namespace, locale, missing, outdated, status, the translate and review queues, or unusedDays. Each returned key contains source-locale text plus only the requested locale; without locale, it contains source text only. This keeps responses bounded even for projects with many target locales.

Input Bounds and notes
q Optional; 3–500 characters.
namespace Optional namespace name.
locale Must be a project locale visible to the credential. Required with missing, outdated, status, or queue.
missing Optional literal true; include only keys missing required forms for locale. Omit it for no missing-state filter.
outdated Optional literal true; include only keys with outdated content for locale. Omit it for no outdated-state filter.
status draft, translated, or reviewed.
queue translate or review; target locales only. In a regional variant such as de-AT, a cleared override (an empty form) that is not approved yet counts like other text of its status, since the old override stays live until its removal is approved: a draft removal for status: "draft" and the translate queue, a submitted one for status: "translated" and the review queue. An approved removal does not count for status: "reviewed", and an empty form never counts as filled for missing. Blank text saved before the locale became a variant and not approved yet (for example a pt-BR import of empty draft or translated values before pt was added) counts as such a removal too; for the blank form itself, approving it changes the next release only if the current release has an entry for that key and plural form in that locale, even an empty one, which is then dropped so that form falls back to the base locale (approval still covers every form of the key in that locale). A blank saved that way and already approved needs no review: the next release drops it.
unusedDays Optional; 7–3,650. Only keys older than that many days that no app reported looking up in that many days, including keys never reported. Needs no locale. Fails with invalid_argument until apps have reported usage for at least that many days, and while no app has reported usage in the last 7 days; a report after such a silence starts the count again; the error details carry reason (not_started, too_recent or stale), usageTrackedSince and usageLastReportedAt. Treat the result as candidates to check before deleting. See key usage tracking.
limit 1–100; defaults to 25.
cursor Optional; the nextCursor from the previous page. Keep the other inputs the same. Use it instead of offset.
offset 0–10,000; defaults to 0. Cannot be combined with cursor.

Results are ordered by namespace, then key name. The result includes total and nextCursor; pass nextCursor back as cursor until it is null to walk every match, however many there are. nextOffset is still returned for offset paging, which stops at offset 10,000. Cursors are at most 4,000 characters. When a page ends on a key with a very long name, its cursor refers to that key by ID; if that key is deleted before the next request, the cursor is refused and the search has to start again.

If a page is too large to return, search_keys answers response_too_large. Retry with limit: 1; if that single key is still too large, the error’s details.skipCursor is a cursor that continues right after it, and details.keyId names the key so you can read it with get_key and one locale.

Required scope: translations:read.

Returns one key’s metadata and source-locale text. Like each search_keys result, it includes lastUsedAt: when an app last reported looking the key up (key usage tracking), refreshed at most hourly, or null if no use was reported. It accepts a keyId UUID and an optional visible locale; when supplied, that target locale is returned alongside source text. Without locale, only source text is returned. An ID belonging to another project behaves as not found.

Required scope: translations:read.

Creates a key atomically, creating the namespace when necessary. Optional source text is stored as reviewed source content; target translations are never written. Organization key-count limits still apply.

Input Bounds and notes
namespace Required, trimmed, at most 200 characters, and exactly one safe path segment (no separators or ./..).
name Required i18next key name; 1–512 characters, no whitespace or unsafe prototype segments.
description Optional; at most 2,000 characters.
isPlural Optional, defaults to false.
sourceValue Optional value for a non-plural key; at most 50,000 characters.
sourcePluralValues Optional object for a plural key; at most six entries, each at most 50,000 characters, containing exactly the source locale’s required CLDR forms.

Supply only sourceValue or sourcePluralValues, never both. Duplicate keys return a conflict rather than overwriting existing content. So does a key that would publish under the same name as another key of the namespace: a plain key named like a form of a plural key (items_one next to a plural items), or a plural key with a form named like an existing plain key. Its details carry reason: "key_name_clash" and the other key’s name, isPlural and the form they share.

Required scope: keys:write.

Lists recent immutable releases, content counts, and which release is active. Results are newest first. limit is 1–100 (default 25) and offset is 0–10,000 (default 0); use the returned nextOffset as the next request’s offset until it is null. For locale-restricted credentials, item, locale, and namespace counts include only release content in readable locales.

Required scope: releases:read.

This is a destructive control-plane operation: it creates and activates a new immutable release, writes public delivery files, and moves the project’s latest CDN pointer. It accepts optional notes (at most 2,000 characters), the required confirmProjectSlug, and a required UUID requestId generated by the caller for this publish attempt.

requestId is the durable idempotency key, scoped to the bound project. If a network or storage failure makes the result uncertain, retry with the same UUID. The retry resolves the original immutable release and never snapshots a second release; the first accepted call fixes the notes and snapshot, so changed fields on a retry are ignored. The UUID is stored on the release itself, so this holds only while that release is kept: the Free plan keeps the newest three releases and prunes older ones, and once the original release is pruned a retry with the same UUID publishes a new release. Retry promptly rather than hours later. Generate a fresh UUID for every new logical publish attempt: because the caller chooses this value, two independent agents that reuse one UUID in the same project will receive the same publish outcome. The response includes publicationStatus:

  • active: delivery completed and this release is currently served by latest.
  • pending: the durable intent exists, but CDN finalization has not completed; retry with the same requestId.
  • superseded: this request completed previously, but another release is now active. Retrying does not reactivate it.

active is also returned as a convenience boolean. While any publication is pending, a different request ID, a human publish, or a human activate operation is rejected with a conflict instead of replacing the durable intent.

While an import job is queued, running or failed (see imports), new releases are blocked: publish_release returns conflict with the job’s importId and status, so a release never ships an import that is still in progress. A retry with the requestId of a release that already exists is not blocked; it finishes that release. Publish once the job completes. Cancelling a job also unblocks publishing, but it keeps what the job already wrote, so check those values before you publish. activate_release (rollback) is not blocked.

Required scope: releases:publish. The credential must also have project-wide locale access (locales: null, represented in the editor by selecting no target locales). A locale-restricted credential is rejected.

Tool Scope Notes
set_translation translations:write (target), keys:write (source) Writes one key’s text in one locale: value for non-plural keys, values by plural form for plural keys. status is draft or translated; reviewed also needs translations:review. Without status, existing translated or reviewed text is saved as translated. In a target locale, changing reviewed text requires expectedUpdatedAt from get_key, so reviewed work is never overwritten blindly; so does resending a reviewed form unchanged with another status (for example beside a changed plural form), which withdraws that form’s approval. Source-locale text is not checked this way (it keeps its status, and new source text is reviewed), so pass expectedUpdatedAt whenever you edit source text, or a change made since you read it is overwritten. Placeholder, plural-form and review-transition rules match the editor.
approve_translation translations:review Marks the current text as reviewed without changing it. Pass expectedUpdatedAt from get_key with a token for every plural form of the locale: if any of that text changed since, the call returns conflict instead of approving text the agent never saw. A stored form left out of expectedUpdatedAt, even an empty regional override, is also a conflict (reason incomplete_revision_tokens, listing the missing forms), since it would otherwise be approved unseen. Without expectedUpdatedAt, every form is approved at whatever revision is current when the call runs. In a regional variant such as de-AT, a plural form with no stored text inherits the base language and is approved as such (stored as an empty form).
request_translation_changes translations:review Sends submitted text back to draft with a required comment. Pass expectedUpdatedAt from get_key with a token for every stored form, as for approve_translation: if any of that text changed since, or a stored form is left out (reason incomplete_revision_tokens), the call returns conflict with the current text and sends nothing back. Without expectedUpdatedAt, whatever text is current when the call runs goes back.
get_translation_history translations:read Every saved version, newest first, attributed to a user or an API key by name. Each version carries importId: the import job that wrote it (see get_import_job), or null for any other save.

Only reviewed text is included in a release, so a typical agent flow is set_translation → approve_translation → publish_release. An agent that translates many keys reads get_translation_context page by page and writes each language with import_translations as translated, after a dry-run that flags any placeholders that differ from the source text. It then approves its keys one by one with approve_translation and expectedUpdatedAt, rather than importing as reviewed: a reviewed import replaces approved text without checking whether a person changed it after the agent read it. Approvals count as translation saves, at most about 120 a minute for each API key or agent; a rate_limited error gives retryAfterSeconds.

Tool Scope Notes
update_key keys:write Sets or clears a key’s description.
delete_key keys:write Deletes a key and all its translations. Destructive; needs a key without a locale restriction. Returns conflict with the importId while an import is active, so a later import chunk cannot recreate the key.
list_comments translations:read A key’s comments, hiding comments on locales the key cannot read.
add_comment / resolve_comments translations:write Comment on a key, optionally for one locale; resolve or reopen comments.
get_translation_memory translations:read Earlier approved translations of similar source text for one target locale.
get_translation_context translations:read and project:read Everything needed to translate keys into one target locale yourself: each key’s source text, description and the plural forms to write (forms), its current text there with updatedAt, the glossary terms in its source and up to five similar approved translations (references), plus the locale’s styleGuide, the instructions localize.work’s own AI translation follows and whether the locale is a regional variant such as de-AT (variant), with the base language it falls back to when the key can read it (variantOf). Without a filter it lists the keys that need translating (missing, draft or outdated); missing, outdated, status, queue, q and namespace work as in search_keys. Up to 50 keys per page; follow nextCursor. A key marked contextOmitted came without its glossary terms and references to fit the result.
list_activity project:read The project activity feed with cursor paging; no email addresses.
Tool Scope Notes
list_glossary project:read Terms alphabetically, with target translations limited to readable locales. Optional locale returns one language’s translations; page with limit (1–100, default 50) and offset.
create_glossary_term / update_glossary_term / delete_glossary_term glossary:write A locale-restricted key may only change target entries for its own locales.
get_style_guides / set_style_guide project:read / glossary:write Per-language tone and terminology rules used by AI translation. get_style_guides takes an optional locale; use it on projects with many languages, since all guides together can exceed the result size limit.
Tool Scope Notes
ai_translate_key ai:translate Returns an AI suggestion for one key and locale without saving it; save it with set_translation. Requires a plan with AI words.
start_batch_translation ai:translate and translations:write Starts a background job that drafts every missing key in one locale. One active job per locale.
list_batch_translation_jobs translations:read Recent jobs and their progress.
Tool Scope Notes
update_project project:write Renames the project or replaces its languages. Removing a language hides its translations from the editor and future releases; nothing is deleted.
import_translations keys:write, plus translations:write for target files and translations:review for status: "reviewed" i18next JSON files only (there is no format option; for ICU files use the REST API or the CLI), including dry-run. Target-language text that is written arrives with the requested status: draft, translated (the default) or reviewed. A value identical to the stored one is left unchanged, status included, so re-importing a draft with status: "reviewed" does not approve it; use approve_translation for that. Source-language text is not reviewed separately: new source keys arrive reviewed and existing ones keep their status, so imported source text ships with the next release whenever its row is reviewed (a row still in draft does not ship). An apply runs as an import job; see imports below for files, limits and job behaviour.
get_import_job project:read One import job of the bound project: status, importStatus, processedEntries of totalEntries, the report so far, error and errorCode when it failed, and timestamps. Omit importId to get the active import (queued, running or failed), for example the one a conflict refers to. Report rows of languages the key cannot read are left out, and per-file warnings (which name keys) need translations:read. A job of another project is not_found.
resume_import_job keys:write, plus what the rest of the import needs: translations:write for target languages, translations:review for a reviewed import, and each language it still has to write within the key’s allowlist Continues a failed job from where it stopped. Any other status returns conflict, and so does a job that still has to write a language removed from the project (reason: "locale_removed"): add the language back or cancel the job.
cancel_import_job keys:write, plus translations:write if any file of the job is a target language (even one already finished) and translations:review for a reviewed import, and write access to every language of the job (not only the ones still pending). If a language of the job was removed from the project, only an unrestricted key (no language allowlist) can cancel it Stops a queued, running or failed job for good. What it already wrote stays, with history; the rest is dropped. A job that has already ended returns conflict.
activate_release releases:publish Rolls the CDN back or forward to an existing release. Requires confirmProjectSlug, like publish_release.

Give each import_translations file as content (a JSON object, at most 64 properties per object) or contentJson (the file as one JSON string); use contentJson for anything beyond a few dozen keys. contentJson may be up to 448 KiB per file once JSON-encoded as a string (quotes and escapes count), 1 MiB per request, and 32 levels of nesting (arrays included). A key’s full dotted path may be at most 2,048 bytes, and the full paths of every key and value in one call may total at most 4 MiB (a long parent key counts once per child). A "__proto__" key is refused. One call carries at most 50,000 values across all files (texts, plus nulls and arrays the import skips); split larger imports by namespace or across calls.

Everything is validated and planned before anything is written: the limits above, locale access, and the organization’s key limit (plan_limit). A dry-run returns that plan and never writes.

Both a dry-run and an apply’s report warn about target-language text whose placeholders ({{name}}, <1>…</1>) differ from the key’s source text, per plural form. Unlike set_translation, which refuses such text, an import writes it as it is, so correct what a dry run reports, and repeat it until none remain, before you apply. A file lists at most 50 such entries and counts the rest in one line, and a result with warningsTruncated: true leaves warnings out: dry-run fewer keys at a time until it is false. Regional variants such as de-AT are not checked.

An apply then runs as an import job that writes in chunks, and the call waits up to about 20 seconds for it:

  • A job that finishes in time returns the full report with jobStatus: "completed" and its importId.
  • A larger job returns early with jobStatus: "running" (or "queued"), its progress (processedEntries of totalEntries) and the report so far. Follow it with get_import_job and its importId while it is queued or running; it ends as completed, failed (below) or cancelled.
  • A job that fails (for example, when the organization reaches its key limit mid-import) reports jobStatus: "failed" with error and errorCode. What it already wrote stays. Fix the cause and call resume_import_job, or call cancel_import_job to stop it for good.

One project runs one import at a time. While a job is queued, running or failed, another apply returns conflict with the active job’s importId and status, and publishing is blocked until the job completes or is cancelled. Running the same import again writes nothing new where the values are already there: they come out unchanged. A new run is a new job, though, and it protects only edits made after that job was created, so it can replace unreviewed text someone corrected after the first run. If a call failed or its response was lost, find out what happened before starting the import again. With the job’s importId, call get_import_job with it. Without one, call get_import_job without an importId: that returns the project’s active import, which may have been started by someone else. Treat it as yours only if its createdAt, totalEntries and the languages and namespaces in its report match the call you made; otherwise leave it to whoever started it. Jobs do not record who started them, so if you are not sure, ask the user before resuming.

  • A queued or running job: follow it with get_import_job until it ends (completed, failed or cancelled).
  • A failed job of yours: fix the cause and resume_import_job it (only failed jobs can be resumed).
  • not_found: no import is active. The original job completed or was cancelled, or the call never created one; without its importId it cannot be looked up. Check the imported values (for example with get_key or search_keys) before you import again.

Unless an import requests status: "reviewed", it never replaces reviewed target text; those rows are reported as skipped. No import, reviewed ones included, replaces text that someone edited, approved or sent back after the job was created, re-approving unchanged text included: such rows are kept and reported as skipped with “changed or approved after this import started”. AI batch drafts don’t count, so an import can replace them. Every version an import writes carries its importId in get_translation_history.

The report always fits the result limit: warnings are trimmed first (warningsTruncated), then per-file rows (filesTruncated); totals stay exact. get_import_job fits its report the same way.

Every secret key belongs to exactly one project. Authentication derives the project from the key hash; tools do not accept a caller-supplied project ID. Database reads and writes repeat the project constraint, so guessing another project’s key or release UUID does not cross the boundary.

The endpoint applies these additional bounds:

  • Request body: at most 1 MiB.
  • Parsed requests also have bounded shape: at most 600 properties per object, 1,024 object properties and array items in total, 16 levels of nesting and 256-byte property names, plus a 448 KiB per-string ceiling. Cumulative JSON-encoded string content shares the 1 MiB body ceiling, so schema-valid multi-byte plural values are not rejected by a lower hidden aggregate limit. A request over one of these limits gets a JSON-RPC -32600 error whose message names the limit.
  • Large imports: send each import_translations file as contentJson (the whole i18next file as one JSON string). A string counts as one value, so the shape limits above don’t apply to its keys. The 448 KiB string ceiling applies to the JSON-encoded string, quotes and escapes included; documents may nest at most 32 levels, arrays included; a key’s full dotted path may be at most 2,048 bytes, and the full paths of every key and value in one call may total at most 4 MiB (a long parent key counts once per child); a "__proto__" key is refused; and one call carries at most 50,000 values across all its files (texts, plus nulls and arrays the import skips). Split larger imports by namespace or across calls. An apply runs as a job; see imports.
  • Fixed one-minute authentication-failure window: at most 60 failed authentication attempts per client IP. Successfully authenticated requests are refunded from this bucket so callers behind one NAT/CI egress do not consume each other’s authenticated quota.
  • Per credential: at most 120 requests per minute. This bucket is keyed by the credential’s SHA-256 fingerprint and is checked before the authentication query, so over-quota requests do not add database work.
  • A limited request returns 429; Retry-After reports the seconds remaining in the current fixed window.
  • Search and release pages: at most 100 records, with offsets capped at 10,000. search_keys also pages by cursor, which has no depth limit.
  • Each successful result representation: at most 256 KiB of UTF-8 JSON. Results are returned both as structuredContent and serialized JSON text for compatibility with clients that expose only content. Oversized results return response_too_large; provide one target locale, reduce limit, or narrow the search. The two representations contain the same JSON.
  • Tool validation rejects unknown locales, malformed IDs, overlong text, locale-restricted publish credentials, and publish attempts without the exact project-slug safety guard.

Rate-limit counters are kept per server process. They are not yet shared across processes, so treat them as a per-instance limit.

There is no way to reveal a token again or edit its capabilities in place. Rotate it instead:

Secret keys created before MCP scopes were introduced show Legacy secret key — rotate it to enable MCP. They do not authenticate at /mcp; migration does not guess or silently grant capabilities to an existing credential.

  1. Create a replacement key with the minimum required scopes and locales.
  2. Update the client’s secret and verify a read-only call such as get_project.
  3. Revoke the old key from Settings → API keys.

Revocation takes effect immediately. Use separate keys per client and environment, rotate on personnel or repository changes, and revoke immediately if a token may have entered logs, shell history, or version control.