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 分