Mc Rp Assistant

io.github.dcd887由 GitHub 帳號 dcd887 發布v1.0.0更新於 Oct 24, 2026

Minecraft 资源包助手:贴图清单、模型校验、语言文件检查

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理檢查、驗證與比較 Minecraft 資源包,並在 Modrinth 上搜尋資源包。

可以做什麼
  • 讀取 pack.mcmeta,並列出資源包目錄或 .zip 檔中的資源路徑(貼圖、模型、音效、語言檔)
  • 驗證資源包結構,標示缺少的檔案、格式不符與過大的圖示
  • 驗證貼圖的大小上限與命名規範,並分析語言檔、找出缺少的翻譯
  • 比較兩個資源包,回報新增、刪除與變更的資源及各自的檔案大小
  • 在 Modrinth 上搜尋資源包,並依 slug 或專案 ID 取得資源包詳細資訊
適用情境
適合在製作、審查或更新 Minecraft 資源包時使用:讓助理檢查結構、貼圖與翻譯,比對兩個版本,或直接在對話中查詢 Modrinth 上的資源包。
執行需求
以本機 Node.js 程序執行(需 Node.js 18+),透過 stdio 啟動 npm 套件 mc-rp-assistant-mcp。不需帳號或 API 金鑰。只有 Modrinth 搜尋與詳細資訊工具需要網路連線。可選環境變數可調整 Modrinth API 位址、User-Agent、貼圖與圖示大小上限以及搜尋結果筆數。
安裝前請注意
Modrinth 搜尋與詳細資訊工具會把查詢送到 Modrinth API(或所設定的替代 API 位址),這些請求會離開本機。驗證與比較工具只讀取資源包檔案。設定可透過環境變數或專案根目錄的 .env 檔覆寫。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mc Rp Assistant,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mc-rp-assistant-mcp

[M8ven Verified]

MCP server for Minecraft resource pack analysis, validation, and management. Reads pack.mcmeta, validates structure, lists assets, compares packs, and queries Modrinth.

Tools

ToolDescription
read_packmetaRead pack.mcmeta from a resource pack directory or .zip file
validate_rp_structureValidate a resource pack's structure and flag issues (missing files, format mismatches, large icons, etc.)
list_rp_assetsList all asset paths (textures/models/sounds/lang) in a pack. Supports both directories and .zip files
compare_rpacksCompare two resource packs and report added, removed, and changed asset files
search_rp_on_modrinthSearch Modrinth for resource packs by name or tag. Returns up to limit results
get_rp_infoGet detailed info about a Modrinth resource pack by its slug or project ID
validate_texturesValidate textures for size limits (>2MB), naming conventions (lowercase, no spaces), and pack icon size
analyze_lang_filesAnalyze language files (.lang) and detect missing translations across languages
compare_rpacks_diffCompare two resource packs with detailed per-file info including file sizes for added/removed/changed assets

Exported Functions

  • readPackMetaExport(packPath) — Read pack.mcmeta
  • validateRpStructureExport(packPath, mcVersion?) — Validate pack structure
  • listRpAssetsExport(packPath, limit?) — List asset files
  • compareRpacksExport(oldPackPath, newPackPath) — Compare two packs
  • searchRpOnModrinthExport(query, limit?) — Search Modrinth
  • getRpInfoExport(slugOrId) — Get pack info from Modrinth
  • validateTexturesExport(packPath) — Validate textures
  • analyzeLangFilesExport(packPath) — Analyze language files
  • compareRpacksDiffExport(oldPackPath, newPackPath) — Detailed pack comparison

MCP Client Configuration

Add to your MCP client config (e.g., Trae settings.json or MCP CLI config):

json
{  "mcpServers": {    "mc-rp-assistant": {      "command": "node",      "args": ["${workspaceFolder}/dist/index.js"]    }  }}

Path note: ${workspaceFolder} resolves to the project root in Trae/VS Code. If using another editor, replace with the absolute path, e.g. ["C:/Users/xxx/Desktop/mc-rp-assistant-mcp/dist/index.js"].

Configuration

本工具零配置即可用(内置默认值,任何环境开箱即用)。以下项目可通过环境变量或项目根目录 .env 文件覆盖(复制 .env.example 为 .env):

变量默认值说明
RP_ASSISTANT_MODRINTH_API_BASEhttps://api.modrinth.com/v2Modrinth API 根地址,支持自建网关/代理
RP_ASSISTANT_USER_AGENTmc-rp-assistant-mcp/1.0请求 User-Agent(Modrinth 要求标明来源)
RP_ASSISTANT_TEXTURE_MAX_MB2单张纹理大小上限(MB),超过则标记为大纹理
RP_ASSISTANT_PACK_ICON_MAX_KB50资源包图标 pack.png 大小上限(KB)
RP_ASSISTANT_DEFAULT_SEARCH_LIMIT10Modrinth 资源包搜索默认返回条数
RP_ASSISTANT_MAX_SEARCH_RESULTS50Modrinth 搜索返回条数硬上限

优先级:环境变量 > .env 文件 > rp-config.json > 内置默认值。改动后重启 MCP server 生效。

扩展默认配置:编辑 src/rp-config.json(构建后为 dist/rp-config.json)可调整搜索上限、pack.png 大小阈值与 MC 版本 → pack_format 映射,无需改代码。

Requirements

  • Node.js 18+
  • @modelcontextprotocol/sdk, zod, adm-zip
  • adm-zip is required for .zip / .mcpkg resource pack support — included as a dependency

Development

bash
npm run build   # Compile TypeScriptnpm run test:unit  # Run unit testsnpm test        # Run all tests

Testing

bash
npm run buildnpm test

All unit tests are offline except searchRpOnModrinth and getRpInfo which gracefully return empty results when no network is available.

Platform Compatibility

ToolWindowsmacOSLinux
read_packmeta✅✅✅
validate_rp_structure✅✅✅
list_rp_assets✅✅✅
compare_rpacks✅✅✅
search_rp_on_modrinth✅✅✅
get_rp_info✅✅✅
validate_textures✅✅✅
analyze_lang_files✅✅✅
compare_rpacks_diff✅✅✅

All tools use cross-platform Node.js fs and path APIs. .zip support requires adm-zip. Network-dependent tools (search_rp_on_modrinth, get_rp_info) work on all platforms when online; they return empty results gracefully when offline.

Requirements

  • Node.js 18+
  • @modelcontextprotocol/sdk, zod, adm-zip

License

MIT

來源:README.md,提交 d4223e1

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:伺服器未能啟動。

版本歷史

1
  1. v1.0.0最新Oct 23, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分