Skip to main content
Glama

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_KEY

API Key application: 阿里云百炼控制台

How to start

python -m mc_translator_mcp

Configure 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

jar_parser.py

Parses the jar structure and discovers language files

lang_parser.py

Parses language files in .json / .lang format

translator.py

Batch translation with 通义千问 + local cache

pack_builder.py

Generates a resource pack or rewrites the jar

mcp_server.py

MCP server entry point, exposes two tools

Testing

python -m pytest tests/ -v

Design highlights

  1. Resource pack first: Generates an independent resource pack by default without modifying the original jar file.

  2. Smart caching: Entries with the same source text + modid are only translated once, avoiding duplicate token usage.

  3. Skip existing Chinese translations: Automatically skips when an existing zh_cn.json is detected, avoiding overwriting community translations.

  4. Batch translation: Translates up to BATCH_SIZE entries per batch, with a single API call returning all results.

  5. Format compatibility: Supports both .json (modern) and .lang (legacy) language file formats.

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Translate MCP — wraps LibreTranslate API (https://libretranslate.com/)

  • MCP server for GLM chat completions using Zhipu AI models via AceDataCloud

  • LibreTranslate MCP — open-source machine translation (BYO endpoint)

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dcd887/mc-translator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server