@wumx-labs/noxaeapi-mcp 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +149 -42
  3. package/dist/index.js +240 -5
  4. package/package.json +4 -2
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 wumx
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,78 +1,185 @@
1
1
  # @wumx-labs/noxaeapi-mcp
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@wumx-labs/noxaeapi-mcp?color=blue&style=flat-square)](https://www.npmjs.com/package/@wumx-labs/noxaeapi-mcp)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](LICENSE)
5
+ [![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-purple.svg?style=flat-square)](https://modelcontextprotocol.io)
6
+ [![NoxAeApi Core](https://img.shields.io/badge/NoxAeApi-v1.5.1-emerald.svg?style=flat-square)](https://github.com/wumx-labs)
7
+
3
8
  Official **Model Context Protocol (MCP)** server for **NoxAeApi**.
4
9
 
5
- Allows any AI Agent (**Claude Code**, **Claude Desktop**, **Cursor**, **Windsurf**, **Cline**, **Antigravity**) to monitor and control your Minecraft servers and Velocity network hubs using natural language.
10
+ Connect your Minecraft servers and Velocity proxy networks directly to any AI agent (**Claude Desktop**, **Claude Code**, **Cursor**, **Windsurf**, **Antigravity**, **Cline**, **Roo Code**) using natural language.
6
11
 
7
12
  ---
8
13
 
9
- ## ⚡ Features
14
+ ## 🌟 Key Features
10
15
 
11
- * **Network Hub & Proxy Support (Velocity)**: Check all nodes status, TPS, broadcast to network, find players across proxy, transfer players between servers.
12
- * **Server Management**: Real-time TPS (1m, 5m, 15m), RAM/memory usage, execute console commands, manage whitelists, and view bans.
13
- * **Player Controls**: List online players with ping/health, player info & stats, kick, ban, unban, change gamemodes.
14
- * **LuckPerms Integration**: Inspect player groups & permissions, grant/revoke permissions with expiry, assign primary groups.
15
- * **Economy Management**: Check balances (Vault & multi-currency), pay, debit, and view top balance leaderboards.
16
- * **World Controls**: List worlds, change time (`day`, `night`, ticks), adjust weather (`clear`, `rain`, `thunder`), and inspect loaded entities.
17
- * **Plugin Insights**: Inspect installed plugins, enabled state, and versions.
18
- * **Zero Configuration**: Automatically reads your active server profile from `~/.noxaeapi-cli/config.json`.
16
+ * **🌐 Velocity Network Hub & Standalone Servers**: Monitor network topology, broadcast announcements, find players across proxy hubs, and seamlessly route commands to backend nodes (e.g. `CSMP`, `LOBBY`).
17
+ * **⚡ Server Health & TPS Diagnostics**: Real-time TPS metrics (1m, 5m, 15m), RAM/memory allocation, uptime, and console log inspection.
18
+ * **👥 Player Management**: Track online players, inspect inventory/gamemode/coordinates, kick, ban, unban, and toggle whitelists.
19
+ * **🛡️ LuckPerms Permissions**: Inspect user permissions, view inherited parent groups, grant/revoke permissions with expiry, and assign primary groups.
20
+ * **💰 Multi-Currency & Vault Economy**: Native Vault balance queries, richest player rankings, custom currency leaderboards (Coins, Candy, Gems), deposits, and debits.
21
+ * **🏆 Gameplay Leaderboards**: Query high-speed in-memory leaderboards (`player:kills`, `player:deaths`, `player:playtime`, `mcmmo:power`) with automatic noise filtration.
22
+ * **🌍 Worlds & Weather**: List loaded worlds, adjust in-game time (`day`, `night`, ticks), set weather (`clear`, `rain`, `thunder`), and view entity counts.
23
+ * **🔌 Plugin Ecosystem Integration**: Built-in support for CoreProtect, WorldGuard, EssentialsX, BetterTeams, DiscordSRV, PlayerPoints, MythicMobs, ShopGUI+, and TAB.
24
+ * **🤖 Autonomous AI Sysadmin**: Embedded `minecraft_sysadmin` decision tree guides AI models to execute operations accurately and safely without hallucination.
19
25
 
20
26
  ---
21
27
 
22
- ## 🚀 Setup & Usage
28
+ ## 🚀 Quick Start & Client Configuration
23
29
 
24
- ### 1. Claude Code (CLI)
30
+ You do **not** need to manually clone or compile this repository. Run it instantly via `npx`.
25
31
 
26
- Add directly using Claude CLI:
27
- ```bash
28
- claude mcp add noxae -- node d:/Ainz-Project/NoxAeApi-ZZ/noxaeapi-mcp/dist/index.js
29
- ```
30
- Or if installed globally:
31
- ```bash
32
- claude mcp add noxae -- npx @wumx-labs/noxaeapi-mcp
33
- ```
32
+ ### 1. Claude Desktop
34
33
 
35
- ### 2. Claude Desktop
34
+ Add this configuration to your `claude_desktop_config.json`:
36
35
 
37
- Add this to your `claude_desktop_config.json`:
36
+ * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
37
+ * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
38
38
 
39
39
  ```json
40
40
  {
41
41
  "mcpServers": {
42
- "noxae": {
43
- "command": "node",
44
- "args": ["d:/Ainz-Project/NoxAeApi-ZZ/noxaeapi-mcp/dist/index.js"]
42
+ "noxaeapi": {
43
+ "command": "npx",
44
+ "args": ["-y", "@wumx-labs/noxaeapi-mcp"]
45
45
  }
46
46
  }
47
47
  }
48
48
  ```
49
49
 
50
- ### 3. Cursor / Windsurf
50
+ > **Tip:** If you have multiple profiles saved via `noxaeapi-cli`, specify the profile using the `NOXAEAPI_PROFILE` environment variable:
51
+ > ```json
52
+ > {
53
+ > "mcpServers": {
54
+ > "noxaeapi": {
55
+ > "command": "npx",
56
+ > "args": ["-y", "@wumx-labs/noxaeapi-mcp"],
57
+ > "env": {
58
+ > "NOXAEAPI_PROFILE": "calm"
59
+ > }
60
+ > }
61
+ > }
62
+ > }
63
+ > ```
51
64
 
52
- Add a new MCP server in Settings:
53
- * **Name**: `noxae`
65
+ ---
66
+
67
+ ### 2. Cursor / Windsurf
68
+
69
+ Go to **Settings** ➔ **MCP Servers** ➔ **Add New MCP Server**:
70
+
71
+ * **Name**: `noxaeapi`
54
72
  * **Type**: `command`
55
- * **Command**: `node d:/Ainz-Project/NoxAeApi-ZZ/noxaeapi-mcp/dist/index.js`
73
+ * **Command**: `npx -y @wumx-labs/noxaeapi-mcp`
74
+
75
+ Or in `.cursor/mcp.json`:
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "noxaeapi": {
80
+ "command": "npx",
81
+ "args": ["-y", "@wumx-labs/noxaeapi-mcp"]
82
+ }
83
+ }
84
+ }
85
+ ```
56
86
 
57
87
  ---
58
88
 
59
- ## ⚙️ Options & Flags
89
+ ### 3. Claude Code CLI
60
90
 
61
- By default, `noxaeapi-mcp` automatically connects to your current active profile in `noxaeapi-cli`. You can also override it:
91
+ Add the MCP server directly using the Claude CLI:
62
92
 
63
93
  ```bash
64
- # Target a specific profile saved in noxaeapi-cli
65
- node dist/index.js --profile my-survival
94
+ claude mcp add noxaeapi -- npx -y @wumx-labs/noxaeapi-mcp
95
+ ```
96
+
97
+ ---
66
98
 
67
- # Connect directly using URL and API Key
68
- node dist/index.js --url http://127.0.0.1:8080 --key my-secret-key
99
+ ### 4. Cline / Roo Code (VS Code Extension)
69
100
 
70
- # Connect to a Velocity Network Hub directly
71
- node dist/index.js --url http://127.0.0.1:19135 --key my-hub-key --hub
101
+ Add this under the `mcpServers` object in your settings:
102
+
103
+ ```json
104
+ {
105
+ "noxaeapi": {
106
+ "command": "npx",
107
+ "args": ["-y", "@wumx-labs/noxaeapi-mcp"],
108
+ "disabled": false,
109
+ "alwaysAllow": []
110
+ }
111
+ }
112
+ ```
113
+
114
+ ---
115
+
116
+ ## ⚙️ Configuration & Environment Variables
117
+
118
+ `noxaeapi-mcp` automatically detects your active profile from `~/.noxaeapi-cli/config.json`. You can also configure it directly via CLI arguments or environment variables:
119
+
120
+ ### Direct Connection (Standalone or Hub)
121
+ ```bash
122
+ # Connect directly to a standalone Paper/Spigot server:
123
+ npx @wumx-labs/noxaeapi-mcp --url http://127.0.0.1:8080 --key your-api-key
124
+
125
+ # Connect directly to a Velocity Network Hub proxy:
126
+ npx @wumx-labs/noxaeapi-mcp --url http://127.0.0.1:19135 --key your-hub-key --hub
72
127
  ```
73
128
 
74
- Or via environment variables:
75
- * `NOXAEAPI_PROFILE`
76
- * `NOXAEAPI_BASE_URL`
77
- * `NOXAEAPI_KEY`
78
- * `NOXAEAPI_HUB=true`
129
+ ### Supported Environment Variables
130
+ | Variable | Description |
131
+ | :--- | :--- |
132
+ | `NOXAEAPI_PROFILE` | Select a specific profile name saved in `noxaeapi-cli` |
133
+ | `NOXAEAPI_BASE_URL` | Base URL of your NoxAeApi server (e.g. `http://216.163.186.103:12005`) |
134
+ | `NOXAEAPI_KEY` | API key configured in NoxAeApi `config.yml` |
135
+ | `NOXAEAPI_HUB` | Set to `"true"` if connecting to a Velocity network hub |
136
+ | `NOXAEAPI_HUB_BASE_URL` | Base URL for hub connection (auto-enables hub mode) |
137
+ | `NOXAEAPI_HUB_KEY` | API Key for hub connection |
138
+
139
+ ---
140
+
141
+ ## 🛠️ Available MCP Tools
142
+
143
+ ### 🌐 Network (Velocity Hub)
144
+ * `network_status_all` — Live status, TPS, and player count across all backend nodes.
145
+ * `network_node_status` — Detailed metrics for a specific node ID.
146
+ * `network_broadcast` — Broadcast announcement across all servers.
147
+ * `network_find_player` — Locate which server node a player is currently on.
148
+ * `network_send_player` — Transfer/teleport player between server nodes.
149
+
150
+ ### 🖥️ Server Diagnostics & Controls
151
+ * `server_get_status` — TPS (1m, 5m, 15m), RAM/memory usage, uptime, version.
152
+ * `server_dispatch_command` — Execute console commands safely (without leading `/`).
153
+ * `server_get_logs` — Retrieve recent console logs and error traces.
154
+ * `server_get_whitelist` / `server_whitelist_add` / `server_whitelist_remove` — Whitelist management.
155
+ * `server_get_ops` / `server_op_player` / `server_deop_player` — Operator management.
156
+ * `server_restart` — Restart the target server instance.
157
+
158
+ ### 👥 Player Subsystem
159
+ * `players_list_online` — List active players with ping, health, and location.
160
+ * `players_get_info` — Detailed player profile (gamemode, inventory, coordinates).
161
+ * `players_kick` / `players_ban` / `players_unban` — Moderation controls.
162
+ * `players_set_gamemode` — Switch player gamemodes (survival, creative, spectator, adventure).
163
+
164
+ ### 💰 Economy & Leaderboards
165
+ * `economy_get_top` — Richest player leaderboard (Vault balances or custom currencies).
166
+ * `economy_get_balance` — Query individual player balances.
167
+ * `economy_list_currencies` — Discover custom currencies (Coins, Candy, Tokens).
168
+ * `economy_get_currency_top` — Rankings for custom currencies.
169
+ * `economy_pay` / `economy_debit` — Deposit or deduct currency.
170
+ * `leaderboards_list` — Discover active gameplay leaderboards (noise-filtered).
171
+ * `leaderboards_get_top` — Top rankings for kills, deaths, playtime, etc.
172
+
173
+ ### 🛡️ Permissions & Plugins
174
+ * `luckperms_get_player_info` — View assigned permissions and group hierarchy.
175
+ * `luckperms_add_player_permission` / `luckperms_remove_player_permission` — Modify player permissions.
176
+ * `luckperms_set_player_primary_group` — Change player primary group.
177
+ * `plugins_list` / `plugins_get_info` — Inspect installed plugins and versions.
178
+ * `worlds_list` / `worlds_set_time` / `worlds_set_weather` — World environment controls.
179
+ * `noxae_call_action` — Universal dynamic reflection caller for 16+ Minecraft plugin APIs.
180
+
181
+ ---
182
+
183
+ ## 📜 License
184
+
185
+ MIT License © 2026 [wumx-labs](https://github.com/wumx-labs).
package/dist/index.js CHANGED
@@ -1905,8 +1905,230 @@ function registerLeaderboardTools(server) {
1905
1905
  );
1906
1906
  }
1907
1907
 
1908
- // src/tools/auto-register.ts
1908
+ // src/tools/rankforge.ts
1909
1909
  import { z as z10 } from "zod";
1910
+ async function resolveUuid5(client, playerOrUuid) {
1911
+ if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(playerOrUuid)) {
1912
+ return playerOrUuid;
1913
+ }
1914
+ try {
1915
+ const res = await client.players.resolve(playerOrUuid);
1916
+ return res.uuid;
1917
+ } catch {
1918
+ return playerOrUuid;
1919
+ }
1920
+ }
1921
+ function registerRankForgeTools(server) {
1922
+ server.tool(
1923
+ "rankforge_get_player_stats",
1924
+ "Get full RankForge PvP stats for a player: points, current tier, next tier, kills, deaths, K/D ratio, and daily kills. Accepts UUID or player name.",
1925
+ {
1926
+ player: z10.string().describe("Player UUID or player name"),
1927
+ nodeId: z10.string().optional().describe("Target server node ID when connected via Velocity hub")
1928
+ },
1929
+ async ({ player, nodeId }) => {
1930
+ const session = getSession();
1931
+ try {
1932
+ const { client, effectiveNodeId } = await session.resolveTargetClient(nodeId);
1933
+ const uuid = await resolveUuid5(client, player);
1934
+ const stats = await client.rankforge.getPlayerStats(uuid);
1935
+ const prefix = effectiveNodeId ? `[Target Node: @${effectiveNodeId}]
1936
+ ` : "";
1937
+ return {
1938
+ content: [{ type: "text", text: prefix + JSON.stringify(stats, null, 2) }]
1939
+ };
1940
+ } catch (err) {
1941
+ return {
1942
+ isError: true,
1943
+ content: [{ type: "text", text: `Failed to get RankForge stats for '${player}': ${err instanceof Error ? err.message : String(err)}` }]
1944
+ };
1945
+ }
1946
+ }
1947
+ );
1948
+ server.tool(
1949
+ "rankforge_get_points",
1950
+ "Get current RankForge points for a player. Accepts UUID or player name.",
1951
+ {
1952
+ player: z10.string().describe("Player UUID or player name"),
1953
+ nodeId: z10.string().optional().describe("Target server node ID when connected via Velocity hub")
1954
+ },
1955
+ async ({ player, nodeId }) => {
1956
+ const session = getSession();
1957
+ try {
1958
+ const { client, effectiveNodeId } = await session.resolveTargetClient(nodeId);
1959
+ const uuid = await resolveUuid5(client, player);
1960
+ const result = await client.rankforge.getPoints(uuid);
1961
+ const prefix = effectiveNodeId ? `[Target Node: @${effectiveNodeId}]
1962
+ ` : "";
1963
+ return {
1964
+ content: [{ type: "text", text: prefix + JSON.stringify(result, null, 2) }]
1965
+ };
1966
+ } catch (err) {
1967
+ return {
1968
+ isError: true,
1969
+ content: [{ type: "text", text: `Failed to get points for '${player}': ${err instanceof Error ? err.message : String(err)}` }]
1970
+ };
1971
+ }
1972
+ }
1973
+ );
1974
+ server.tool(
1975
+ "rankforge_set_points",
1976
+ "Set RankForge points for a player to an exact amount. This will override their current points. Accepts UUID or player name.",
1977
+ {
1978
+ player: z10.string().describe("Player UUID or player name"),
1979
+ amount: z10.number().describe("Exact points value to set"),
1980
+ nodeId: z10.string().optional().describe("Target server node ID when connected via Velocity hub")
1981
+ },
1982
+ async ({ player, amount, nodeId }) => {
1983
+ const session = getSession();
1984
+ try {
1985
+ const { client, effectiveNodeId } = await session.resolveTargetClient(nodeId);
1986
+ const uuid = await resolveUuid5(client, player);
1987
+ const result = await client.rankforge.setPoints(uuid, amount);
1988
+ const prefix = effectiveNodeId ? `[Target Node: @${effectiveNodeId}]
1989
+ ` : "";
1990
+ return {
1991
+ content: [{ type: "text", text: prefix + JSON.stringify(result, null, 2) }]
1992
+ };
1993
+ } catch (err) {
1994
+ return {
1995
+ isError: true,
1996
+ content: [{ type: "text", text: `Failed to set points for '${player}': ${err instanceof Error ? err.message : String(err)}` }]
1997
+ };
1998
+ }
1999
+ }
2000
+ );
2001
+ server.tool(
2002
+ "rankforge_add_points",
2003
+ "Add RankForge points to a player. Accepts UUID or player name.",
2004
+ {
2005
+ player: z10.string().describe("Player UUID or player name"),
2006
+ amount: z10.number().describe("Number of points to add"),
2007
+ nodeId: z10.string().optional().describe("Target server node ID when connected via Velocity hub")
2008
+ },
2009
+ async ({ player, amount, nodeId }) => {
2010
+ const session = getSession();
2011
+ try {
2012
+ const { client, effectiveNodeId } = await session.resolveTargetClient(nodeId);
2013
+ const uuid = await resolveUuid5(client, player);
2014
+ const result = await client.rankforge.addPoints(uuid, amount);
2015
+ const prefix = effectiveNodeId ? `[Target Node: @${effectiveNodeId}]
2016
+ ` : "";
2017
+ return {
2018
+ content: [{ type: "text", text: prefix + JSON.stringify(result, null, 2) }]
2019
+ };
2020
+ } catch (err) {
2021
+ return {
2022
+ isError: true,
2023
+ content: [{ type: "text", text: `Failed to add points for '${player}': ${err instanceof Error ? err.message : String(err)}` }]
2024
+ };
2025
+ }
2026
+ }
2027
+ );
2028
+ server.tool(
2029
+ "rankforge_remove_points",
2030
+ "Remove (deduct) RankForge points from a player. Accepts UUID or player name.",
2031
+ {
2032
+ player: z10.string().describe("Player UUID or player name"),
2033
+ amount: z10.number().describe("Number of points to remove"),
2034
+ nodeId: z10.string().optional().describe("Target server node ID when connected via Velocity hub")
2035
+ },
2036
+ async ({ player, amount, nodeId }) => {
2037
+ const session = getSession();
2038
+ try {
2039
+ const { client, effectiveNodeId } = await session.resolveTargetClient(nodeId);
2040
+ const uuid = await resolveUuid5(client, player);
2041
+ const result = await client.rankforge.removePoints(uuid, amount);
2042
+ const prefix = effectiveNodeId ? `[Target Node: @${effectiveNodeId}]
2043
+ ` : "";
2044
+ return {
2045
+ content: [{ type: "text", text: prefix + JSON.stringify(result, null, 2) }]
2046
+ };
2047
+ } catch (err) {
2048
+ return {
2049
+ isError: true,
2050
+ content: [{ type: "text", text: `Failed to remove points for '${player}': ${err instanceof Error ? err.message : String(err)}` }]
2051
+ };
2052
+ }
2053
+ }
2054
+ );
2055
+ server.tool(
2056
+ "rankforge_list_tiers",
2057
+ "List all registered PvP tiers from RankForge (name, minPoints, maxPoints, etc.).",
2058
+ {
2059
+ nodeId: z10.string().optional().describe("Target server node ID when connected via Velocity hub")
2060
+ },
2061
+ async ({ nodeId }) => {
2062
+ const session = getSession();
2063
+ try {
2064
+ const { client, effectiveNodeId } = await session.resolveTargetClient(nodeId);
2065
+ const tiers = await client.rankforge.getTiers();
2066
+ const prefix = effectiveNodeId ? `[Target Node: @${effectiveNodeId}]
2067
+ ` : "";
2068
+ return {
2069
+ content: [{ type: "text", text: prefix + JSON.stringify(tiers, null, 2) }]
2070
+ };
2071
+ } catch (err) {
2072
+ return {
2073
+ isError: true,
2074
+ content: [{ type: "text", text: `Failed to list RankForge tiers: ${err instanceof Error ? err.message : String(err)}` }]
2075
+ };
2076
+ }
2077
+ }
2078
+ );
2079
+ server.tool(
2080
+ "rankforge_get_top",
2081
+ "Get the top players ranked by RankForge points (PvP leaderboard). Returns rank, UUID, name, points, and tier.",
2082
+ {
2083
+ limit: z10.number().optional().describe("Number of top players to return (default 10, max 100)"),
2084
+ nodeId: z10.string().optional().describe("Target server node ID when connected via Velocity hub")
2085
+ },
2086
+ async ({ limit = 10, nodeId }) => {
2087
+ const session = getSession();
2088
+ try {
2089
+ const { client, effectiveNodeId } = await session.resolveTargetClient(nodeId);
2090
+ const top = await client.rankforge.getTop(limit);
2091
+ const prefix = effectiveNodeId ? `[Target Node: @${effectiveNodeId}]
2092
+ ` : "";
2093
+ return {
2094
+ content: [{ type: "text", text: prefix + JSON.stringify(top, null, 2) }]
2095
+ };
2096
+ } catch (err) {
2097
+ return {
2098
+ isError: true,
2099
+ content: [{ type: "text", text: `Failed to get RankForge top: ${err instanceof Error ? err.message : String(err)}` }]
2100
+ };
2101
+ }
2102
+ }
2103
+ );
2104
+ server.tool(
2105
+ "rankforge_save",
2106
+ "Trigger an async save of all RankForge player data to disk/database.",
2107
+ {
2108
+ nodeId: z10.string().optional().describe("Target server node ID when connected via Velocity hub")
2109
+ },
2110
+ async ({ nodeId }) => {
2111
+ const session = getSession();
2112
+ try {
2113
+ const { client, effectiveNodeId } = await session.resolveTargetClient(nodeId);
2114
+ const result = await client.rankforge.save();
2115
+ const prefix = effectiveNodeId ? `[Target Node: @${effectiveNodeId}]
2116
+ ` : "";
2117
+ return {
2118
+ content: [{ type: "text", text: prefix + JSON.stringify(result, null, 2) }]
2119
+ };
2120
+ } catch (err) {
2121
+ return {
2122
+ isError: true,
2123
+ content: [{ type: "text", text: `Failed to trigger RankForge save: ${err instanceof Error ? err.message : String(err)}` }]
2124
+ };
2125
+ }
2126
+ }
2127
+ );
2128
+ }
2129
+
2130
+ // src/tools/auto-register.ts
2131
+ import { z as z11 } from "zod";
1910
2132
  var SKIP_MODULES = /* @__PURE__ */ new Set(["http", "connect"]);
1911
2133
  function registerAllSdkModules(server, registeredNames) {
1912
2134
  const session = getSession();
@@ -1934,8 +2156,8 @@ function registerAllSdkModules(server, registeredNames) {
1934
2156
  toolName,
1935
2157
  `NoxAeApi ${modName}.${action}() action. Supports standalone server or Velocity node targeting via nodeId.`,
1936
2158
  {
1937
- args: z10.array(z10.unknown()).optional().describe(`Arguments array for ${modName}.${action}()`),
1938
- nodeId: z10.string().optional().describe("Target server node ID (e.g. 'survival', 'lobby') when connected via Velocity hub")
2159
+ args: z11.array(z11.unknown()).optional().describe(`Arguments array for ${modName}.${action}()`),
2160
+ nodeId: z11.string().optional().describe("Target server node ID (e.g. 'survival', 'lobby') when connected via Velocity hub")
1939
2161
  },
1940
2162
  async ({ args = [], nodeId }) => {
1941
2163
  const currentSession = getSession();
@@ -2001,8 +2223,8 @@ async function main() {
2001
2223
  );
2002
2224
  }
2003
2225
  const server = new McpServer({
2004
- name: "noxaeapi-mcp",
2005
- version: "1.0.0"
2226
+ name: true ? "@wumx-labs/noxaeapi-mcp" : "noxaeapi-mcp",
2227
+ version: true ? "1.0.2" : "1.0.1"
2006
2228
  });
2007
2229
  const registeredNames = /* @__PURE__ */ new Set();
2008
2230
  const track = (names) => names.forEach((n) => registeredNames.add(n));
@@ -2062,6 +2284,17 @@ async function main() {
2062
2284
  "leaderboards_list",
2063
2285
  "leaderboards_get_top"
2064
2286
  ]);
2287
+ registerRankForgeTools(server);
2288
+ track([
2289
+ "rankforge_get_player_stats",
2290
+ "rankforge_get_points",
2291
+ "rankforge_set_points",
2292
+ "rankforge_add_points",
2293
+ "rankforge_remove_points",
2294
+ "rankforge_list_tiers",
2295
+ "rankforge_get_top",
2296
+ "rankforge_save"
2297
+ ]);
2065
2298
  registerWorldTools(server);
2066
2299
  track([
2067
2300
  "worlds_list",
@@ -2106,6 +2339,8 @@ Follow these operational guidelines to make accurate, reliable decisions:
2106
2339
  3. LEADERBOARD DECISION TREE:
2107
2340
  - For gameplay rankings (kills, deaths, playtime, mcmmo, auraskills): use 'leaderboards_get_top' with IDs like 'player:kills', 'player:deaths', 'player:playtime'.
2108
2341
  - Use 'leaderboards_list' to discover valid game stats (it automatically filters internal noise).
2342
+ - For RankForge PvP tier/points rankings: use 'rankforge_get_top' or the generic 'leaderboards_get_top' with id 'rankforge:points' or 'rankforge:kills'.
2343
+ - To inspect or modify a specific player's RankForge points: use 'rankforge_get_player_stats', 'rankforge_set_points', 'rankforge_add_points', 'rankforge_remove_points'.
2109
2344
 
2110
2345
  4. PERFORMANCE & DIAGNOSTICS:
2111
2346
  - For lag or TPS inquiries: call 'server_get_status'. TPS: 20.0 is perfect, <18.0 is lagging.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wumx-labs/noxaeapi-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Official Model Context Protocol (MCP) server for NoxAeApi - control Minecraft servers & Velocity networks from any AI agent",
5
5
  "author": "wumx",
6
6
  "license": "MIT",
@@ -13,7 +13,9 @@
13
13
  },
14
14
  "main": "dist/index.js",
15
15
  "files": [
16
- "dist"
16
+ "dist",
17
+ "README.md",
18
+ "LICENSE"
17
19
  ],
18
20
  "scripts": {
19
21
  "build": "tsup",