minecraft-diagnostic-mcp
An 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.
README
Minecraft Diagnostic MCP
minecraft-diagnostic-mcp is a Model Context Protocol diagnostic server for Minecraft environments. It is not a Minecraft plugin, it does not go into the server plugins/ folder, and it does not run inside the game server; it runs alongside your MCP client and inspects a server through files, logs, local runtime access, or Docker runtime access.
It can inspect a server from three practical angles:
- backup analysis from server files on disk
- local runtime analysis against a locally running Minecraft server
- Docker runtime analysis against a containerized Minecraft server
It can also be exposed to MCP clients over:
stdiofor local process-based integrationsstreamable-httpfor desktop or browser-style MCP connection flows
Optionally, it can also send Discord webhook alerts for newly detected serious runtime issues while the MCP server is running.
Post-1.0.0, it can also:
- protect Streamable HTTP access with a static bearer token
- build plugin dependency graphs from manifests and log signals
- produce heavier performance-oriented analytics
- generate safe remediation plans and apply a small allowlisted subset of config fixes
- fan out alert events to generic webhook or local file-sink integrations
The project is designed as a small, layered MCP core with:
- plugin inventory and plugin inspection
- server config linting
- recent log analysis with startup-aware diagnostics
- grouped diagnostics with explanations and recommended actions
- a unified snapshot entrypoint for AI clients
Additional project docs:
AGENTS.mdfor maintainers and coding agentsALERTING.mdfor Discord alerting behavior and tuningCONTRACT.mdfor supported surfaces and stable response fieldsDEVELOPMENT.mdfor local setup and workflowDEPLOYMENT.mdfor VM/systemd and HTTP exposure guidanceSUPPORT.mdfor the intended1.0support boundaryRELEASE_CHECKLIST.mdfor pre-release verificationTODO.mdfor the practical backlog
Use Cases
Typical use cases include:
- debugging broken plugins after a failed startup
- inspecting startup warnings that get buried under runtime log noise
- analyzing a backup without running the server
- doing lightweight runtime inspection of a local or Dockerized server
- giving an MCP client a structured diagnostic view instead of raw logs only
- forwarding serious newly detected runtime issues to Discord via webhook
Not a Plugin
This project is not a Bukkit, Spigot, Paper, or Purpur plugin.
It does not go into the server plugins/ directory and it does not extend the game server from inside the JVM.
Instead, it is an external MCP server that inspects Minecraft server state from the outside.
What It Supports
Supported execution modes:
backup: read-only analysis of a server directory on diskruntime+localbackend: direct RCON and filesystem access against a locally running serverruntime+dockerbackend: Docker CLI plus in-containerrcon-cliauto: prefer runtime when available, otherwise fall back to backup analysis when possible
Current MCP tools:
- Admin tools:
rconlist_playershelpserver_statsserver_logscheck_server_status
- Diagnostic tools:
list_pluginsinspect_pluginlint_server_configanalyze_recent_logsget_server_snapshotanalyze_dependency_graphanalyze_performanceplan_remediationapply_remediationlist_integrations
Installation
Python requirement:
- Python
3.10+
Install the project in editable mode:
pip install -e .
That gives you two practical entrypoints:
python -m minecraft_diagnostic_mcp
or
minecraft-diagnostic-mcp
For Claude Desktop or other MCP clients, you can also point them at the installed console script or run the module directly.
Configuration
Configuration is environment-variable based. A sample configuration file is provided in .env.example.
For local development, copy the example values into your shell environment or your preferred local env-loading workflow and then adjust only the variables relevant to your mode.
Core settings:
MCP_TRANSPORTstdiostreamable-http
MCP_HTTP_HOSTMCP_HTTP_PORTMCP_HTTP_PATHMCP_HTTP_AUTH_ENABLEDMCP_HTTP_AUTH_BEARER_TOKENMCP_HTTP_AUTH_HEADER_NAMEMCP_HTTP_AUTH_SCHEMEMCP_ANALYSIS_MODEbackupruntimeauto
MCP_RUNTIME_BACKENDdockerlocal
MCP_SERVER_ROOTMCP_PLUGINS_DIRMCP_LOGS_DIRMCP_CONTAINER_NAMEMCP_LOCAL_RCON_HOSTMCP_LOCAL_RCON_PORTMCP_LOCAL_RCON_PASSWORDMCP_LOCAL_SERVER_JARMCP_DISCORD_ALERTS_ENABLEDMCP_DISCORD_WEBHOOK_URLMCP_DISCORD_ALERT_USERNAMEMCP_DISCORD_ALERT_POLL_SECONDSMCP_DISCORD_ALERT_SCAN_LINESMCP_DISCORD_ALERT_MIN_PRIORITYMCP_DISCORD_ALERT_STATE_FILEMCP_GENERIC_WEBHOOK_ENABLEDMCP_GENERIC_WEBHOOK_URLMCP_GENERIC_WEBHOOK_HEADERS_JSONMCP_ALERT_FILE_SINK_ENABLEDMCP_ALERT_FILE_SINK_PATH
Mode Examples
Backup mode:
set MCP_TRANSPORT=stdio
set MCP_ANALYSIS_MODE=backup
set MCP_SERVER_ROOT=C:\path\to\mcserver
set MCP_PLUGINS_DIR=plugins
set MCP_LOGS_DIR=logs
python -m minecraft_diagnostic_mcp
Local runtime mode:
set MCP_TRANSPORT=stdio
set MCP_ANALYSIS_MODE=runtime
set MCP_RUNTIME_BACKEND=local
set MCP_SERVER_ROOT=C:\path\to\mcserver-runtime
set MCP_PLUGINS_DIR=plugins
set MCP_LOGS_DIR=logs
set MCP_LOCAL_RCON_HOST=127.0.0.1
set MCP_LOCAL_RCON_PORT=25575
set MCP_LOCAL_RCON_PASSWORD=your-local-rcon-password
python -m minecraft_diagnostic_mcp
Docker runtime mode:
set MCP_TRANSPORT=stdio
set MCP_ANALYSIS_MODE=runtime
set MCP_RUNTIME_BACKEND=docker
set MCP_CONTAINER_NAME=mc
set MCP_SERVER_ROOT=/optional/fallback/path
python -m minecraft_diagnostic_mcp
Streamable HTTP mode for desktop-style MCP connection UIs:
set MCP_TRANSPORT=streamable-http
set MCP_HTTP_HOST=127.0.0.1
set MCP_HTTP_PORT=8000
set MCP_HTTP_PATH=/mcp
set MCP_ANALYSIS_MODE=backup
set MCP_SERVER_ROOT=C:\path\to\mcserver
python -m minecraft_diagnostic_mcp
Then use:
- Name:
minecraft-diagnostic-mcp - Transport:
Streamable HTTP - URL:
http://127.0.0.1:8000/mcp
Protected Streamable HTTP mode:
set MCP_TRANSPORT=streamable-http
set MCP_HTTP_HOST=127.0.0.1
set MCP_HTTP_PORT=8000
set MCP_HTTP_PATH=/mcp
set MCP_HTTP_AUTH_ENABLED=true
set MCP_HTTP_AUTH_BEARER_TOKEN=replace-me
python -m minecraft_diagnostic_mcp
This expects Authorization: Bearer replace-me by default. You can switch to a custom static header by setting MCP_HTTP_AUTH_HEADER_NAME.
Discord webhook alerts:
set MCP_DISCORD_ALERTS_ENABLED=true
set MCP_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
set MCP_DISCORD_ALERT_POLL_SECONDS=30
set MCP_DISCORD_ALERT_SCAN_LINES=400
set MCP_DISCORD_ALERT_MIN_PRIORITY=50
python -m minecraft_diagnostic_mcp
With alerts enabled, the server runs a lightweight background poller that checks recent diagnostics and sends a Discord alert only for newly detected active high-severity issues. Resolved historical items and routine runtime noise are ignored.
Generic webhook / file-sink integrations:
set MCP_GENERIC_WEBHOOK_ENABLED=true
set MCP_GENERIC_WEBHOOK_URL=https://example.com/mcp-alerts
set MCP_GENERIC_WEBHOOK_HEADERS_JSON={"X-Token":"replace-me"}
set MCP_ALERT_FILE_SINK_ENABLED=true
set MCP_ALERT_FILE_SINK_PATH=C:\path\to\alerts.ndjson
python -m minecraft_diagnostic_mcp
Run Flow
Recommended run flow for each mode:
- Set the mode-specific environment variables.
- Start the MCP server with
python -m minecraft_diagnostic_mcp. - In the MCP client, begin with
get_server_snapshot(). - Drill down with:
analyze_recent_logs()lint_server_config()list_plugins()inspect_plugin("PluginName")
- Use the newer post-
1.0.0tools when needed:analyze_dependency_graph()analyze_performance()plan_remediation()apply_remediation([...])list_integrations()
Testing
Run the test suite with:
python -m unittest discover -s tests -v
The tests are intentionally lightweight and focused on:
- parser behavior
- service layer behavior
- snapshot aggregation
- startup-aware log analysis
They do not require a live Minecraft server or Docker daemon.
Developer Notes
For local development:
- edit environment variables directly or start from
.env.example - run tests with
python -m unittest discover -s tests -v - run the MCP server locally with
python -m minecraft_diagnostic_mcp - use
MCP_TRANSPORT=streamable-httpif your MCP client expects a URL instead of a local command
If you are iterating on runtime behavior, prefer:
backupmode for read-only fixture-style debuggingruntime + localfor a locally running sandbox serverruntime + dockerfor a real containerized deployment target
Limitations
Current scope:
- dependency graphing is manifest- and log-signal-based, not bytecode-based
- remediation is intentionally allowlisted and conservative
- HTTP auth is static token auth, not a full OAuth or multi-user auth system
- integrations currently focus on alert delivery, not full bi-directional control-plane workflows
- no full incident management workflow
Runtime notes:
- Docker runtime mode expects Docker CLI access and a reachable container
- Local runtime mode expects a running Minecraft server with RCON enabled
- Backup mode is read-only and does not provide live player/runtime information
Support Matrix
Current intended support boundary:
backupmode- status: supported
- expectation: read-only filesystem analysis
runtime + docker- status: supported
- expectation: Docker CLI available, target container exists, in-container
rcon-cliworks
runtime + local- status: supported on Windows for the current local-process workflow
- expectation: local server process is running and RCON is enabled
stdio- status: supported
streamable-http- status: supported
Degraded-mode behavior:
- if Docker CLI is missing, the runtime readiness output now says so explicitly
- if the target Docker container is missing, readiness output says that explicitly
- if the local backend is selected but no matching Java process is found, readiness output says that explicitly
- if backup inputs are missing, backup readiness says that explicitly
- runtime and backup readiness payloads also carry freshness timestamps
For the formal support boundary and release promise, see:
SUPPORT.mdCONTRACT.mdRELEASE_CHECKLIST.md
Project Structure
High-level layout:
src/minecraft_diagnostic_mcp/
collectors/
analyzers/
parsers/
services/
tools/
models/
The architecture is intentionally modest:
- tools expose MCP functions
- services orchestrate use-cases
- collectors read from Docker, filesystem, or local runtime
- parsers normalize raw input
- analyzers produce structured diagnostics
Release Scope
Current stable release: 1.1.0
1.1.0 includes:
- stable MCP tool names
- explicit support boundaries for backup/runtime/transport modes
- predictable diagnostic payloads for MCP clients
- realistic deployment and alerting documentation
- confidence from both unit tests and workflow-style smoke checks
- static-token auth for HTTP transport
- dependency graph inspection
- heavier performance analytics
- remediation planning and safe allowlisted apply flow
- generic integration fanout beyond Discord
Deliberately out of scope for 1.0.0:
- deep bytecode analysis
- auto-remediation
- dashboards or report products
- general-purpose Minecraft control-plane features
Pre-release Checklist
- tests passing
- support boundary documented
- release checklist executed
.env.examplepresent- README updated
- no
__pycache__tracked in the repository
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。