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 |
Capabilities
Features and capabilities supported by this server
| 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 | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vfyjxf/HMCL-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server