i18n-file-replace-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@i18n-file-replace-mcp Replace hardcoded strings in Home.vue with i18n keys using profile vue"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
i18n-file-replace-mcp
English | 中文
MCP (Model Context Protocol) server built on the external API of the i18n resource management platform (https://i18n.codeini.com). Exposes the i18n file replacement capability to MCP clients such as Claude Desktop and Qoder.
Requirements: Node.js >= 20.
Installation
cd i18n-file-replace-mcp
npm installStateless: every tool call talks directly to the remote platform API, no data is stored locally.
Related MCP server: @langapi/mcp-server
Configuration (MCP clients)
Generic (stdio)
{
"mcpServers": {
"i18n-file-replace": {
"command": "npx",
"args": ["--yes", "--package", "@codeini/i18n-file-replace-mcp", "i18n-file-replace-mcp"],
"env": {
"I18N_API_KEY": "your platform API key"
}
}
}
}Local directory (recommended, debuggable)
{
"mcpServers": {
"i18n-file-replace": {
"command": "node",
"args": ["C:/projects/codeini_playground/common/backend/Globalization/General/i18n-file-replace-mcp/src/index.js"],
"env": {
"I18N_API_KEY": "your platform API key",
"I18N_BASE_URL": "https://i18n.codeini.com"
}
}
}
}Environment variables
Variable | Description | Default |
| Platform API key (required, get it from the i18n platform) | none |
| API base URL |
|
| Dev-mode tenant override (sends | none |
Tools
Tool | Parameters | Returns |
|
|
|
| Same as above (no resourceSet write) |
|
| none | List of profiles (without configJson) |
|
|
|
|
|
|
| none | List of projects (id, name, locales, resourceSetCount) |
| none | List of resource set names |
|
| List of |
|
| Single file: |
(* = required; provide at least one of configJson / profileName, configJson takes precedence.)
resourceSetByDir mirrors the CLI's --resource-set-by-dir: when fileName carries a directory prefix (e.g. member/list.vue), the actual resource set becomes <resourceSet>.<first-level dir> (e.g. portal.member).
download_resources returns file contents as text — writing them to disk is up to the caller.
Usage examples
List the available profiles:
list_profilesPreview a replacement (no database write):
preview_replace { fileName: "Home.vue", content: "<template>...</template>", profileName: "vue-home" }Replace and write the keys into a resource set:
replace_file { fileName: "Home.vue", content: "<template>...</template>", configJson: "{...}", resourceSet: "home" } // also produce English alongside zh in one call: replace_file { fileName: "Home.vue", content: "...", profileName: "vue", resourceSet: "home", translateTo: ["en"] }
Debugging
Validate the tools with MCP Inspector:
npx @modelcontextprotocol/inspector node src/index.jsCommon errors
Symptom | Fix |
| Check |
| Check the network and that |
| The profile name passed to |
Publishing to npm
A release is cut from a git tag: push vX.Y.Z (the same version as package.json) and the
Release workflow runs the tests, then submits this version with npm stage publish.
Staged publishing means the workflow can only queue the package in npm's staging area — nobody
installs it from there. Making it live requires a maintainer to approve it on
https://www.npmjs.com under the Staged Packages tab (or npm stage approve <stage-id> in the
CLI), and that step needs 2FA. CI structurally cannot publish on its own. The workflow reads
the NPM_TOKEN repository secret, which must carry @codeini publish rights.
npm test # what CI runs, on your machine
npm run publish:npm # stage this working copy by hand (needs NPM_TOKEN)
npm stage list @codeini/i18n-file-replace-mcp # find the stage-id
npm stage approve <stage-id> # make it live (your own npm login + 2FA)Available Tools
9 toolsdownload_resources下载资源集翻译A
从 i18n 平台导出指定资源集的翻译内容。单语言返回单个文件内容;多语言或 .resx 返回 ZIP,会自动解包为 { files: [{name, content}] }。返回内容为文本,写盘由调用方决定。需配置环境变量 I18N_API_KEY。
Inputs: resourceSet (required), format, locale.
get_profile获取 i18n 替换配置A
按名称获取 i18n 平台上保存的替换配置详情,含 configJson。需配置环境变量 I18N_API_KEY。
Inputs: name (required).
list_profiles列出 i18n 替换配置A
列出当前账号在 i18n 平台上保存的替换配置(不含 configJson 内容)。需配置环境变量 I18N_API_KEY。
Inputs: no named parameters.
list_projects列出 i18n 项目A
列出当前账号在 i18n 平台上的全部项目(含资源集数量)。需配置环境变量 I18N_API_KEY。
Inputs: no named parameters.
list_resource_keys列出资源集内的 keyA
列出指定资源集中的全部资源 key(resourceId)及其是否有值。需配置环境变量 I18N_API_KEY。
Inputs: resourceSet (required), projectId.
list_resource_sets列出资源集A
列出当前账号在 i18n 平台上的全部资源集名称。需配置环境变量 I18N_API_KEY。
Inputs: no named parameters.
preview_replacei18n 文件替换预览A
预览 i18n 文件替换结果,不写入资源库。返回 originalContent、content、generatedKeys 与 keyCount。需配置环境变量 I18N_API_KEY。 必须提供 configJson 或 profileName 之一。
Inputs: content (required), fileName (required), configJson, profileName, +2 more.
replace_filei18n 文件替换A
调用 i18n 平台(https://i18n.codeini.com)文件替换 API,将普通代码文件转换为支持多语言的代码文件。返回替换后的 content、生成的 generatedKeys 与 keyCount。需配置环境变量 I18N_API_KEY(平台 API Key)。 必须提供 configJson 或 profileName 之一。 提供 translateTo(目标语言数组,如 ["en"])且带 resourceSet 时,替换后会把每个 key 机翻到目标语言并一并写入资源库(返回 translatedCount)。
Inputs: content (required), fileName (required), configJson, profileName, +4 more.
save_profile保存 i18n 替换配置A
在 i18n 平台上创建或更新一个替换配置(config profile),供 replace_file/preview_replace 通过 profileName 复用。需配置环境变量 I18N_API_KEY。
Inputs: name (required), configJson (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct resource/action: replace vs preview, profile management (list/get/save), and resource queries (projects/sets/keys/download). Descriptions clearly distinguish overlapping operations like replace_file and preview_replace.
All tool names follow the same lower_snake_case convention with an action-first pattern (replace_, preview_, list_, get_, save_, download_). The naming is uniform and predictable across the entire set.
9 tools are well-scoped for the purpose of i18n file replacement and associated profile/resource management. The count is comfortably within the ideal 3-15 range, and each tool earns its place.
Core workflows (preview, replace, profile create/update, and resource browsing/export) are fully covered. A minor gap is the absence of a profile deletion tool, leaving the profile lifecycle slightly incomplete, but agents can still work around this easily.
Maintenance
Related MCP Connectors
AI-native translation management: push translation files, translate, review and audit strings.
Manage app translations: find and create keys, draft translations, commit and ship OTA releases.
Find missing translations in your app, propose texts and publish and deploy them to your CDN.
Find hardcoded UI text, give it translation keys, translate it and write the locale files.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceLocalization as code — push, pull, translate, and extract strings from code with AI. 7 MCP tools for type-safe i18n across 182 languages.199 npm2MIT
- AlicenseAqualityDmaintenanceMCP server for AI-powered translation management in i18n projects, enabling automated locale detection, translation status checks, and sync via LangAPI.426 npm1MIT
- AlicenseBqualityDmaintenanceManages Angular internationalization (i18n) by extracting, listing, and updating translation strings in XLIFF format through MCP tools.517 npm1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides internationalization MCP tools enabling AI agents to perform translations, locale management, and i18n operations.1,580 npmMIT