🚨 Security Warning
DANGER: The Management Protocol has no built-in security protection. Anyone with access can get full server control.
Never expose management server ports to the internet. Use only on local networks or secure tunnels.
🔒 Security Best Practices:
- ✅ Keep management port on localhost (127.0.0.1)
- ✅ Use firewall rules to restrict access
- ✅ Implement VPN or SSH tunneling for remote access
- ✅ Monitor connection logs regularly
- ❌ Never bind to 0.0.0.0 or public IPs
🔗 WebSocket Connection Configuration
1. Server Configuration
server.properties settings:
# Enable Management Server API
management-server-enabled=true
management-server-host=localhost
management-server-port=25585
2. Interactive Connection Tester
📚 API Methods Explorer
Complete JSON-RPC method reference with interactive testing capabilities
👥 Allowlist Management
Manage server allowlist with comprehensive player access control
Get the current allowlist
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:allowlist/", "id": 1}
Set the allowlist to provided players
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:allowlist/set", "params": {"players": [{"name": "Steve", "uuid": "..."}]}, "id": 1}
Add players to the allowlist
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:allowlist/add", "params": {"add": [{"name": "Alex", "uuid": "..."}]}, "id": 1}
Remove players from allowlist
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:allowlist/remove", "params": {"remove": [{"name": "Herobrine", "uuid": "..."}]}, "id": 1}
Clear all players from allowlist
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:allowlist/clear", "id": 1}
🚫 Player Ban Management
Comprehensive player ban system with flexible ban controls
Get the current ban list
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:bans/", "id": 1}
Set the complete ban list
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:bans/set", "params": {"bans": [{"player": "Griefer", "reason": "Griefing", "expires": "2024-12-31"}]}, "id": 1}
Add players to the ban list
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:bans/add", "params": {"add": [{"player": "Cheater", "reason": "Hacking"}]}, "id": 1}
Remove players from ban list
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:bans/remove", "params": {"remove": [{"name": "Reformed", "uuid": "..."}]}, "id": 1}
Clear all bans from the server
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:bans/clear", "id": 1}
🛡️ IP Ban Management
Advanced IP-based blocking system for enhanced server security
Get the current IP ban list
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:ip_bans/", "id": 1}
Set the complete IP ban list
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:ip_bans/set", "params": {"banlist": [{"ip": "192.168.1.100", "reason": "Suspicious activity"}]}, "id": 1}
Add IPs to the ban list
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:ip_bans/add", "params": {"add": [{"ip": "10.0.0.5", "reason": "DDoS attempt"}]}, "id": 1}
Remove IPs from ban list
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:ip_bans/remove", "params": {"ip": ["192.168.1.50"]}, "id": 1}
Clear all IP bans
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:ip_bans/clear", "id": 1}
🎮 Player Management
Real-time player administration and monitoring tools
Get all connected players
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:players/", "id": 1}
Kick players from the server
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:players/kick", "params": {"kick": [{"player": "BadPlayer", "reason": "Inappropriate behavior"}]}, "id": 1}
👑 Operator Management
Server operator permissions and privilege management system
Get all server operators
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:operators/", "id": 1}
Set the complete operator list
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:operators/set", "params": {"operators": [{"name": "Admin", "level": 4, "bypassesPlayerLimit": true}]}, "id": 1}
Grant operator privileges to players
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:operators/add", "params": {"add": [{"name": "Moderator", "level": 2}]}, "id": 1}
Remove operator privileges from players
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:operators/remove", "params": {"remove": [{"name": "ExMod", "uuid": "..."}]}, "id": 1}
Remove all operator privileges
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:operators/clear", "id": 1}
⚙️ Server Control
Core server management functions and system messaging
Get current server status and information
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:server/status", "id": 1}
Save current server state to disk
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:server/save", "params": {"flush": true}, "id": 1}
Gracefully stop the server
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:server/stop", "id": 1}
Send system message to all players
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:server/system_message", "params": {"message": {"text": "Server restart in 5 minutes", "type": "announcement"}}, "id": 1}
🔧 Server Settings
Dynamic server configuration and runtime settings management
Get current server difficulty
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/difficulty", "id": 1}
Set server difficulty level
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/difficulty/set", "params": {"difficulty": "hard"}, "id": 1}
Get maximum player limit
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/max_players", "id": 1}
Set maximum player limit
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/max_players/set", "params": {"max": 50}, "id": 1}
Get server message of the day
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/motd", "id": 1}
Set server message of the day
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/motd/set", "params": {"message": "Welcome to our amazing server!"}, "id": 1}
Get whether automatic world saving is enabled
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/autosave", "id": 1}
Enable or disable automatic world saving
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/autosave/set", "params": {"enable": true}, "id": 1}
Get whether allowlist enforcement is enabled
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/enforce_allowlist", "id": 1}
Enable or disable allowlist enforcement
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/enforce_allowlist/set", "params": {"enforce": true}, "id": 1}
Get whether the allowlist is enabled on server
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/use_allowlist", "id": 1}
Enable or disable the allowlist on server
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/use_allowlist/set", "params": {"use": true}, "id": 1}
Get seconds before game pauses when no players online
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/pause_when_empty_seconds", "id": 1}
Set seconds before game pauses when no players online
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/pause_when_empty_seconds/set", "params": {"seconds": 60}, "id": 1}
Get seconds before idle players are kicked
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/player_idle_timeout", "id": 1}
Set seconds before idle players are kicked
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/player_idle_timeout/set", "params": {"seconds": 300}, "id": 1}
Get whether flight is allowed in Survival mode
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/allow_flight", "id": 1}
Set whether flight is allowed in Survival mode
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/allow_flight/set", "params": {"allowed": false}, "id": 1}
Get spawn protection radius in blocks
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/spawn_protection_radius", "id": 1}
Set spawn protection radius in blocks
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/spawn_protection_radius/set", "params": {"radius": 16}, "id": 1}
Get whether players are forced to default game mode
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/force_game_mode", "id": 1}
Set whether players are forced to default game mode
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/force_game_mode/set", "params": {"forced": true}, "id": 1}
Get the server's default game mode
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/game_mode", "id": 1}
Set the server's default game mode
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/game_mode/set", "params": {"mode": "survival"}, "id": 1}
Get server view distance in chunks
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/view_distance", "id": 1}
Set server view distance in chunks
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/view_distance/set", "params": {"distance": 10}, "id": 1}
Get the server's simulation distance in chunks
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/simulation_distance", "id": 1}
Set the server's simulation distance in chunks
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/simulation_distance/set", "params": {"distance": 8}, "id": 1}
Get whether the server accepts player transfers from other servers
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/accept_transfers", "id": 1}
Set whether the server accepts player transfers from other servers
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/accept_transfers/set", "params": {"accept": true}, "id": 1}
Get the interval in seconds between server status heartbeats
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/status_heartbeat_interval", "id": 1}
Set the interval in seconds between server status heartbeats
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/status_heartbeat_interval/set", "params": {"seconds": 30}, "id": 1}
Get the permission level required for operator commands
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/operator_user_permission_level", "id": 1}
Set the permission level required for operator commands
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/operator_user_permission_level/set", "params": {"level": 4}, "id": 1}
Get whether the server hides online player information from status queries
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/hide_online_players", "id": 1}
Set whether the server hides online player information from status queries
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/hide_online_players/set", "params": {"hide": false}, "id": 1}
Get whether the server responds to connection status requests
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/status_replies", "id": 1}
Set whether the server responds to connection status requests
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/status_replies/set", "params": {"enable": true}, "id": 1}
Get the entity broadcast range as a percentage
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/entity_broadcast_range", "id": 1}
Set the entity broadcast range as a percentage
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:serversettings/entity_broadcast_range/set", "params": {"percentage_points": 100}, "id": 1}
📜 Gamerule Management
Dynamic game rule configuration for world behavior control
Get the available game rule keys and their current values
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:gamerules/", "id": 1}
Update game rule value
📝 JSON-RPC Example:
{"jsonrpc": "2.0", "method": "minecraft:gamerules/update", "params": {"gamerule": {"key": "keepInventory", "value": "true"}}, "id": 1}
🧪 Interactive Testing Console
JSON-RPC Request Builder & Tester
📤 Responses & Logs:
🔔 Real-time Notifications System
Monitor live server events and player activities through WebSocket notifications
🖥️ Server Notifications
Real-time server status and event notifications
server.started
Server has successfully started
server.stopping
Server shutdown initiated
server.stopped
Server has shut down
server.saved
World data saved to disk
👥 Player Notifications
Player connection and activity monitoring
player.joined
Player connected to server
player.left
Player disconnected from server
player.kicked
Player was kicked from server
player.chat
Player sent chat message
👑 Operator Notifications
Operator privilege changes and administrative actions
operator.added
Player granted operator privileges
operator.removed
Player lost operator privileges
operator.command
Operator executed server command
📋 Allowlist Notifications
Allowlist modification and access control events
allowlist.added
Player added to server allowlist
allowlist.removed
Player removed from allowlist
allowlist.cleared
Server allowlist completely cleared
🚫 Ban Notifications
Player and IP ban system event monitoring
ban.added
Player banned from server
ban.removed
Player unbanned from server
ip_ban.added
IP address banned from server
ip_ban.removed
IP address unbanned from server
📡 Live Event Monitor
🛠️ Server Management Utilities
🔧 Quick Actions
📝 Message Broadcaster
⚙️ Settings Quick Edit
💻 Integration Examples & Code Samples
🟨 JavaScript WebSocket Client
// Connect to Minecraft Server Management Protocol
const ws = new WebSocket('ws://localhost:25585');
ws.onopen = function() {
console.log('Connected to server management API');
// Get server status
const request = {
jsonrpc: "2.0",
method: "minecraft:server/status",
id: 1
};
ws.send(JSON.stringify(request));
};
ws.onmessage = function(event) {
const response = JSON.parse(event.data);
console.log('Server response:', response);
if (response.result) {
console.log('Server status:', response.result.status);
}
};
// Add player to allowlist
function addToAllowlist(playerName, playerUuid) {
const request = {
jsonrpc: "2.0",
method: "minecraft:allowlist/add",
params: {
add: [{
name: playerName,
uuid: playerUuid
}]
},
id: Date.now()
};
ws.send(JSON.stringify(request));
}
🐍 Python WebSocket Client
import asyncio
import websockets
import json
class MinecraftServerManager:
def __init__(self, host='localhost', port=25585):
self.uri = f'ws://{host}:{port}'
self.websocket = None
async def connect(self):
self.websocket = await websockets.connect(self.uri)
print("Connected to Minecraft Server Management API")
async def send_request(self, method, params=None):
request = {
"jsonrpc": "2.0",
"method": method,
"id": 1
}
if params:
request["params"] = params
await self.websocket.send(json.dumps(request))
response = await self.websocket.recv()
return json.loads(response)
async def get_server_status(self):
return await self.send_request("minecraft:server/status")
async def kick_player(self, player_name, reason="Kicked by admin"):
params = {
"kick": [{
"player": player_name,
"reason": reason
}]
}
return await self.send_request("minecraft:players/kick", params)
# Usage example
async def main():
manager = MinecraftServerManager()
await manager.connect()
status = await manager.get_server_status()
print(f"Server status: {status}")
asyncio.run(main())
🟢 Node.js Server Management
const WebSocket = require('ws');
class MinecraftServerAPI {
constructor(host = 'localhost', port = 25585) {
this.ws = new WebSocket(`ws://${host}:${port}`);
this.requestId = 0;
this.pendingRequests = new Map();
this.ws.on('open', () => {
console.log('🎮 Connected to Minecraft server');
});
this.ws.on('message', (data) => {
const response = JSON.parse(data);
if (response.id && this.pendingRequests.has(response.id)) {
const resolve = this.pendingRequests.get(response.id);
this.pendingRequests.delete(response.id);
resolve(response);
}
});
}
async sendRequest(method, params = null) {
const id = ++this.requestId;
const request = {
jsonrpc: "2.0",
method: method,
id: id
};
if (params) request.params = params;
return new Promise((resolve) => {
this.pendingRequests.set(id, resolve);
this.ws.send(JSON.stringify(request));
});
}
async manageAllowlist(action, players) {
const method = `minecraft:allowlist/${action}`;
const params = action === 'clear' ? null : { [action]: players };
return await this.sendRequest(method, params);
}
async broadcastMessage(message) {
return await this.sendRequest('minecraft:server/system_message', {
message: { text: message, type: 'broadcast' }
});
}
}
// Usage
const api = new MinecraftServerAPI();
// Add multiple players to allowlist
api.manageAllowlist('add', [
{ name: 'Steve', uuid: '...' },
{ name: 'Alex', uuid: '...' }
]).then(result => {
console.log('✅ Players added to allowlist:', result);
});
☕ Java WebSocket Client
import java.net.URI;
import java.util.concurrent.CompletableFuture;
import org.java_websocket.client.WebSocketClient;
import org.java_websocket.handshake.ServerHandshake;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
public class MinecraftServerManager extends WebSocketClient {
private final Gson gson = new Gson();
private int requestId = 0;
public MinecraftServerManager(String host, int port) {
super(URI.create("ws://" + host + ":" + port));
}
@Override
public void onOpen(ServerHandshake handshake) {
System.out.println("🎮 Connected to Minecraft Server Management API");
}
@Override
public void onMessage(String message) {
JsonObject response = gson.fromJsonTree(message);
System.out.println("📨 Server response: " + response);
}
public void sendRequest(String method, JsonObject params) {
JsonObject request = new JsonObject();
request.addProperty("jsonrpc", "2.0");
request.addProperty("method", method);
request.addProperty("id", ++requestId);
if (params != null) {
request.add("params", params);
}
send(gson.toJson(request));
}
public void getServerStatus() {
sendRequest("minecraft:server/status", null);
}
public void setDifficulty(String difficulty) {
JsonObject params = new JsonObject();
params.addProperty("difficulty", difficulty);
sendRequest("minecraft:serversettings/difficulty/set", params);
}
public void kickPlayer(String playerName, String reason) {
JsonObject player = new JsonObject();
player.addProperty("player", playerName);
player.addProperty("reason", reason);
JsonObject params = new JsonObject();
JsonArray kickArray = new JsonArray();
kickArray.add(player);
params.add("kick", kickArray);
sendRequest("minecraft:players/kick", params);
}
// Usage example
public static void main(String[] args) {
MinecraftServerManager manager = new MinecraftServerManager("localhost", 25585);
manager.connect();
// Wait for connection then send requests
manager.getServerStatus();
manager.setDifficulty("hard");
}
}