starlark-mcp 0.0.4

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 (3) hide show
  1. package/README.md +43 -0
  2. package/lib/index.js +25 -0
  3. package/package.json +41 -0
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # starlark-mcp
2
+
3
+ A Model Context Protocol (MCP) server that runs Starlark extensions.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g starlark-mcp
9
+ ```
10
+
11
+ Or run directly with npx:
12
+
13
+ ```bash
14
+ npx starlark-mcp
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```bash
20
+ # Run the MCP server (default, loads extensions from ./extensions)
21
+ starlark-mcp
22
+
23
+ # Run with a custom extensions directory
24
+ starlark-mcp -e /path/to/extensions
25
+
26
+ # Print version
27
+ starlark-mcp --version
28
+
29
+ # Run tests from extensions directory
30
+ starlark-mcp --test
31
+ ```
32
+
33
+ ## Supported Platforms
34
+
35
+ - Linux x64 (glibc)
36
+ - Linux ARM64 (musl)
37
+ - macOS x64
38
+ - macOS ARM64 (Apple Silicon)
39
+ - Windows x64
40
+
41
+ ## License
42
+
43
+ MIT
package/lib/index.js ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const child_process_1 = require("child_process");
5
+ const path_1 = require("path");
6
+ const isWindows = process.platform === "win32";
7
+ const os = isWindows ? "windows" : process.platform;
8
+ const ext = isWindows ? ".exe" : "";
9
+ const pkg = `@connyay/starlark-mcp-${os}-${process.arch}`;
10
+ let binaryPath;
11
+ try {
12
+ const pkgPath = require.resolve(`${pkg}/package.json`);
13
+ binaryPath = (0, path_1.join)(pkgPath, "..", "bin", `starlark-mcp${ext}`);
14
+ }
15
+ catch {
16
+ console.error(`Unsupported platform: ${os}-${process.arch}\n` +
17
+ `Supported: linux-x64, linux-arm64, darwin-x64, darwin-arm64, windows-x64`);
18
+ process.exit(1);
19
+ }
20
+ const result = (0, child_process_1.spawnSync)(binaryPath, process.argv.slice(2), { stdio: "inherit" });
21
+ if (result.error) {
22
+ console.error(`Failed to execute starlark-mcp: ${result.error.message}`);
23
+ process.exit(1);
24
+ }
25
+ process.exit(result.status ?? 1);
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "starlark-mcp",
3
+ "version": "0.0.4",
4
+ "description": "A Model Context Protocol (MCP) server that runs Starlark extensions",
5
+ "keywords": [
6
+ "mcp",
7
+ "starlark",
8
+ "model-context-protocol",
9
+ "ai",
10
+ "llm",
11
+ "extensions"
12
+ ],
13
+ "homepage": "https://github.com/connyay/starlark-mcp",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/connyay/starlark-mcp.git"
17
+ },
18
+ "license": "MIT",
19
+ "bin": {
20
+ "starlark-mcp": "lib/index.js"
21
+ },
22
+ "main": "lib/index.js",
23
+ "files": [
24
+ "lib"
25
+ ],
26
+ "scripts": {
27
+ "build": "tsc",
28
+ "prepublishOnly": "npm run build"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "^20.0.0",
32
+ "typescript": "^5.3.0"
33
+ },
34
+ "optionalDependencies": {
35
+ "@connyay/starlark-mcp-linux-x64": "0.0.4",
36
+ "@connyay/starlark-mcp-linux-arm64": "0.0.4",
37
+ "@connyay/starlark-mcp-darwin-x64": "0.0.4",
38
+ "@connyay/starlark-mcp-darwin-arm64": "0.0.4",
39
+ "@connyay/starlark-mcp-windows-x64": "0.0.4"
40
+ }
41
+ }