HMCL MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HMCL_MCP_JAVA | No | Java binary used to launch the headless HMCL JVM | java |
| HMCL_MCP_WORKDIR | No | HMCL working directory (game root + user data): versions/, libraries/, assets/, mcpacks/, .hmcl/ | ~/.hmcl-mcp |
| HMCL_MCP_HMCL_DIR | No | Directory holding HMCL.jar, hmcl-agent.jar and the javafx jars | <workdir>/hmcl |
| HMCL_MCP_AGENT_PORT | No | Agent HTTP port on 127.0.0.1 | 28501 |
| HMCL_MCP_AGENT_TOKEN | No | Shared token, sent as the X-HMCL-Agent-Token header | hmcl-mcp |
| HMCL_MCP_CURSEFORGE_API_KEY | No | Optional CurseForge API key override, passed to HMCL as -Dhmcl.curseforge.apikey; without it search/install still work via HMCL's embedded key |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| check_environmentA | Report the current environment: java (path + version), workdir, hmcl dir contents (HMCL.jar / hmcl-agent.jar / javafx jars), whether the headless HMCL agent JVM is running (loopback probe with short timeout), and counts of installed versions and modpacks. Run this first to diagnose setup problems. java is null when no JDK is found. |
| install_hmclA | Prepare the HMCL directory: if /HMCL.jar is missing, download the latest HMCL release jar from GitHub (asset ending in .jar); then run |
| start_hmclA | Start the headless HMCL JVM with the injected javaagent (no-op if already running, per ensureAgent) and return the agent status ({hmclVersion, workdir, java, versions, running, gamePid}). The launcher GUI never opens; only the game window appears when a game is launched. |
| stop_hmclA | Stop the headless HMCL JVM by POSTing /shutdown to the agent on 127.0.0.1, then confirm the agent is down with a status probe. Fails when no agent is reachable (run start_hmcl first). |
| list_versionsA | List installed game versions by scanning /versions/ — a directory counts as a version when it contains /.json. Returns [{id, path, hasJar}], sorted by id. |
| install_versionA | Install a vanilla Minecraft version (e.g. "1.20.4") through the HMCL agent. Downloads the version json, client jar and libraries (via BMCLAPI/mojang mirrors) into /versions// and /libraries/ — this can take a few minutes on first run. Assets are downloaded by HMCL at first launch. |
| list_modpacksA | List installed modpacks by scanning /versions/*/modpack.json (HMCL ModpackConfiguration). Returns [{name, path, format, gameVersion?, modLoader?}] where format maps Modrinth→mrpack, CurseForge→curseforge, HMCL→hmcl; gameVersion/modLoader are best-effort reads from the pack manifest. |
| launch_gameA | Launch a game instance through the agent as an offline account. |
| stop_gameA | Stop the currently running game process via the agent (POST /launch/stop). |
| search_modpacksA | Search modpacks with HMCL's own repositories: Modrinth (default) or CurseForge (HMCL's embedded API key — no HMCL_MCP_CURSEFORGE_API_KEY needed). Returns ModpackSummary[]: id (slug), title, description, authors, url. |
| get_modpackA | Get details of a modpack project (id = Modrinth slug or CurseForge slug) through HMCL: summary + available versions (id = version name, version, gameVersions, loaders) and the latest version. |
| download_modpackA | Download a modpack file through HMCL into /mcpacks/ (SHA-1 verified via HMCL's downloader). Pass versionId (a version name from get_modpack) to pick a specific version; defaults to the latest. Returns {id, version, gameVersions, filename, path, size, sha1}. |
| install_modpackA | Install a modpack as a game instance under /versions/. Either pass path to a local .mrpack/.zip file, or id (plus optional versionId) to download it first via HMCL; name is the instance name (defaults to the pack name). Requires the HMCL agent — it is started automatically if possible. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 13 tools
Each tool targets a distinct resource (HMCL setup, agent lifecycle, versions, modpacks, game launch) with clear verbs like install, start, stop, list, search, get, download. No two tools perform the same action on the same resource, and descriptions make boundaries explicit.
All tool names follow a consistent verb_noun snake_case pattern, with paired verbs (start/stop, launch/stop, install/list) and objects (hmcl, versions, modpacks, game). This makes the API predictable and easy to navigate.
13 tools is well within the ideal 3-15 range and covers setup, environment, modpacks, versions, and game control without redundancy or bloat. Each tool has a clear, non-overlapping role.
The server covers core workflows: install/setup, status checking, version installation and listing, modpack search/download/install/list, and game launch/stop. Minor gaps like uninstall/delete tools or per-mod management are not critical for the stated purpose.