@libmsmp/core
v0.1.2
Published
Client for the official Minecraft Server Management Protocol (MSMP): WebSocket + JSON-RPC 2.0.
Maintainers
Readme
@libmsmp/core
TypeScript client for the Minecraft Server Management Protocol (MSMP) — WebSocket + JSON-RPC 2.0, for Java Edition dedicated servers (25w35a+).
Part of libmsmp. Runs on Node; the secret stays server-side.
npm install @libmsmp/coreimport { MinecraftManagementClient } from "@libmsmp/core";
const client = new MinecraftManagementClient({
host: "127.0.0.1",
port: 25585,
secret: process.env.MSMP_SECRET!,
tls: true,
tlsOptions: { rejectUnauthorized: false }, // self-signed keystore for local dev
});
await client.connect();
await client.allowlist.add([{ name: "jeb_" }]);
await client.players.kick([{ name: "griefer" }], { literal: "Not today" });
client.onNotification("players/joined", (p) => console.log(`${p.name} joined`));
client.store.subscribe((s) => render(s.players)); // reactive, notification-fed
await client.close();Typed groups: players, allowlist, bans, ipBans, operators, server,
serverSettings, gamerules, plus call(method, params) for raw JSON-RPC and
discover() for the live OpenRPC schema. Auth defaults to bearer; TLS on by
default with configurable tlsOptions; auto-reconnect with backoff.
See the full documentation and Nuxt integration.
License
MIT © Simeon L
