Go (1.25+) terminal app for querying Minecraft Bedrock and Java servers directly or via an interactive domain lookup mode. Includes raw-terminal navigation, spinner progress UI, and concurrency-aware host probing.
- Overview
- Key Features
- Quickstart
- Usage
- Output Details
- Directory Layout
- Troubleshooting
- Contributing
- License
MCQuery is a focused CLI tool for checking Minecraft server status. It supports both Bedrock (UDP ping with RakNet unconnected ping) and Java (status + latency handshake) editions, and ships with an interactive lookup mode that tries combinations of subdomains and domain endings to find reachable servers.
The UI is terminal-native: selection menus use raw input, progress is shown with a spinner, and results are formatted for quick copy/paste.
- 🎯 Direct server query for Bedrock and Java editions.
- 🔎 Lookup mode to probe subdomain + domain ending combinations.
- ⚡ Concurrent lookup with automatic concurrency sizing.
- 🧭 Interactive terminal UI with keyboard navigation and live progress.
- 🧼 Clean MOTD rendering (strips Minecraft color codes).
# Build
go build -o uwp-tcp-con ./cmd/uwp-tcp-con
# Run
./uwp-tcp-conOr run directly:
go run ./cmd/uwp-tcp-conStart the API server:
go run ./cmd/uwp-tcp-con --api --api-addr 127.0.0.1:8080 --api-timeout-ms 1000 --api-concurrency 32Or use the quickstart scripts:
.\scripts\start-api.ps1scripts\start-api.cmdOn launch you’ll choose a mode and edition using the arrow keys (or W/S) and Enter.
- Select UWP/TCP query.
- Choose Bedrock or Java.
- Enter the host and port (leave empty for the default: 19132 for Bedrock, 25565 for Java).
This sends the protocol-specific ping and renders a formatted status page.
- Select IP lookup.
- Choose Bedrock or Java.
- Pick subdomains:
- Custom
- Built-in pool
- Custom + pool
- Enter the base host (e.g.,
exampleforplay.example.com). - Pick domain endings:
- Custom
- Built-in pool
- Custom + pool
- Enter the port (or leave empty for the default).
The lookup will probe each combination concurrently and report matches.
The API keeps the normal CLI untouched and adds fast JSON/SSE endpoints for dashboards, bots, and tools that need player counts from one or more servers at the same time.
Start it with:
./uwp-tcp-con --api --api-addr 127.0.0.1:8080Or from a config file:
./uwp-tcp-con --api-config config/api.example.jsonFor local changes, copy config/api.example.json to config/api.local.json. The quickstart scripts will use api.local.json automatically when it exists.
Config fields:
{
"addr": "127.0.0.1:8080",
"timeout_ms": 1000,
"concurrency": 32,
"enable_srv": true,
"ip_mode": "auto"
}Single server snapshot:
curl "http://127.0.0.1:8080/api/status?edition=bedrock&host=play.example.com&port=19132&timeout_ms=1000"Group snapshot with parallel queries:
curl "http://127.0.0.1:8080/api/status?server=bedrock,play.example.com,19132,lobby&server=java,mc.example.com,25565,survival&timeout_ms=1000&concurrency=32"Group snapshot via JSON:
curl -X POST "http://127.0.0.1:8080/api/status" \
-H "Content-Type: application/json" \
-d "{\"timeout_ms\":1000,\"concurrency\":32,\"servers\":[{\"name\":\"lobby\",\"edition\":\"bedrock\",\"host\":\"play.example.com\",\"port\":19132},{\"name\":\"survival\",\"edition\":\"java\",\"host\":\"mc.example.com\",\"port\":25565}]}"Live stream:
curl "http://127.0.0.1:8080/api/stream?server=bedrock,play.example.com,19132,lobby&server=java,mc.example.com,25565,survival&interval_ms=1000&timeout_ms=1000"The stream uses Server-Sent Events and sends a fresh grouped status payload every interval.
- Bedrock
- Game ID, MOTD, protocol/game versions, and player counts.
- Java
- Version name, protocol version, player counts, and latency (ms).
Both editions include a clean MOTD with Minecraft formatting stripped.
cmd/uwp-tcp-con/ # CLI entrypoint
config/ # API quickstart config
internal/cli/ # terminal UI, prompts, lookup pools
internal/ping/ # Bedrock/Java protocols + lookup engine
internal/web/ # local link server and status API
scripts/ # quickstart launch scripts
- Timeouts: ensure the server is reachable and the port is open.
- No IPv4 address: Bedrock pings require an IPv4 resolution for the host.
- Terminal input issues: try running in a real TTY (not a basic shell emulator).
- Fork the repo and create a feature branch.
- Keep changes minimal and consistent with existing style.
- Update README if user-facing behavior changes.
No license file is currently included in the repository. Please add one if you plan to distribute this project.