minecraft-mcp-rs 1.1.1

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 halfoffive
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 ADDED
@@ -0,0 +1,48 @@
1
+ # minecraft-mcp-rs
2
+
3
+ MCP server that controls a Minecraft bot (azalea) — prebuilt native binaries.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx minecraft-mcp-rs --headless --stdio
9
+ ```
10
+
11
+ or install globally:
12
+
13
+ ```bash
14
+ npm install -g minecraft-mcp-rs
15
+ minecraft-mcp-rs --headless --stdio
16
+ ```
17
+
18
+ For Claude Desktop / Cursor, add to your MCP client config:
19
+
20
+ ```json
21
+ {
22
+ "mcpServers": {
23
+ "minecraft": {
24
+ "command": "npx",
25
+ "args": ["-y", "minecraft-mcp-rs", "--headless", "--stdio"]
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ See the [root README](https://github.com/halfoffive/minecraft-mcp-rs#readme) for
32
+ the full documentation (config file, MCP tools, CLI flags).
33
+
34
+ ## Platform packages
35
+
36
+ The main package is a thin launcher; the native binary ships in one of five
37
+ platform packages selected automatically at install time:
38
+
39
+ | Package | Platform |
40
+ | --- | --- |
41
+ | `minecraft-mcp-rs-windows-x64` | Windows x64 |
42
+ | `minecraft-mcp-rs-windows-arm64` | Windows arm64 |
43
+ | `minecraft-mcp-rs-darwin-arm64` | macOS arm64 |
44
+ | `minecraft-mcp-rs-linux-x64` | Linux x64 |
45
+ | `minecraft-mcp-rs-linux-arm64` | Linux arm64 |
46
+
47
+ Installing with `--omit=optional` breaks the launcher; reinstall the matching
48
+ platform package explicitly to fix it.
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // minecraft-mcp-rs — platform-package launcher shim.
5
+ //
6
+ // The main npm package is platform-independent; the actual native binary
7
+ // lives in one of five optional platform packages (see `optionalDependencies`
8
+ // in package.json). This shim resolves the platform package for the current
9
+ // process.platform/process.arch, locates the binary inside it, and execs it,
10
+ // forwarding all CLI arguments.
11
+ //
12
+ // If the platform package is missing (e.g. the user installed with
13
+ // `--omit=optional` or on an unsupported platform), we print a helpful error
14
+ // and exit 1 instead of crashing with an unhelpful stack trace.
15
+
16
+ const { spawnSync } = require("node:child_process");
17
+
18
+ // Map of `${process.platform}-${process.arch}` to [packageName, binaryName].
19
+ // The binary names match what the CI npm-publish job stages into each
20
+ // platform package (see .github/workflows/release.yml).
21
+ const PLATFORMS = {
22
+ "win32-x64": ["@minecraft-mcp-rs/minecraft-mcp-rs-windows-x64", "minecraft-mcp-rs.exe"],
23
+ "win32-arm64": ["@minecraft-mcp-rs/minecraft-mcp-rs-windows-arm64", "minecraft-mcp-rs.exe"],
24
+ "darwin-arm64": ["@minecraft-mcp-rs/minecraft-mcp-rs-darwin-arm64", "minecraft-mcp-rs"],
25
+ "linux-x64": ["@minecraft-mcp-rs/minecraft-mcp-rs-linux-x64", "minecraft-mcp-rs"],
26
+ "linux-arm64": ["@minecraft-mcp-rs/minecraft-mcp-rs-linux-arm64", "minecraft-mcp-rs"],
27
+ };
28
+
29
+ const platformKey = `${process.platform}-${process.arch}`;
30
+ const entry = PLATFORMS[platformKey];
31
+
32
+ if (!entry) {
33
+ console.error(
34
+ `minecraft-mcp-rs does not support ${process.platform} (${process.arch}).\n` +
35
+ `Supported platforms: ${Object.keys(PLATFORMS).join(", ")}.`
36
+ );
37
+ process.exit(1);
38
+ }
39
+
40
+ const [pkgName, binaryName] = entry;
41
+
42
+ let binPath;
43
+ try {
44
+ // resolve() throws if the platform package is not installed.
45
+ binPath = require.resolve(`${pkgName}/${binaryName}`);
46
+ } catch {
47
+ console.error(
48
+ `The ${pkgName} platform package is missing (expected binary: ${binaryName}).\n` +
49
+ `This usually means npm did not install optional dependencies:\n` +
50
+ ` - did you use \`npm install --omit=optional\`? That breaks the platform packages.\n` +
51
+ ` - reinstall with: npm install ${pkgName}\n` +
52
+ ` - or reinstall the main package with --force to re-fetch optional deps.`
53
+ );
54
+ process.exit(1);
55
+ }
56
+
57
+ const result = spawnSync(binPath, process.argv.slice(2), { stdio: "inherit" });
58
+ process.exit(result.status === null ? 1 : result.status);
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "minecraft-mcp-rs",
3
+ "version": "1.1.1",
4
+ "description": "MCP server that controls a Minecraft bot (azalea) — prebuilt binaries",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/halfoffive/minecraft-mcp-rs.git"
9
+ },
10
+ "homepage": "https://github.com/halfoffive/minecraft-mcp-rs#readme",
11
+ "bin": {
12
+ "minecraft-mcp-rs": "bin/minecraft-mcp-rs.js"
13
+ },
14
+ "files": [
15
+ "bin",
16
+ "README.md",
17
+ "LICENSE"
18
+ ],
19
+ "engines": {
20
+ "node": ">=18"
21
+ },
22
+ "optionalDependencies": {
23
+ "@minecraft-mcp-rs/minecraft-mcp-rs-windows-x64": "1.1.0",
24
+ "@minecraft-mcp-rs/minecraft-mcp-rs-windows-arm64": "1.1.0",
25
+ "@minecraft-mcp-rs/minecraft-mcp-rs-darwin-arm64": "1.1.0",
26
+ "@minecraft-mcp-rs/minecraft-mcp-rs-linux-x64": "1.1.0",
27
+ "@minecraft-mcp-rs/minecraft-mcp-rs-linux-arm64": "1.1.0"
28
+ }
29
+ }