mc-translator-mcp
Translates Minecraft mod jars into Chinese resource packs using AI providers, with zero-cost previews and batch processing.
translate_mod — Translate a single mod jar into a Chinese (
zh_cn) resource pack, with configurable batch size and optional forced re-translation (ignores cache).translate_all_mods_in_directory — Batch-translate every jar in a directory (glob pattern, default
*.jar) and return a summary.preview_mod — Zero-cost scan of a jar: lists language files, entry counts, existing
zh_cnpresence, and estimated token usage without calling any AI or writing files.dry_run_mod — Sample-translate a small number of entries (default 20) to preview translation quality; consumes a little token, writes no files.
Supports multiple OpenAI-compatible providers (custom, agnes, Qwen/DashScope, DeepSeek fallback), custom glossaries, translation caching, and output to
output/<modid>-zh-cn/.
Allows the MCP server to use OpenAI-compatible API providers as translation backends for translating Minecraft mod language files, with configurable API key, base URL, and model.
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., "@mc-translator-mcp translate the mod at C:/mods/mymod.jar"
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.
mc-translator-mcp
Minecraft mod Chinese-translation MCP tool
Automatically extracts language files from mod jars, calls 通义千问 for batch translation, and generates Chinese resource packs.
Installation
cd mc-translator-mcp
pip install -e .Related MCP server: NetEase ModSDK MCP Server
Configuration
Copy .env.example to .env and fill in your 通义千问 API Key:
cp .env.example .env
# 编辑 .env,填入 DASHSCOPE_API_KEYAPI Key application: 阿里云百炼控制台
How to start
As an MCP server (recommended)
python -m mc_translator_mcpConfigure the MCP server in Trae/Claude Desktop:
{
"mcpServers": {
"mc-translator-mcp": {
"command": "python",
"args": ["-m", "mc_translator_mcp"]
}
}
}CLI mode
# 检查 jar 语言文件
python -m mc_translator_mcp check <jar_path>
# 翻译单个 jar
python -m mc_translator_mcp mod <jar_path> [--batch-size 15] [--force-retranslate]
# 批量翻译目录下所有 jar
python -m mc_translator_mcp dir <directory> [--glob "*.jar"] [--batch-size 15]Usage examples
Using the MCP tools in Trae conversations
Tell Trae directly:
"Help me translate this mod: /path/to/mymod.jar"
Trae will automatically call translate_mod or translate_all_mods_in_directory from the MCP tools.
Running locally
# 翻译单个模组
python -m mc_translator_mcp mod "C:/Users/kjds/Desktop/mods/myzombie.jar" --batch-size 20
# 批量翻译整个 mods 目录
python -m mc_translator_mcp dir "C:/Users/kjds/Desktop/.minecraft/mods" --glob "*.jar"Output
Outputs to the output/ directory by default, and generates an independent resource pack for each mod:
output/
├── mymod-zh-cn/
│ ├── pack.mcmeta
│ └── assets/mymod/lang/zh_cn.json
├── zombie_mod-zh-cn/
│ ├── pack.mcmeta
│ └── assets/zombie_mod/lang/zh_cn.json
└── ...To load it: copy the output/<modid>-zh-cn/ folder into Minecraft's resourcepacks/ directory.
Core modules
Module | Function |
| Parses the jar structure and discovers language files |
| Parses language files in .json / .lang format |
| Batch translation with 通义千问 + local cache |
| Generates a resource pack or rewrites the jar |
| MCP server entry point, exposes two tools |
Testing
python -m pytest tests/ -vDesign highlights
Resource pack first: Generates an independent resource pack by default without modifying the original jar file.
Smart caching: Entries with the same source text + modid are only translated once, avoiding duplicate token usage.
Skip existing Chinese translations: Automatically skips when an existing
zh_cn.jsonis detected, avoiding overwriting community translations.Batch translation: Translates up to BATCH_SIZE entries per batch, with a single API call returning all results.
Format compatibility: Supports both .json (modern) and .lang (legacy) language file formats.
Available Tools
4 toolsdry_run_modA
预览翻译效果:解析单个模组并抽样翻译一小部分,不写入任何文件。
注意:本工具会调用 AI 翻译 API 并消耗少量 token(最多 limit 条样例),
只用来快速感受翻译质量,不会生成资源包、不改动原 jar。
Args: jar_path: 模组 jar 文件的绝对路径 limit: 最多预览(抽样翻译)的条目总数(默认 20) batch_size: 每批翻译的词条数(默认 15) Returns: 预览 JSON,含原文-译文对照样例
Inputs: jar_path (required), limit, batch_size. Returns: result
preview_modA
(零成本)预览单个模组的汉化范围:列出每个语言文件、条目数与预估 token。
只做 jar 扫描与文本解析,不调用任何 AI 翻译 API、不消耗 token、不写任何文件, 用于在真正翻译前评估工作量与费用。
Args: jar_path: 模组 jar 文件的绝对路径 Returns: 预览摘要 JSON(含每个 modid 的格式、条目数、是否已有 zh_cn、社区估算 token)
Inputs: jar_path (required). Returns: result
translate_all_mods_in_directoryB
批量翻译目录下所有模组 jar 包。
Args: directory: 包含模组 jar 的目录路径 glob_pattern: jar 文件匹配模式(默认 *.jar) batch_size: 每批翻译的词条数 force_retranslate: 强制重新翻译 Returns: 批量翻译汇总
Inputs: directory (required), batch_size, glob_pattern, force_retranslate. Returns: result
translate_modA
翻译单个 Minecraft 模组 jar 包,生成中文资源包。
Args: jar_path: 模组 jar 文件的绝对路径(如 C:...\mymod-1.2.0.jar) batch_size: 每批翻译的词条数(默认 15,越大越快但单次请求更长) force_retranslate: 强制重新翻译(忽略缓存,慎用) Returns: 翻译结果摘要(包含每个模组的输出路径)
Inputs: jar_path (required), batch_size, force_retranslate. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
preview_mod and dry_run_mod both preview a single mod, but one is a zero-cost scope review and the other samples actual AI translations, so the cost/AI distinction prevents most confusion. translate_mod and translate_all_mods_in_directory are clearly distinguished by single vs batch scope.
All tool names use snake_case and follow an action_mod pattern, which is mostly consistent. The only minor deviation is dry_run_mod, which uses a compound action phrase rather than a simple verb_noun, and translate_all_mods_in_directory is noticeably longer than the others.
Four tools are well-scoped for a Minecraft mod translation workflow: preview scope, preview quality, translate one, and translate many. No tool feels redundant, and the count matches the domain without being thin or bloated.
The surface covers the core translation lifecycle from cost estimation and sampled preview through single-mod and batch translation. Minor gaps remain around explicit output/language configuration or result validation, but agents can work around these.
Related MCP Connectors
MCP server for GLM chat completions using Zhipu AI models via AceDataCloud
Translate MCP — LibreTranslate-compatible machine translation.
LibreTranslate MCP — open-source machine translation (BYO endpoint)
MCP server for Qwen Image 3 AI image generation
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceIntegrates local language models (like Qwen3-8B) with MCP clients, providing tools for chat, code analysis, text generation, translation, and content summarization using your own hardware.-
- AlicenseNot gradedqualityCmaintenanceEnables document retrieval, code generation, and code review for Minecraft China (NetEase) ModSDK development. It automates the creation of Mod projects, JSON configurations, and Python scripts while ensuring compliance with official development standards.100GPL 3.0
- AlicenseAqualityDmaintenanceMCP server for page-level i18n translation using Alibaba Cloud Qwen models, supporting incremental translation, glossary, and multiple target languages.312 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables scanning game or mod directories for translatable text files, invoking OpenAI-compatible AI translation services, and writing Chinese translations to an isolated output directory without modifying original files.MIT