xcstrings-mcp
MCP server for iOS/macOS .xcstrings localization file management.
The Problem
Xcode String Catalogs (.xcstrings) are large JSON files that waste LLM context windows when loaded whole. Manual editing risks corrupting Xcode's specific formatting, there's no validation for format specifiers or plural rules, and plural-aware translation requires understanding CLDR categories across 40+ locales.
Quick Start
Install
# or
Configure Claude Code
Usage
Typical workflow:
- Parse the
.xcstringsfile to cache it - Get untranslated strings in batches that fit the context window
- Submit translations with automatic validation and atomic writes
parse_xcstrings → get_untranslated → submit_translations
Tools
| Tool | Description |
|---|---|
parse_xcstrings |
Parse and cache .xcstrings file |
get_untranslated |
Get untranslated strings with batching |
submit_translations |
Validate and write translations atomically |
get_coverage |
Per-locale coverage statistics |
get_stale |
Find stale/removed keys |
validate_translations |
File-wide validation report |
list_locales |
List locales with stats |
add_locale |
Add new locale with empty translations |
get_plurals |
Extract keys needing plural translation |
get_context |
Find related keys by shared prefix |
Architecture
┌─────────────┐ stdio/JSON-RPC ┌─────────────────┐ File I/O ┌──────────────────────┐
│ Claude Code │◄───────────────────►│ xcstrings-mcp │◄────────────►│ Localizable.xcstrings │
│ (translates) │ │ (Rust MCP server)│ │ (JSON on disk) │
└─────────────┘ └─────────────────┘ └──────────────────────┘
Layered architecture: server -> tools -> service -> model, with io injected via the FileStore trait.
- server -- MCP tool routing and handler dispatch
- tools -- individual tool implementations
- service -- pure logic (parser, extractor, merger, validator, formatter); no I/O
- model -- serde types for
.xcstringsformat, CLDR plural rules, format specifiers - io --
FileStoretrait + real filesystem implementation with atomic writes
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributing
See CONTRIBUTING.md for development setup and guidelines.