@strand-ai/lambda-mcp 0.3.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.
- package/lib/index.d.ts +2 -0
- package/lib/index.js +34 -0
- package/package.json +40 -0
- package/src/index.ts +39 -0
- package/tsconfig.json +16 -0
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
/**
|
|
6
|
+
* Returns the executable path which is located inside `node_modules`
|
|
7
|
+
* The naming convention is lambda-mcp-${os}-${arch}
|
|
8
|
+
* If the platform is `win32` or `cygwin`, executable will include a `.exe` extension.
|
|
9
|
+
*/
|
|
10
|
+
function getExePath() {
|
|
11
|
+
const arch = process.arch;
|
|
12
|
+
let os = process.platform;
|
|
13
|
+
let extension = "";
|
|
14
|
+
if (["win32", "cygwin"].includes(process.platform)) {
|
|
15
|
+
os = "win32";
|
|
16
|
+
extension = ".exe";
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
return require.resolve(`@strand-ai/lambda-mcp-${os}-${arch}/bin/lambda-mcp${extension}`);
|
|
20
|
+
}
|
|
21
|
+
catch (e) {
|
|
22
|
+
throw new Error(`Couldn't find lambda-mcp binary for ${os}-${arch}. ` +
|
|
23
|
+
`Please report this issue at https://github.com/Strand-AI/lambda-cli/issues`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Runs lambda-mcp with the given arguments
|
|
28
|
+
*/
|
|
29
|
+
function run() {
|
|
30
|
+
const args = process.argv.slice(2);
|
|
31
|
+
const result = (0, child_process_1.spawnSync)(getExePath(), args, { stdio: "inherit" });
|
|
32
|
+
process.exit(result.status ?? 0);
|
|
33
|
+
}
|
|
34
|
+
run();
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@strand-ai/lambda-mcp",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "MCP server for Lambda Labs cloud GPU instances",
|
|
5
|
+
"bin": "lib/index.js",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"prepublishOnly": "npm run build"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"mcp",
|
|
14
|
+
"model-context-protocol",
|
|
15
|
+
"lambda-labs",
|
|
16
|
+
"gpu",
|
|
17
|
+
"cloud",
|
|
18
|
+
"ai",
|
|
19
|
+
"claude"
|
|
20
|
+
],
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/Strand-AI/lambda-cli"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/Strand-AI/lambda-cli#readme",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/Strand-AI/lambda-cli/issues"
|
|
28
|
+
},
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "^20.0.0",
|
|
32
|
+
"typescript": "^5.0.0"
|
|
33
|
+
},
|
|
34
|
+
"optionalDependencies": {
|
|
35
|
+
"@strand-ai/lambda-mcp-linux-x64": "0.3.0",
|
|
36
|
+
"@strand-ai/lambda-mcp-darwin-x64": "0.3.0",
|
|
37
|
+
"@strand-ai/lambda-mcp-darwin-arm64": "0.3.0",
|
|
38
|
+
"@strand-ai/lambda-mcp-win32-x64": "0.3.0"
|
|
39
|
+
}
|
|
40
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawnSync } from "child_process";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the executable path which is located inside `node_modules`
|
|
7
|
+
* The naming convention is lambda-mcp-${os}-${arch}
|
|
8
|
+
* If the platform is `win32` or `cygwin`, executable will include a `.exe` extension.
|
|
9
|
+
*/
|
|
10
|
+
function getExePath(): string {
|
|
11
|
+
const arch = process.arch;
|
|
12
|
+
let os = process.platform as string;
|
|
13
|
+
let extension = "";
|
|
14
|
+
|
|
15
|
+
if (["win32", "cygwin"].includes(process.platform)) {
|
|
16
|
+
os = "win32";
|
|
17
|
+
extension = ".exe";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
return require.resolve(`@strand-ai/lambda-mcp-${os}-${arch}/bin/lambda-mcp${extension}`);
|
|
22
|
+
} catch (e) {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`Couldn't find lambda-mcp binary for ${os}-${arch}. ` +
|
|
25
|
+
`Please report this issue at https://github.com/Strand-AI/lambda-cli/issues`
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Runs lambda-mcp with the given arguments
|
|
32
|
+
*/
|
|
33
|
+
function run(): void {
|
|
34
|
+
const args = process.argv.slice(2);
|
|
35
|
+
const result = spawnSync(getExePath(), args, { stdio: "inherit" });
|
|
36
|
+
process.exit(result.status ?? 0);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
run();
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2020"],
|
|
6
|
+
"outDir": "./lib",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"declaration": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src/**/*"],
|
|
15
|
+
"exclude": ["node_modules", "lib"]
|
|
16
|
+
}
|