axi-mcp-proxy 0.0.0

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 (2) hide show
  1. package/bin.js +45 -0
  2. package/package.json +18 -0
package/bin.js ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execFileSync } = require("child_process");
4
+ const path = require("path");
5
+
6
+ const PLATFORMS = {
7
+ "linux-x64": "@axi-mcp-proxy/linux-x64",
8
+ "linux-arm64": "@axi-mcp-proxy/linux-arm64",
9
+ "darwin-x64": "@axi-mcp-proxy/darwin-x64",
10
+ "darwin-arm64": "@axi-mcp-proxy/darwin-arm64",
11
+ "win32-x64": "@axi-mcp-proxy/win32-x64",
12
+ "win32-arm64": "@axi-mcp-proxy/win32-arm64",
13
+ };
14
+
15
+ const platformKey = `${process.platform}-${process.arch}`;
16
+ const pkg = PLATFORMS[platformKey];
17
+
18
+ if (!pkg) {
19
+ console.error(
20
+ `axi-mcp-proxy: unsupported platform ${platformKey}. ` +
21
+ `Supported: ${Object.keys(PLATFORMS).join(", ")}`
22
+ );
23
+ process.exit(1);
24
+ }
25
+
26
+ let binDir;
27
+ try {
28
+ binDir = path.dirname(require.resolve(`${pkg}/package.json`));
29
+ } catch {
30
+ console.error(
31
+ `axi-mcp-proxy: platform package ${pkg} is not installed. ` +
32
+ `If you're on a supported platform, try reinstalling.`
33
+ );
34
+ process.exit(1);
35
+ }
36
+
37
+ const ext = process.platform === "win32" ? ".exe" : "";
38
+ const bin = path.join(binDir, `axi-mcp-proxy${ext}`);
39
+
40
+ try {
41
+ execFileSync(bin, process.argv.slice(2), { stdio: "inherit" });
42
+ } catch (e) {
43
+ if (e.status !== null) process.exit(e.status);
44
+ throw e;
45
+ }
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "axi-mcp-proxy",
3
+ "version": "0.0.0",
4
+ "description": "Composable MCP proxy with Nickel configuration",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "axi-mcp-proxy": "bin.js"
8
+ },
9
+ "files": ["bin.js"],
10
+ "optionalDependencies": {
11
+ "@axi-mcp-proxy/linux-x64": "0.0.0",
12
+ "@axi-mcp-proxy/linux-arm64": "0.0.0",
13
+ "@axi-mcp-proxy/darwin-x64": "0.0.0",
14
+ "@axi-mcp-proxy/darwin-arm64": "0.0.0",
15
+ "@axi-mcp-proxy/win32-x64": "0.0.0",
16
+ "@axi-mcp-proxy/win32-arm64": "0.0.0"
17
+ }
18
+ }