WraithMCP
Supports Django/Gettext localization: scans Django templates and Python source for hardcoded strings and concatenations, writes lossless PO files, and validates placeholders and plural forms.
Supports i18next/react-i18next projects: reads and writes lossless JSON locale files, handles $t() placeholders and i18next plural suffix keys, and runs deterministic structural checks.
Segments and translates Markdown documents at paragraph level, preserving soft wraps, CRLF, code blocks, link-reference URLs, and inline code.
Segments and translates MDX documents, protecting inline code, URLs, MDX import/export blocks, and expressions.
Supports Next.js localization via next-intl/react-i18next, AST scanning for hardcoded strings, lossless JSON locale writes, and placeholder/plural checks.
Supports Vue/Nuxt localization via vue-i18n/@nuxtjs/i18n, SFC/Babel scanning for hardcoded strings, lossless JSON locale writes, and placeholder/plural checks.
Supports React/Next.js localization via next-intl/react-i18next, AST scanning for hardcoded strings, lossless JSON locale writes, and placeholder/plural checks.
Supports SvelteKit localization via Paraglide/svelte-i18n, Svelte/Babel scanning for hardcoded strings, lossless JSON locale writes, and placeholder/plural checks.
Reads and writes lossless Rails I18n YAML locale files, preserving CST formatting and plural subkeys while validating placeholders.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Wraith
Your coding agent already writes the code. Wraith turns it into a localization engineer. The agent does the translating. Wraith gives it memory, rules and deterministic checks: placeholders, ICU plurals, glossary, staleness, and rendered layout down to the pixel. Except for one opt-in quality-estimation step, no model is called.
CLI:
wraith· MCP server:wraith mcp· project state lives in.wraith/
Results
An independent, judge-validated evaluation (two judges, blinded and position-swapped, 100% planted-corruption detection). Full report: eval/REPORT.md · report.html
4 framework stacks × 5 languages (es-MX, de, ja, ar, pl)
System | Sense accuracy on ambiguous strings | Deterministic check errors |
Codex + Wraith (A) | 99.5% | 0 |
Codex alone (A0) | 99.8% | 28 |
DeepL + glossary (B) | 59.3% | 53 |
DeepL + | 86.7% | 42 |
5 real OSS repos (next-intl, hoppscotch, immich, mastodon, wagtail): check errors A 6 · A0 67 · B 116
Release replay (N → N+1): stale-source detection precision = recall = 1.0
Rendered layout (nextjs-commerce, 7 locales, 375/1280 px): 26 → 8 → 0 defects (baseline →
layout --fixcodemods → one prescribed agent edit)Stage 4 (TM context ablation, 482 items): dataset and metrics pipeline validated in a dry run; full run pending (Section 13)
The agent alone translates about as well as with Wraith. What Wraith adds is that the output ships: no broken placeholders, plurals or glossary terms, no stale strings, and no clipped or mirrored-wrong UI.
Related MCP server: MCP Software-Engineering RL Environment
Example session
> Make my site available in Mexican Spanish, French and Simplified Chinese.
● wraith.scan → nextjs, next-intl · 14 hardcoded strings · 3 concatenations
● (agent extracts strings and translates in full component context via prepare + apply)
● wraith.check → FAIL · 2 broken {count} placeholders · "Post" → entrada / publicar (inconsistent)
● (agent fixes)
● wraith.pseudo → generated en-x-pseudo · 2 layout QA hotspots (w-20 truncate whitespace-nowrap)
● wraith.check → PASS · 0 errors · 3 strings worth a native speaker's look
## Wraith Localization Report
**Status:** ✓ Clean (0 errors) · **Warnings:** 1 · **Source:** `en` · **Targets:** `es-MX`, `fr`, `zh-Hans`
### Assumptions Made
- **brand**: Kept "Acme Pulse" untranslated across all locales.
- **tone** (`es-MX`): Used informal "tú" register for es-MX consumer UI.
### Strings Worth a Native Speaker's Look (3)
| Locale | Key | Source | Translation | Why |
|---|---|---|---|---|
| `es-MX` | `feed.postHeading` | Post | Publicación | Ambiguous short UI term "Post" — verify meaning matches context. |
| `fr` | `feed.openMenu` | Open | Ouvert | Usage context changed (moved from FileMenu to StoreHoursBanner). |
| `zh-Hans` | `home.roleBadge` | Admin ({count, plural, ...}) | 管理员(...) | Verify plural & role phrasing in context. |Why Wraith?
Model-free translation: Wraith never translates and never calls an MT API. Your coding agent (Claude Code, Codex, Gemini CLI, etc.) is the only translation engine. The single opt-in model call is
wraith qeTier 2 (three LLM critics), which runs only ifANTHROPIC_API_KEYorGEMINI_API_KEY/GOOGLE_API_KEYis set; without keys it is skipped and segments areunscored, neververified.Deterministic core: Scanning, placeholder/ICU/plural verification, fuzzy matching, lossless file writes, and reporting are 100% deterministic and work offline.
Explicit verification outcomes (
PASS/FAIL/INCONCLUSIVE):wraith checkfails closed — unsupported projects, monorepos with unconfigured apps, or zero scanned coverage returnINCONCLUSIVE(exit code2) rather than a falsePASS. Deterministic verification checks structure, placeholders, plurals, glossary rules, and static scanner heuristics; it does not establish linguistic accuracy or native fluency.State lives in git: All memory is plain, diffable JSON/JSONL inside
.wraith/, committed alongside your code.status,check,prepare, andreportare strictly read-only.Workspace security boundary: All reads, writes, locale identifiers, reviewer imports, document outputs, and MCP
rootDirparameters are confined to the authorized project workspace with symlink and archive-size protections.Advisory memory, never blind auto-fill: Even 100% lexical matches are surfaced as strong contextual suggestions with prior usage context so your agent verifies meaning before reusing them.
Visual & layout QA: Pseudo-locales (
wraith pseudo), rendered layout checks (wraith layout), and a baseline geometry diff (wraith visual-qa, 0 LLM tokens, no VLM) catch truncation, overflow, wrap regressions, occlusion, tofu, contrast, and RTL breakage.CI and human loop: A deterministic PR gate (
extract+check+visual-qa), an on-demand/localizeagent job, QE risk routing, and XLIFF 2.0 / TMX / TBX round-trips with any TMS.
Installation (Local Source Build)
Release status:
wraith-mcpis not yet published to npm. Install and run from a local checkout until an official release is published.
git clone <this-repo> wraith
cd wraith
npm ci
npm run build
# Optional: make `wraith` available on PATH locally
npm linkConnect to your coding agent (MCP over stdio)
# Claude Code (if linked on PATH)
claude mcp add wraith -- wraith mcp
# Or point directly at the built CLI with Node (no PATH changes needed):
claude mcp add wraith -- node /absolute/path/to/wraith/dist/bin.js mcpInitialize a project & pre-commit hook
wraith init --targets es-MX,fr,zh-Hans --hookThis creates .wraith/config.json, seeds staleness baselines for any existing translations, adds the completion rule (Localization is not done until \wraith check` passes.) to AGENTS.md/CLAUDE.md, and installs a pre-commit hook that resolves WRAITH_BIN, ./node_modules/.bin/wraith, or wraithonPATH`.
Supported Frameworks & Documents
Software Stacks (Two-Layer Architecture: Format Layer + Scanner Layer)
Stack | Library | Locale Format | Placeholder & Plural Model | Scanner |
React / Next.js |
| Splice-based lossless JSON (preserves key order, escapes, BOM) | ICU (cardinal + |
|
Vue / Nuxt |
| Splice-based lossless JSON |
|
|
SvelteKit | Paraglide (v1 & v2 variants), | Splice-based lossless JSON (ignores | ICU-like |
|
Rails | Built-in I18n | Lossless YAML ( |
| ERB & Ruby scanner (incl. lazy |
Django | Gettext | Lossless PO (comments/refs preserved, clears |
| Django template & Python scanner ( |
Hardcoded-string detection is heuristic. Static AST/template scanning catches common JSX, attribute, variable-initializer, array, state-setter, and template patterns while suppressing technical strings (URLs, SQL, headers, loggers), but it cannot guarantee 100% recall on arbitrary dynamic indirection or custom helpers. Combine
wraith scanwithwraith pseudovisual inspection to catch anything missed statically.Deterministic checks do not verify linguistic accuracy.
wraith checkreturnsPASS,FAIL, orINCONCLUSIVEfor structural, placeholder, plural, glossary, staleness, and scanner checks — it does not prove native fluency.
Documents
DOCX (
.docx): Byte-preserving OOXML splice engine — never deserializes into a lossy DOM.Merges adjacent
<w:r>runs with identical<w:rPr>formatting while keeping bookmark and comment-range anchors intact.Handles body, tables, headers/footers, footnotes/endnotes, comments, text boxes (deduplicating
mc:Fallback), inline content controls (w:sdt), smart tags (w:smartTag/w:customXml), hyperlinks (includingHYPERLINKcomplex fields), and tracked insertions (w:ins).Protects tracked deletions (
w:del), dynamic fields (PAGE,DATE), and drawings; strips XML-invalid control characters; enforces ZIP decompression limits.Incremental batch translation persists content-hashed segment records in
.wraith/documents.jsonso insertions/deletions/reordering never shift translations onto the wrong paragraph, source edits surface asstale_source, and manual reviewer edits in the target document survive subsequent batches; unchanged round-trips are byte-identical.
Markdown / MDX (
.md,.mdx): Paragraph-level segmentation (preserves soft-wrapped prose & CRLF), skips fenced/indented code blocks, link-reference URLs, and multi-line MDXimport/exportblocks, and protects inline code, URLs, and MDX{expressions}via<x/>/<g>tags.
CLI Commands (Works Without Any Agent)
Global option: -C, --cwd <dir> (project root). Gates exit 0 PASS · 1 FAIL · 2 INCONCLUSIVE.
Command | Purpose | Key options |
| create |
|
| project facts (read-only) |
|
| hardcoded strings, concatenations, usage |
|
| deterministic extraction gate: hardcoded strings / concatenations / hardcoded formatting left in source (reports; the agent refactors) |
|
| deterministic verification gate |
|
| pseudo-locales with zero-width key IDs |
|
| rendered layout checks + codemods |
|
| geometry regression diff vs baseline |
|
| tiered quality estimation → |
|
| package / ingest cross-model MQM review |
|
| CSV/XLSX/HTML human review export / import |
|
| TMS bundle: XLIFF 2.0, TMX 1.4b, TBX-Basic, screenshots |
|
| glossary/TM/locale assets, or reviewed |
|
| end-of-run Markdown/JSON report |
|
| start the MCP server (stdio) |
Exit codes for visual-qa: 1 regression, 2 no Playwright/server/baseline. qe exits 1 if any segment risk > --fail-above or any needs_review. extract --fail-on-unextracted exits 1 while hardcoded strings or concatenations remain.
Layout & Formatting QA (v1)
Wraith stays model-free while verifying rendered UI layout and locale formatting deterministically:
Target-aware pseudo-locales (
wraith pseudo --mode auto): generatesen-XA(IBM length-scaled expansion + format overlay),ar-XB(RTL RLO/PDF with LRI/PDI isolation for placeholders & DNT brands),ja-XC(CJK fullwidth without spaces),th-XD(stacked tall diacritics), andde-XE(unbreakable compound words) based ontargetLocales. Each pseudo string embeds its key ID in invisible zero-width characters so rendered browser findings map directly back to catalog keys.Rendered Playwright checks (
wraith layout): renders configured routes across pseudo and target locales at 375px and 1280px to measure horizontal/vertical overflow, clipped text, overlapping sibling boxes, tofu/missing glyphs,dir/langmismatches, and hardcoded formats surviving informatmode. ReturnsINCONCLUSIVE(neverPASS) when Playwright is not installed or nobaseUrlis configured.Remediation ladder (
wraith layout --fix+.wraith/layout.jsonbudgets):Deterministic mechanical codemods (
layout --fix,destructiveHint: true): Tailwind physical→logical (ml-/mr-→ms-/me-,pl-/pr-→ps-/pe-,left-/right-→start-/end-,text-left/right→text-start/end,rounded-l/r,border-l/r), fixedw-*→min-w-*on constrained text, root<html>dir/langinjection across Next.js/React, Vue, SvelteKit, Rails, and Django, andhyphens-autoon flagged long-word elements.Structured agent prescriptions (
file:line, constraint, measured overflow px) for judgment edits.Per-key/locale width budgets saved to
.wraith/layout.json, surfaced inprepare, and enforced incheck(layout_budget_exceeded).Approved locale abbreviations in
.wraith/glossary.json(abbreviations) with full labels kept intitle/aria-label.
Static CSS & formatting rules: detects tight layout constraints in inline
style={{...}}, styled-components/Emotion, CSS Modules, and plain CSS, plushardcoded_formattingfindings for.toFixed(), locale-lesstoLocaleString()/Intl.*Format(), currency concatenation, manually assembled dates,.toUpperCase()/.toLowerCase()on visible text, and locale-less.localeCompare().
Honest Limits of Layout & Formatting v1
Rendered checks require a running dev server and optional Playwright. Without Playwright or a reachable
baseUrl,wraith layoutreturnsINCONCLUSIVEand falls back to static checks only.Character-based width budgets are approximate. v1 converts measured element pixel width into
budgetCharsusing an average glyph-width heuristic (0.56 × fontSize), so variable-width proportional fonts and CJK/Arabic scripts should still be re-verified viawraith layout.Mechanical codemods are Tailwind-first. Automatic
--fixrewrites target Tailwind utility classes and root HTMLdir/lang; custom CSS modules, styled-components, and structural flexbox/grid refactors are emitted as agent prescriptions rather than mutated automatically.
Visual QA, QE & TMS
visual-qa: per-element geometry (lineCount, size, overflow, clipping, occlusion, font load, contrast) diffed against.wraith/visual-baseline.json; rulesline_wrap_regression,container_blowout,text_truncation,element_occlusion,missing_glyph_tofu,contrast_regression. Failure-only screenshots in.wraith/artifacts/visual-qa/. See docs/VISUAL_QA.md.qe: Tier 1 deterministic (check validations + width budget) → Tier 2 three critics (terminology/TM drift, UI context, semantic/omission; opt-in tokens) → Tier 3 risk0–100.<25verified,25–60one optional--auto-repairpass, otherwiseneeds_review.export/import: XLIFF 2.0 units carrymda:metadata (file, line, component, risk,max_chars,max_width_px, TM similarity) and critic notes; reviewed XLIFF is re-validated and stored in.wraith/tm.jsonashuman-reviewed, which outranksllm-generatedTM. See docs/QE_AND_TMS.md.directional_assetcheck (warning): directional icons (ArrowLeft/Right,ChevronLeft/Right,CaretLeft/Right, back/next arrows, directional svg/img names) withoutrtl:rotate-180,rtl:-scale-x-100, dir-aware mirroring, or a logical swap — only whenar,he,fa, oruris a target.
MCP Tools
17 tools, each with annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint), outputSchema, and structuredContent:
Tool | Annotation | Notes |
| read-only | |
| read-only | persists optional width budgets to |
| read-only | writes failure artifacts / baseline only when capturing |
| read-only | writes only to the explicit export dir |
| mutating, non-destructive | |
| destructive | |
| destructive |
|
| destructive | validated catalog writes + human-reviewed TM |
Prompt: /localize. Agent playbooks: skills/ — i18n-prep, localize-pr, layout-remediation, qe-triage, tms-roundtrip (docs/SKILLS.md).
CI Quickstart
.github/workflows/wraith.yml (also usable via workflow_call):
deterministic-l10n-gate(pull_request, 0 LLM tokens):wraith extract --fail-on-unextracted,wraith check,wraith visual-qa --base .wraith/visual-baseline.json; sticky PR summary; artifacts on failure.update-baseline(push to main): recaptures the baseline as an artifact; commit it via a reviewed PR.agentic-localize(/localizecomment by OWNER/MEMBER/COLLABORATOR, or manual): Claude Code or Codex translates changed source keys via thelocalize-prskill, thencheck+qe; commits only onPASS;needs_reviewkeys are exported as XLIFF and commented with risk scores.
Set preview_build / preview_start / preview_url (defaults npm run build, npm run start, http://localhost:3000) and secrets ANTHROPIC_API_KEY or OPENAI_API_KEY for /localize. Details: docs/GITHUB_CI.md.
Benchmarks
From eval/REPORT.md (Stage 3, 4 synthetic stacks × 5 languages; A = Codex + Wraith MCP, A0 = Codex alone, B = DeepL + XML + glossary, B+ctx = DeepL with context):
System | Challenge sense accuracy |
|
A | 99.5% | 0 |
A0 | 99.8% | 28 |
B | 59.3% | 53 |
B+ctx | 86.7% | 42 |
Layout & Formatting v1 (nextjs-commerce, 7 locales, 375/1280px): 26 → 8 → 0 rendered defects (baseline → layout --fix → one prescribed agent edit).
Stage 4 (TM ablation: human-reviewed TM + QE routing) is dry-run validated; full run pending — node eval/run.mjs run --scopes tm-ablation, results to eval/REPORT.md Section 13.
Standalone Executables & Platform Compatibility
# Use an official standalone nodejs.org binary for portable Linux builds:
WRAITH_NODE_BIN=/path/to/official/node npm run build:seaLinux (
x64): Built and verified locally via Node SEA (node --build-sea). Note that building with a distro-packaged shared-library/usr/bin/node(e.g. Arch Linux) links distro shared libraries (lddwarning is printed automatically); portable Linux release binaries must be built against an official standalonenodejs.orgruntime.macOS & Windows: CI build matrix is configured in
.github/workflows/release.yml(includingcodesign --sign -on macOS), but macOS and Windows binaries have not yet been executed or verified in this environment.
Architecture & Docs
audit/AUDIT_REPORT.md (historical audit record)
License
MIT — all 142 runtime dependencies are audited permissive (MIT / Apache-2.0 / BSD / ISC).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Website QA for your coding agent: audit SEO, performance, security, accessibility over MCP.
Remote MCP for AI Studio Android release gate MCP, structured receipts, audit logs, and reviewer-rea
Remote MCP for Gemini upgrade evals, prompt regressions, output diffs, and eval receipts.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Related MCP Servers
AlicenseAqualityCmaintenanceAn MCP server for in-loop design review of web previews. It enables agents to submit a preview URL, receive structured findings with suggested fixes, and recheck after applying changes, while never editing code itself.52MIT- FlicenseNot gradedqualityDmaintenanceEnables reproducible evaluation of AI coding agents by exposing repository inspection, code editing, test running, and deterministic verification through MCP tools.-

TestChimp MCP Serverofficial
AlicenseNot gradedqualityBmaintenanceEnables coding agents to run QA using coverage signals, in-repo test plans, and release governance, and to call backend API endpoints through MCP tools.1,476 npmMIT- AlicenseBqualityBmaintenanceEnables AI coding agents to inspect dependency graphs, calculate downstream blast radius, and verify architectural status before and after edits through locally run MCP tools.4MIT