Execute Minecraft Java Edition admin commands through the RCON remote console. Use for player moderation, whitelist management, item/state commands, world ru...
Scope: This skill is your in-game remote control for a Minecraft Java server. It sends commands through the RCON protocol to manage players, world state, and server communication in real time. It intentionally excludes server-infrastructure operations such as process lifecycle management, filesystem backups, plugin jar installation, and continuous uptime monitoring; use a dedicated PaperMC ops skill for those. This skill does NOT require minecraft-bridge — it communicates directly with the server's admin console over a separate TCP connection.
Architecture:
OpenClaw → RCON TCP (port 25575) → Minecraft Server Console
Edit server.properties:
enable-rcon=true
rcon.port=25575
rcon.password=STRONG_PASSWORD_HERE
broadcast-rcon-to-ops=false
Restart server after changing these values.
MC_RCON_HOST=localhost # Server IP or hostname
MC_RCON_PORT=25575 # RCON port (must match server.properties)
MC_RCON_PASSWORD=yourpassword # RCON password (must match server.properties)
MC_SERVER_LOG=/path/to/server/logs/latest.log # optional, for log analysis
node ~/.openclaw/skills/minecraft-server-admin/scripts/rcon.js "list"
# Expected: "There are N of a max of M players online: ..."
For any player-related command, use: scripts/rcon.js "<command>"
Listing & Checking
/list → parse player count and names/list then check if name appearsAccess Control ⚠️ Requires confirmation before executing:
/kick <player> [reason]/ban <player> [reason] + calendar note/ban <player> [reason]/ban-ip <player|ip> [reason]/pardon <player> or /pardon-ip <ip>/whitelist add <player>/whitelist remove <player>/op <player> ⚠️ HIGH PRIVILEGE — always confirm/deop <player>Item & State Management
/give <player> <item_id> [count]/clear <player> [item] [count]/gamemode <survival|creative|adventure|spectator> <player>/tp <player> <x> <y> <z> or /tp <player> <target_player>/effect give <player> minecraft:regeneration .../effect give <player> minecraft:instant_health 1 10Time & Weather
/time set day/time set midnight/time set 0/weather clear [seconds]/weather rain [seconds]/weather thunder [seconds]World State
/save-all (always do before maintenance)/save-off then backup then /save-on/difficulty <peaceful|easy|normal|hard>/gamerule <rule> <value>
keepInventory true, doDaylightCycle false, doFireTick false/locate structure minecraft:<structure_name>/fill <x1 y1 z1> <x2 y2 z2> <block> ⚠️ Confirm range before runningEntity Management
/kill @e[type=!player] ⚠️ Confirm — kills all non-players/kill @e[type=minecraft:zombie]/kill @e[type=minecraft:item]/say <message> (prefixed with [Server])/title @a title {"text":"<msg>","color":"gold","bold":true}/title @a subtitle {"text":"<msg>"}/msg <player> <message>/title @a actionbar {"text":"<msg>"}When asked about server performance:
/list → check player countMC_SERVER_LOG file (last 200 lines) if path setreferences/log-patterns.mdConfirmation required for all destructive/high-privilege commands:
⚠️ Dangerous Operation
Command: /ban SomePlayer griefing and harassment
Server: ${MC_RCON_HOST}:${MC_RCON_PORT}
Effect: Permanently bans SomePlayer from server
Type 'confirm' to proceed, or 'cancel' to abort.
Operations requiring confirmation:
ban, ban-ip — permanent account restrictionop — grants admin privilegesfill — large area modificationkill @e — entity mass-removalstop — server shutdownsave-off — pauses auto-save (dangerous if forgotten)Audit logging: After each operation, append to OpenClaw Memory:
## Server Admin Log [ISO timestamp]
- Command: /ban PlayerX "repeated griefing"
- Executed by: [OpenClaw user]
- Result: success
/list response)Parse and present as:
👥 Players Online (3/20):
• Steve — [show coords if available]
• Alex
• Notch
✅ Done: PlayerX has been banned
Reason: griefing
Effective immediately
To undo: /pardon PlayerX
When user asks about server health or player history:
MC_SERVER_LOG is set and file existstail -500 <log_file>references/log-patterns.md📊 Server Log Summary (last 2 hours)
Player logins: 14
Player logouts: 12 (2 still online)
Errors/Warnings: 3
- [15:42] Can't keep up! Running 2500ms behind
- [16:10] Saving chunks for level 'world'
Suspicious activity: none detected
references/commands.md — All vanilla commands with syntax and permission levelreferences/log-patterns.md — Common log patterns and what they meanscripts/rcon.js — RCON client (used by all commands above)scripts/log-analyzer.js — Log parsing utilitiesZIP package — ready to use