xcstrings-mcp 0.3.2

MCP server for iOS/macOS .xcstrings localization file management
Documentation

xcstrings-mcp

CI Crates.io License

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

cargo install xcstrings-mcp
# or
cargo binstall xcstrings-mcp

Configure Claude Code

claude mcp add xcstrings-mcp -- xcstrings-mcp

Usage

Typical workflow:

  1. Parse the .xcstrings file to cache it
  2. Get untranslated strings in batches that fit the context window
  3. 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 .xcstrings format, CLDR plural rules, format specifiers
  • io -- FileStore trait + real filesystem implementation with atomic writes

License

Licensed under either of

at your option.

Contributing

See CONTRIBUTING.md for development setup and guidelines.