HungerBridge exposes a lightweight HTTP API that lets HungerLib — and any other authorized client — execute server commands, write log entries, and query live server status without relying on RCON. The server is implemented with Java’s built-inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/iFamishedX/HungerBridge/llms.txt
Use this file to discover all available pages before exploring further.
com.sun.net.httpserver.HttpServer backed by a cached thread pool, so it starts quickly and adds no heavy external dependencies to your server.
Base URL
Every request targets the host running your Minecraft server on the configured port. The default port is 30007.port key in config.yaml. See the configuration guide for details.
Authentication
Most endpoints require theX-Auth-Key request header containing the shared secret defined in config.yaml under auth.key. A missing or incorrect key returns a 401 Unauthorized response. Two endpoints — GET /v1/status and GET /v1/version — do not perform an auth check and respond regardless of whether the header is present. See the Authentication page for the full reference.
Response Format
Every response from HungerBridge — success or error — is a JSON object withContent-Type: application/json. All responses include an ok boolean field that indicates whether the request succeeded.
API Generations
HungerBridge supports three generations of endpoints. Use v2 for all new integrations; the older generations exist for backward compatibility only.v2 — Current
Structured JSON endpoints enabled by default. All seven endpoints —
ping, info, status, run, log, tps, and players — are available out of the box. Recommended for all new HungerLib integrations.v1 — Compatibility
Structured JSON endpoints that mirror v2 capability but follow an older response shape. Disabled by default (
v1-endpoints section in config.yaml). Includes run, log, status, and version.Legacy — Plain Text
Original endpoints that accept a plain-text request body instead of JSON. Disabled by default (
legacy-endpoints section in config.yaml). Includes /run and /log only.v2 Endpoints
All v2 endpoints live under the/v2/ prefix and are enabled by default.
| Method | Path | Description |
|---|---|---|
GET | /v2/ping | Liveness check; returns current server time in milliseconds. |
GET | /v2/info | Returns HungerBridge version, platform, and Minecraft version. |
GET | /v2/status | Confirms the bridge is running and reachable. |
POST | /v2/run | Executes a server command; optionally returns console output. |
POST | /v2/log | Writes a message to the server log at a specified level. |
GET | /v2/tps | Returns current TPS and 1m / 5m / 15m averages plus tick time. |
GET | /v2/players | Returns the online player count and a capped list of names. |
v1 Endpoints
v1 endpoints share the same JSON request/response structure as v2 but use the/v1/ prefix and are disabled by default.
| Method | Path | Description |
|---|---|---|
POST | /v1/run | Execute a command with optional output capture. |
POST | /v1/log | Write a log message with an optional level. |
GET | /v1/status | Returns bridge, platform, and Minecraft version as flat fields. Auth is not checked. |
GET | /v1/version | Returns version metadata (no ok field in response). Auth is not checked. |
/v1/status and /v1/version do not perform an auth check — they respond to any caller that can reach the port, as long as the endpoint is enabled. /v1/status returns bridge, platform, and minecraft as top-level fields alongside ok, whereas /v2/info nests them under a bridge object.Legacy Endpoints
Legacy endpoints accept a raw plain-text request body and are disabled by default.| Method | Path | Description |
|---|---|---|
POST | /run | Execute a command; body is the command string. |
POST | /log | Write a log entry; body is the message string. |
Even though the legacy endpoints accept plain-text bodies, their responses are still JSON (
{"ok": true} on success).