Skip to main content
Glama
vfyjxf

HMCL MCP Server

by vfyjxf

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HMCL_MCP_JAVANoJava binary used to launch the headless HMCL JVMjava
HMCL_MCP_WORKDIRNoHMCL working directory (game root + user data): versions/, libraries/, assets/, mcpacks/, .hmcl/~/.hmcl-mcp
HMCL_MCP_HMCL_DIRNoDirectory holding HMCL.jar, hmcl-agent.jar and the javafx jars<workdir>/hmcl
HMCL_MCP_AGENT_PORTNoAgent HTTP port on 127.0.0.128501
HMCL_MCP_AGENT_TOKENNoShared token, sent as the X-HMCL-Agent-Token headerhmcl-mcp
HMCL_MCP_CURSEFORGE_API_KEYNoOptional 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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 node agent/build.mjs (requires javac on PATH) to fetch the javafx jars and compile hmcl-agent.jar; copy hmcl-agent.jar and the javafx jars into . Returns the resulting paths. Safe to re-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. name is the instance id — pass it as version to launch_game.

launch_gameA

Launch a game instance through the agent as an offline account. version is an instance id (see list_versions / list_modpacks). username defaults to Steve; maxMemory is the max heap in MB; javaPath overrides the Java used for the game; extraArgs are appended after the default JVM args. The game runs as a separate child process — the game window opens normally.

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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