@rishibhushan/jenkins-mcp-server 1.1.7 → 1.1.9

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 +36 -2
  2. package/package.json +1 -1
@@ -29,8 +29,42 @@ 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
+ const install = spawn(pip, ["install", "-r", "requirements.txt"], {
48
+ cwd: PACKAGE_ROOT,
49
+ stdio: "inherit",
50
+ });
51
+
52
+ install.on("exit", (pipCode) => {
53
+ if (pipCode !== 0) {
54
+ console.error("[jenkins-mcp] Failed to install dependencies");
55
+ process.exit(1);
56
+ }
57
+
58
+ console.error("[jenkins-mcp] Bootstrap complete, restarting...");
59
+
60
+ spawn(process.execPath, process.argv.slice(1), {
61
+ stdio: "inherit",
62
+ });
63
+ process.exit(0);
64
+ });
65
+ });
66
+
67
+ process.exit(0);
34
68
  }
35
69
 
36
70
  /**
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.9",
4
4
  "description": "AI-enabled Jenkins automation via Model Context Protocol (MCP)",
5
5
  "main": "bin/jenkins-mcp.js",
6
6
  "bin": {