mc-modpack-mcp
MCP server for Minecraft modpack diagnostics that inspects Java runtimes, instance metadata, mods, logs, crash reports, and Modrinth dependencies.
List Java versions from PCL launcher config (Windows), with auto-detection when
mc_diris omitted.Read version info — Minecraft version, loader, Java requirements, JVM args, and mod count for an instance.
List mods in
mods/, optionally filtered by regex.Detect conflicts — known problematic mod combos (renderers, duplicate UI libs, JEI/Fabric API duplicates).
Scan cleanliness — non-JAR files, scripts, source/dev jars in
mods/.Read latest.log with level (INFO/WARN/ERROR/FATAL), keyword, and tail filtering.
Find crash reports in
crash-reports/with filenames and timestamps.Analyze a crash report — extract MC version, exception type, message, stack top, and summary.
Check mod dependencies via Modrinth API — latest compatible versions, required/optional deps, MC version compatibility.
Provides tools for querying the Modrinth API to check mod dependencies and compatibility for Minecraft mods.
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-modpack-mcp analyze my latest crash report and list possible mod conflicts"
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-modpack-mcp
MCP (Model Context Protocol) server for Minecraft modpack diagnostics. Supports Fabric/Forge mod conflict detection, log analysis, crash reports, and AI-powered intelligent diagnosis. Core diagnostic engine is fully offline; optional AI analysis uses China-based DashScope (通义千问) API. get_java_versions requires PCL launcher on Windows; all other tools work cross-platform.
Features
Java version detection — reads PCL config to list all available Java runtimes with version recommendations
Version info — parses instance JSON to extract Minecraft version, loader, Java requirements, JVM args
Conflict detection — finds known problematic mod combinations from an external
rules.json(easily extensible)Cleanliness scan — detects non-JAR files, source jars, scripts in mods/ directory
Log analysis — reads latest.log with level filtering (INFO/WARN/ERROR) and keyword search
Crash report analysis — finds crash reports, classifies errors, and suggests fixes automatically
Dependency lookup — queries Modrinth API for mod version and dependency info
Human-readable output — all tools return friendly text with emojis and 💡 tips, plus JSON below
--- JSON ---CLI mode — run
npm run diagnosefor an interactive terminal-based diagnosis (no MCP needed)External rules engine — edit
src/rules.jsonto add new conflicts, crash patterns, or Java version ranges without touching code
Related MCP server: mcdev-mcp
Tools
Tool | Description |
| List all Java runtimes from PCL config |
| Read instance metadata (version, loader, Java, JVM args, mod count) |
| Scan mods/ directory, optionally filter by regex |
| Detect known mod conflicts with auto-replacement recommendations |
| Find non-JAR files, source jars, scripts in mods/ |
| Read latest.log with level/keyword/tail filtering |
| List all crash reports in crash-reports/ |
| Parse a crash report, extract exception type and summary |
| Query Modrinth API for mod deps and compatibility |
| Get replacement mod suggestions for known conflicts |
| 🤖 AI-powered full diagnostics report using 通义千问 (requires DASHSCOPE_API_KEY) |
Installation
Prerequisites
Node.js 18+
npm
A Minecraft instance (any launcher — macOS/Linux users must pass
mc_direxplicitly for all tools)
Note:
get_java_versionsreads PCL launcher config and works on Windows only. All other tools are cross-platform.
Build
cd mc-modpack-mcp
npm install
npm run buildRun as standalone MCP server
node dist/index.jsThe 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 (e.g., .mcp.json or equivalent):
{
"mcpServers": {
"mc-modpack": {
"command": "node",
"args": ["/absolute/path/to/mc-modpack-mcp/dist/index.js"]
}
}
}Usage Examples
Get Java versions from PCL
{
"name": "get_java_versions",
"arguments": {
"mc_dir": "{your_minecraft_directory}"
}
}Detect conflicts in an instance
{
"name": "detect_conflicts",
"arguments": {
"mc_dir": "{your_minecraft_directory}",
"instance_id": "rpg"
}
}Read WARN logs (last 50 lines)
{
"name": "read_log",
"arguments": {
"mc_dir": "{your_minecraft_directory}",
"instance_id": "rpg",
"level": "WARN",
"tail": 50
}
}Check mod dependencies via Modrinth
{
"name": "check_mod_dependencies",
"arguments": {
"project_id": "sodium",
"mc_version": "1.20.1",
"loader": "fabric"
}
}Architecture
mc-modpack-mcp/
├── src/
│ └── index.ts # All tool implementations + MCP server setup
├── dist/ # Compiled JavaScript (output of tsc)
├── skills/
│ └── mc-modpack-helper/
│ └── SKILL.md # Trae Work skill for modpack diagnostics
├── package.json # Node.js dependencies (@modelcontextprotocol/sdk, zod)
├── tsconfig.json # TypeScript config (CommonJS output)
├── .gitignore
├── test.js # Integration test runner
├── test_logs/ # Test output logs (gitignored)
└── backups/ # Backup snapshots from tests (gitignored)The MCP uses the official @modelcontextprotocol/sdk v1.x with McpServer and StdioServerTransport. All tools use server.tool() registration pattern compatible with the MCP SDK specification.
AI Module (src/ai.ts)
ai_diagnose 工具使用独立模块封装通义千问 API,提供:
callQwen(prompt)— 调用 Qwen 模型生成报告buildDiagnosePrompt(data)— 构建诊断 prompt,整合所有结构化数据
Skills
This repository also includes a Trae Work skill for modpack diagnostics. After cloning, copy the skill to your Trae Work skills directory:
Windows (PowerShell):
copy skills\mc-modpack-helper\SKILL.md "$env:USERPROFILE\.trae\skills\mc-modpack-helper\SKILL.md"macOS / Linux:
mkdir -p ~/.trae/skills/mc-modpack-helper
cp skills/mc-modpack-helper/SKILL.md ~/.trae/skills/mc-modpack-helper/SKILL.mdSee SKILL.md for the full skill documentation with 8-phase diagnostic workflow.
Testing
npm run build
MC_DIR=/path/to/your/.minecraft node test.jsOr on Windows (PowerShell):
$env:MC_DIR="C:\path\to\your\.minecraft"; node test.jsTests create backups before running and log results to test_logs/. See individual test log files for detailed output.
Platform Compatibility
Tool | Windows | macOS | Linux |
| ✅ Full | ⚠️ PCL-only | ⚠️ PCL-only |
| ✅ | ✅ | ✅ |
| ✅ | ✅ | ✅ |
| ✅ | ✅ | ✅ |
| ✅ | ✅ | ✅ |
| ✅ | ✅ | ✅ |
| ✅ | ✅ | ✅ |
| ✅ | ✅ | ✅ |
| ✅ | ✅ | ✅ |
All tools accept mc_dir as an explicit path. get_java_versions auto-detects PCL on Windows; on other platforms it returns a clear message when PCL config is absent.
Using the Rules Engine
All conflict rules, Java version mappings, and crash analysis patterns live in src/rules.json. You can customize them without modifying source code:
{
"conflicts": [
{
"id": "my-custom-conflict",
"name": "My Custom Conflict",
"patterns": ["mod-a", "mod-b"],
"severity": "error",
"solution": "Install only one of these mods.",
"emoji": "🔴"
}
],
"javaVersionMap": [
{ "mcFrom": "1.20.5", "mcTo": "1.20.6", "minJava": 17, "recommendedJava": 21, "notes": "..." }
],
"crashAnalysisPatterns": [
{ "keywords": ["my-error-pattern"], "category": "custom", "solution": "Do something about it." }
]
}Section | Purpose |
| Mod conflict detection rules |
| Minecraft → Java version compatibility |
| Crash report classification and fix suggestions |
CLI Usage
Run a quick interactive diagnosis without setting up MCP:
npm run diagnose
# or
MC_DIR=/path/to/.minecraft npm run diagnoseThe CLI will:
Auto-detect your Minecraft instance
Check Java runtimes (PCL on Windows)
Scan for mod conflicts
Check directory cleanliness
Review crash reports
License
MIT
Available Tools
9 toolsanalyze_crashA
解析单个崩溃报告,提取 Minecraft 版本、异常类型、错误消息、堆栈顶部信息和综合摘要。
Inputs: mc_dir (required), crash_file (required).
check_mod_dependenciesA
通过 Modrinth API 查询模组的依赖信息:最新兼容版本、required/optional 依赖、MC 版本兼容列表。
Inputs: mc_version (required), project_id (required), loader.
detect_conflictsA
扫描 mods/ 目录中的已知冲突组合:渲染器冲突(sodium+embeddium+iris)、UI Lib 重复、JEI 重复、Fabric API 重复等。
Inputs: mc_dir (required), instance_id (required).
find_crash_reportsA
列出 crash-reports/ 目录中的所有崩溃报告,返回文件名和修改时间。
Inputs: mc_dir (required).
get_java_versionsA
读取 PCL launcher 配置文件,列出所有可用的 Java 运行时版本及其路径。不传 mc_dir 时自动探测常见位置。
Inputs: mc_dir.
get_version_infoB
读取指定 Minecraft 版本的 version.json,返回游戏版本、Loader 版本、Java 要求、JVM 参数、模组数量等元数据。
Inputs: mc_dir (required), instance_id (required).
list_modsB
扫描指定实例的 mods/ 目录,列出所有 JAR 文件及其基本信息。支持按名称过滤(filter 参数,支持正则)。
Inputs: mc_dir (required), instance_id (required), filter.
read_logC
读取 Minecraft 实例的 latest.log,支持按日志级别(INFO/WARN/ERROR)和关键词过滤。
Inputs: mc_dir (required), instance_id (required), tail, level, +1 more.
scan_cleanlinessB
扫描 mods/ 目录中的非 JAR 文件:.ps1/.bat 脚本、.txt 文本、source-jar、dev jar 等。
Inputs: mc_dir (required), instance_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct task: Java versions, version metadata, mod listing, conflict detection, cleanliness scanning, log reading, crash listing, crash analysis, and dependency checks. Even related tools like find_crash_reports and analyze_crash are clearly separated by listing vs. parsing.
All tool names follow a consistent verb_noun pattern (e.g., get_java_versions, list_mods, detect_conflicts, analyze_crash). Verbs are clear and the style is uniform with no mixed conventions.
With 9 tools, the server is well-scoped for Minecraft modpack diagnostics. Each tool covers a necessary aspect of environment inspection, mod analysis, or crash troubleshooting, and none feel redundant or excessive.
The toolset thoroughly covers diagnostic workflows: environment checks, mod inventory, conflict/dependency analysis, log review, and crash handling. It lacks active management capabilities (e.g., adding/removing mods), but for a read-only diagnostic focus it is nearly complete.
Related MCP Connectors
Publish and discover MCP servers via the official MCP Registry. Powered by HAPI MCP server.
Scan any MCP server for tool-poisoning, security, auth & license. Trust score before install.
An MCP server that automatically collects feedback on your MCP server.
MCP registry & directory: search, find & install 31k+ MCP servers & tools. Catalog and marketplace.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn external MCP server for diagnosing Minecraft servers via backup analysis, local runtime, or Docker runtime, offering tools for plugin inspection, log analysis, configuration linting, and performance diagnostics.1MIT
- AlicenseAqualityCmaintenanceAn MCP server that empowers AI coding agents to work effectively with Minecraft mod development, providing static analysis of decompiled source code and runtime interaction with a running Minecraft instance.3168 npm18MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that helps AI agents inspect Minecraft project evidence (crash logs, mod files, datapacks) before writing development code.2-
- AlicenseBqualityBmaintenanceMCP server for searching, browsing, and analyzing decompiled Minecraft source code locally. Supports symbol lookup, text search, reference lookup, and lightweight RAG.11Apache 2.0