About MCP I18n Extractor
MCP I18n Extractor extracts internationalization strings from JavaScript and TypeScript into JSON files, preserving nested data and template interpolations. It is for developers migrating or maintaining translation files.
Key features
- 01Extracts directly exported objects
- 02Preserves nested objects and arrays
- 03Handles template string interpolation
- 04Merges with existing JSON files
- 05Configurable source file replacement
Use cases
- 01Move JavaScript translation objects into JSON
- 02Extract localized strings with interpolation
- 03Merge extracted strings into existing translation files
MCP support
As an MCP server, it provides the `extract_i18n` tool to extract internationalization strings from a source file into a specified JSON file.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP I18n Extractor
A Model Context Protocol (MCP) tool for extracting i18n strings from JavaScript/TypeScript code into JSON files.
Features
- Extracts i18n strings from direct object exports (
export default { ... }) - Preserves nested objects and arrays
- Handles template strings with variable interpolation
- Supports various data types (strings, numbers, booleans, null, undefined)
- Merges with existing JSON files when present
- Replaces source files with a migration message (configurable)
Installation
npm install @access-intelligence/mcp-i18n
Usage with MCP
When used via MCP, the tool offers a single operation:
extract_i18n: Extract i18n strings from source code to a JSON file
Example
extract_i18n(
sourcePath: "/path/to/translations.js",
targetPath: "/path/to/output.json"
)
Environment Variables
DISABLE_SOURCE_REPLACEMENT: Set to 'true' to prevent replacement of source files after extractionWARNING_MESSAGE: Customize the warning message added to replaced source files
Testing
npm test
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.