What is MCP I18n Extractor?
MCP I18n Extractor is an MCP server that extracts i18n (internationalization) strings from JavaScript/TypeScript source files and outputs them as structured JSON files. It is designed for developers working on multilingual applications who need to automate the initial extraction of translation keys from their codebase.
How to use MCP I18n Extractor?
Install the npm package (@access-intelligence/mcp-i18n), then configure your MCP client to use the server. The server exposes a single tool operation, extract_i18n, which requires a sourcePath (path to the JS/TS file) and a targetPath (path for the output JSON).
Key features of MCP I18n Extractor
- Extracts i18n strings from direct object exports (
export default { ... })
- Preserves nested objects and arrays in the output JSON
- Handles template strings with variable interpolation
- Supports strings, numbers, booleans,
null, and undefined
- Merges with existing JSON files instead of overwriting
- Replaces source files with a configurable migration message (can be disabled)
Use cases of MCP I18n Extractor
- Automatically generate a JSON translation file from a single JS/TS i18n module
- Migrate a codebase by replacing old i18n source files with a warning placeholder
- Integrate i18n extraction into a CI/CD pipeline via MCP client automation
评论