
HeadlessMc
io.github.headlesshq由 GitHub 帳號 headlesshq 發布v0.1.0更新於 Nov 2, 2026
Install, launch and control Minecraft: Java Edition clients and servers, also headless.
概覽
讓 AI 助理安裝、啟動並控制 Minecraft Java 版用戶端與伺服器的 MCP 伺服器,支援無頭執行。
- 可以做什麼
- 執行 HeadlessMc 命令列並輪詢長時間執行的任務
- 安裝版本、載入器、Java 與 Modrinth 模組,啟動用戶端與伺服器(可無頭)
- 管理設定檔,列出所有執行中實例及其狀態
- 讀取實例日誌並向伺服器送出主控台指令
- 讀取並操作遊戲畫面:取得畫面與狀態、點擊、輸入、按鍵、聊天、連線伺服器
- 等待遊戲事件並執行遊戲內指令
- 適用情境
- 適合讓助理端到端地架設與操作 Minecraft Java 用戶端或伺服器,例如測試模組、在 CI 或 Docker 中無顯示執行用戶端,或自動化遊戲內操作與伺服器管理。
- 執行需求
- 以 stdio 在本機執行,可用 npm 套件或發布的 jar/原生執行檔;jar 需要 Java 25 或更新版本。Minecraft 帳號透過微軟裝置代碼流程登入。需要網路存取以下載版本、函式庫、模組以及 HMC-Specifics 與橋接模組。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 HeadlessMc,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
HeadlessMc - MCP
An MCP server for HeadlessMc: install, launch and control Minecraft: Java Edition from AI agents.
HMC | HMC-Specifics | HMC-Skill
[!WARNING] This is a prototype. We are looking forward to feedback and feature requests.
With this MCP server, Claude Code, Codex, Cursor and other MCP clients can:
- install vanilla, Fabric, Forge and NeoForge versions, Java, and mods from Modrinth (everything HeadlessMc can do),
- launch several clients and servers at the same time, optionally headless (no display or GPU, e.g. in CI or Docker), each client in its own profile (game directory with its own mods, config and worlds),
- control running clients: read the screen, click buttons, type, chat, run commands, connect to servers, etc.
- read the logs of every instance and send console commands to servers.
Setup
For instructions on HeadlessMc itself (installing it, mod testing in CI with MC-Runtime-Test), install the headlessmc-skill as well.
Tools
Resource template: hmc://instances/{id}/log.
Several clients at once
Every running client needs its own game directory, otherwise they overwrite each other's files and share a mods folder.
launch_client takes an optional profile: a HeadlessMc profile with its own game
directory, created in <HeadlessMc data dir>/client/<profile> if it does not exist. Without a profile, a client uses the default
game directory of its version, and if another client of that version is already running there, the MCP server creates a new
profile (fabric-1.21.8-2, ...) automatically. Versions, libraries and assets are shared between all profiles.
Agents can keep profiles for different setups and add mods to them with mod add mod <slug> <profile>.
Game Control
Game control works on every Minecraft version and modloader that
HMC-Specifics supports (1.7.10 to 26.x, Forge, Fabric, NeoForge).
The server downloads the matching HMC-Specifics jar and puts it, together with the version independent
hmc-mcp-bridge mod, into the mods folder of the client before launching it.
- The root project (
src/) is the MCP server, a Quarkus application. It uses HeadlessMc's CDI beans and picocli commands directly, like headlessmc-web. stdout is the MCP channel, so HeadlessMc's console output and progress bars are captured and returned as tool results instead. hmc-mcp-bridgeis a mod that is not tied to a Minecraft version. It uses the HMC-Specifics API and starts a small HTTP server on the loopback interface once HMC-Specifics has initialized. The MCP server passes it a random token and a port file with-Dhmc.mcp.tokenand-Dhmc.mcp.portFile. Without a token the mod does nothing. Command output comes back separately from the game log, and JSON commands make the screen and state machine-readable.
Agents can also control clients you start yourself, with any launcher (the Minecraft Launcher, Prism, MultiMC, your IDE's run configuration, ...). Put two mods into the mods folder:
- HMC-Specifics for your Minecraft version and modloader,
hmc-mcp-bridgefrom the releases, one jar for every version and modloader.
When a game with these mods was not launched by the MCP server, the bridge creates a random token, listens on a free port of
127.0.0.1 and registers the game in headlessmc-mcp/instances/<pid>.json in the user's state directory
($XDG_STATE_HOME, else ~/.local/state on Linux, ~/Library/Application Support on macOS, %LOCALAPPDATA%\state on Windows).
The file is only readable by you and is deleted when the game exits. list_instances picks up these registrations, so the
game appears as an attached instance, and the game tools work as for launched clients. The log comes from logs/latest.log.
The MCP server never stops attached games on its own, and they have no console for server_command.
Launch the game with -Dhmc.mcp.enabled=false to turn the bridge off.
Asking the user
Some things need the user, not the agent. The MCP server uses elicitation when the MCP client supports it:
- Minecraft EULA:
start_serverasks the user to accept the EULA with a checkbox before a server is started for the first time. Without elicitation support, the agent has to ask and passacceptEula. - Microsoft login: the
logincommand asks the client to open Microsoft's device code page (URL mode), so the user signs in in their browser and the agent never sees credentials. - Prompts of HeadlessMc commands are shown to the user as a form. Passwords and tokens are never requested, the MCP specification forbids that for form elicitation.
- Deleting a profile with its files asks for confirmation.
Long installs and launches send progress notifications, and cancelling a tool call in the client cancels the HeadlessMc command.
Installing
Download the latest release from GitHub Releases:
Building
Requires JDK 25:
Configuration
All HeadlessMc properties (hmc.*) work as well, as system properties or in HeadlessMc's config file.
The hmc-mcp-bridge mod reads hmc.mcp.token, hmc.mcp.portFile, hmc.mcp.host (127.0.0.1), hmc.mcp.port (0, any free port),
hmc.mcp.registry and hmc.mcp.enabled (true) from system properties. Without hmc.mcp.token it registers the game for attaching.
Privacy and terms
The MCP server runs locally and sends no telemetry. See the Privacy Policy and the Terms of Use. HeadlessMc - MCP is not an official Minecraft product and is not approved by or associated with Mojang or Microsoft.
來源:README.md,提交 2a91a2e
工具
0版本歷史
1- v0.1.0最新Oct 19, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分