@rishibhushan/jenkins-mcp-server 1.1.7 → 1.1.8

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/jenkins-mcp.js +32 -2
  2. package/package.json +1 -1
@@ -29,8 +29,38 @@ const pythonPath = path.join(
29
29
  );
30
30
 
31
31
  if (!fs.existsSync(pythonPath)) {
32
- console.error("[jenkins-mcp] ERROR: Python venv not found at:", pythonPath);
33
- process.exit(1);
32
+ console.error("[jenkins-mcp] Python venv not found, bootstrapping...");
33
+
34
+ const bootstrap = spawn("python3", ["-m", "venv", ".venv"], {
35
+ cwd: PACKAGE_ROOT,
36
+ stdio: "inherit",
37
+ });
38
+
39
+ bootstrap.on("exit", (code) => {
40
+ if (code !== 0) {
41
+ console.error("[jenkins-mcp] Failed to create venv");
42
+ process.exit(1);
43
+ }
44
+
45
+ const pip = path.join(PACKAGE_ROOT, ".venv", "bin", "pip");
46
+
47
+ spawn(pip, ["install", "-r", "requirements.txt"], {
48
+ cwd: PACKAGE_ROOT,
49
+ stdio: "inherit",
50
+ }).on("exit", (pipCode) => {
51
+ if (pipCode !== 0) {
52
+ console.error("[jenkins-mcp] Failed to install dependencies");
53
+ process.exit(1);
54
+ }
55
+
56
+ // Re-exec self after bootstrap
57
+ spawn(process.execPath, process.argv.slice(1), {
58
+ stdio: "inherit",
59
+ });
60
+ });
61
+ });
62
+
63
+ return;
34
64
  }
35
65
 
36
66
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rishibhushan/jenkins-mcp-server",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "AI-enabled Jenkins automation via Model Context Protocol (MCP)",
5
5
  "main": "bin/jenkins-mcp.js",
6
6
  "bin": {