
Mc Mod Config
io.github.dcd887由 GitHub 账号 dcd887 发布v1.0.0更新于 Oct 24, 2026
读写 Minecraft 模组配置文件(TOML/JSON),带 schema 校验
概览
本地 MCP 服务器,让助手读取、校验、对比并清理 Minecraft 模组配置文件(.cfg、.toml、.json)。
- 可以做什么
- 解析单个模组配置文件,返回结构化数据及发现的问题
- 递归扫描配置目录,列出各配置的模组 ID、格式与大小
- 校验全部配置中的空值、非法数字、解析错误与超长字符串
- 对比两个配置目录,报告整合包更新前后新增、删除与变更的文件
- 找出 mods 目录中已无对应模组 JAR 的孤立配置文件
- 返回 Sodium、OptiFine、Phosphor、Lithium、Fabric API 等热门性能模组的内置默认配置
- 适用场景
- 适合维护或排查 Minecraft 整合包时使用:定位模组异常、更新后审查配置变化、清理残留配置文件。它是面向整合包作者与玩家的专用离线工具,而非通用工具。
- 运行要求
- 以 npm 包 mc-mod-config-mcp 形式通过 stdio 在本机运行,需要 Node.js 18+ 与 npm;README 说明需先构建,并在客户端配置中以绝对路径指向编译后的入口文件。无需账号、API 密钥或网络;可选环境变量 MOD_CONFIG_EXTENSIONS、MOD_CONFIG_MAX_FILE_MB、MOD_CONFIG_MAX_STRING_LEN 可覆盖内置默认值。
安装
在 SourceWeft 中
- 打开 控制台中的 Mc Mod Config,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mc-mod-config-mcp
MCP server for Minecraft mod configuration file management. Reads, validates, compares, and cleans up .cfg, .toml, and .json config files from modpacks.
Tools
Supported Config Formats
Features
- Multi-format parsing — handles Forge
.cfg, Fabric.toml, and.jsonconfigs natively - Validation engine — detects empty values, invalid numbers, parse errors, and oversized strings
- Config comparison — key-level diff for tracking changes across modpack updates
- Orphan detection — matches config files against installed mod JARs plus a built-in known-mods database
- Default configs — bundled known-good defaults for popular performance mods
- Fully offline — no network calls; all data is local or built-in
Installation
Prerequisites
- Node.js 18+
- npm
Build
Run as standalone MCP server
The server communicates via stdio (JSON-RPC 2.0). It can be consumed by any MCP-compatible client.
Configuration for MCP clients
Add to your MCP client config:
Path note: Replace
${MC_MOD_CONFIG_ROOT}with the absolute path to this project's root directory. On Windows, use forward slashes:["C:/path/to/mc-mod-config-mcp/dist/index.js"](把C:/path/to/替换成你的实际路径)。 Alternatively, set an environment variableMC_MOD_CONFIG_ROOTpointing to the project root and use the variable in the config.
Configuration
本工具零配置即可用(内置默认值,任何环境开箱即用)。以下项目可通过环境变量或项目根目录 .env 文件覆盖(复制 .env.example 为 .env):
扩展已知模组默认配置库:编辑 src/mod-defaults.json(构建后为 dist/mod-defaults.json),在 defaults 下新增/覆盖模组即可,无需改代码。例如新增 "iris": { "name": "Iris", "fallbackConfig": { "enableShaders": true } }。
优先级:环境变量 > .env 文件 > 内置默认值。改动后重启 MCP server 生效。
Usage Examples
Read a config file
List all configs in a modpack
Validate configs for issues
Compare configs before and after an update
Find orphaned configs
Get default config for a mod
Architecture
The MCP uses the official @modelcontextprotocol/sdk v1.x with McpServer and StdioServerTransport.
Testing
All unit tests are fully offline and do not require a Minecraft installation.
Platform Compatibility
All tools use cross-platform Node.js fs and path APIs. All paths are resolved as absolute paths before processing. The Forge .cfg parser handles sections, type detection, and quoted values; the Fabric .toml parser handles nested tables and arrays.
License
MIT
来源:README.md,提交 365d450
工具
0版本历史
1- v1.0.0最新Oct 23, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分