@leadbay/mcp 0.17.1 → 0.17.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog — @leadbay/mcp
2
2
 
3
+ ## 0.17.2 — 2026-06-01
4
+
5
+ - **Linux installer fix**: skip Electron when no display is available (`$DISPLAY`/`$WAYLAND_DISPLAY` unset) and go straight to browser fallback — eliminates the double GUI URL on headless Linux terminals.
6
+ - **Browser open fallbacks**: on Linux, try `xdg-open` → `sensible-browser` → `google-chrome` → `chromium-browser` → `firefox` in order. If all fail, print a clear "Open this URL in your browser" message instead of silently doing nothing.
7
+ - **GitHub release notes**: release body now contains the actual CHANGELOG section for the version instead of "see CHANGELOG.md".
8
+
3
9
  ## 0.17.1 — 2026-06-01
4
10
 
5
11
  - **Publish fix**: the `installer` npm bin (`npx -y -p @leadbay/mcp@latest installer`) was missing from the 0.17.0 tarball because the package was published before the installer wizard merged. This patch re-publishes with the correct bin entries.
package/dist/bin.js CHANGED
@@ -21795,7 +21795,7 @@ function buildClaudeCodeAddArgs(token, region, includeWrite, telemetryEnabled, l
21795
21795
  if (localBinPath) {
21796
21796
  args.push("--", "node", localBinPath);
21797
21797
  } else {
21798
- args.push("--", "npx", "-y", "@leadbay/mcp@latest");
21798
+ args.push("--", "npx", "-y", "-p", "@leadbay/mcp@latest", "leadbay-mcp");
21799
21799
  }
21800
21800
  return args;
21801
21801
  }
@@ -21875,7 +21875,7 @@ async function installInJsonConfig(configPath, token, region, includeWrite, tele
21875
21875
  LEADBAY_TELEMETRY_ENABLED: telemetryEnabled ? "true" : "false"
21876
21876
  };
21877
21877
  if (!includeWrite) env.LEADBAY_MCP_WRITE = "0";
21878
- parsed.mcpServers.leadbay = localBinPath ? { command: "node", args: [localBinPath], env } : { command: "npx", args: ["-y", "@leadbay/mcp@latest"], env };
21878
+ parsed.mcpServers.leadbay = localBinPath ? { command: "node", args: [localBinPath], env } : { command: "npx", args: ["-y", "-p", "@leadbay/mcp@latest", "leadbay-mcp"], env };
21879
21879
  const tmp = configPath + ".tmp";
21880
21880
  writeFileSync(tmp, JSON.stringify(parsed, null, 2) + "\n", "utf8");
21881
21881
  const { renameSync, chmodSync } = await import("fs");
@@ -22871,7 +22871,7 @@ var OAUTH_BASE_URLS = {
22871
22871
  fr: "https://staging.api.leadbay.app"
22872
22872
  }
22873
22873
  };
22874
- var VERSION = "0.17.1";
22874
+ var VERSION = "0.17.2";
22875
22875
  var HELP = `
22876
22876
  leadbay-mcp ${VERSION} \u2014 Leadbay Model Context Protocol server
22877
22877
 
@@ -22927,7 +22927,7 @@ EXAMPLE Claude Desktop config (~/Library/Application Support/Claude/claude_deskt
22927
22927
  "mcpServers": {
22928
22928
  "leadbay": {
22929
22929
  "command": "npx",
22930
- "args": ["-y", "@leadbay/mcp@latest"],
22930
+ "args": ["-y", "-p", "@leadbay/mcp@latest", "leadbay-mcp"],
22931
22931
  "env": {
22932
22932
  "LEADBAY_TOKEN": "lb_...",
22933
22933
  "LEADBAY_REGION": "us",
@@ -23413,7 +23413,7 @@ async function runLogin(args) {
23413
23413
  mcpServers: {
23414
23414
  leadbay: {
23415
23415
  command: "npx",
23416
- args: ["-y", "@leadbay/mcp@latest"],
23416
+ args: ["-y", "-p", "@leadbay/mcp@latest", "leadbay-mcp"],
23417
23417
  env: envBlock
23418
23418
  }
23419
23419
  }
@@ -19837,7 +19837,7 @@ function parseWriteEnv(env = process.env) {
19837
19837
  }
19838
19838
 
19839
19839
  // src/http-server.ts
19840
- var VERSION = true ? "0.17.1" : "0.0.0-dev";
19840
+ var VERSION = true ? "0.17.2" : "0.0.0-dev";
19841
19841
  var PORT = Number(process.env.PORT ?? 8080);
19842
19842
  var HOST = process.env.HOST ?? "0.0.0.0";
19843
19843
  var sseSessions = /* @__PURE__ */ new Map();
@@ -29,7 +29,7 @@ function buildClaudeCodeAddArgs(token, region, includeWrite, telemetryEnabled, l
29
29
  if (localBinPath) {
30
30
  args.push("--", "node", localBinPath);
31
31
  } else {
32
- args.push("--", "npx", "-y", "@leadbay/mcp@latest");
32
+ args.push("--", "npx", "-y", "-p", "@leadbay/mcp@latest", "leadbay-mcp");
33
33
  }
34
34
  return args;
35
35
  }
@@ -114,7 +114,7 @@ async function installInJsonConfig(configPath, token, region, includeWrite, tele
114
114
  LEADBAY_TELEMETRY_ENABLED: telemetryEnabled ? "true" : "false"
115
115
  };
116
116
  if (!includeWrite) env.LEADBAY_MCP_WRITE = "0";
117
- parsed.mcpServers.leadbay = localBinPath ? { command: "node", args: [localBinPath], env } : { command: "npx", args: ["-y", "@leadbay/mcp@latest"], env };
117
+ parsed.mcpServers.leadbay = localBinPath ? { command: "node", args: [localBinPath], env } : { command: "npx", args: ["-y", "-p", "@leadbay/mcp@latest", "leadbay-mcp"], env };
118
118
  const tmp = configPath + ".tmp";
119
119
  writeFileSync(tmp, JSON.stringify(parsed, null, 2) + "\n", "utf8");
120
120
  const { renameSync, chmodSync } = await import("fs");
@@ -1336,10 +1336,33 @@ function pageHtml() {
1336
1336
  }
1337
1337
  async function openBrowser(url) {
1338
1338
  const { spawn: spawn5 } = await import("child_process");
1339
- const command = process.platform === "darwin" ? "open" : process.platform === "win32" ? "cmd" : "xdg-open";
1340
- const args = process.platform === "win32" ? ["/c", "start", "", url] : [url];
1341
- const child = spawn5(command, args, { stdio: "ignore", detached: true });
1342
- child.unref();
1339
+ const trySpawn = (command, args) => new Promise((resolve2) => {
1340
+ try {
1341
+ const child = spawn5(command, args, { stdio: "ignore", detached: true });
1342
+ child.unref();
1343
+ child.on("error", () => resolve2(false));
1344
+ child.on("close", (code) => resolve2(code === 0));
1345
+ } catch {
1346
+ resolve2(false);
1347
+ }
1348
+ });
1349
+ if (process.platform === "darwin") {
1350
+ await trySpawn("open", [url]);
1351
+ return;
1352
+ }
1353
+ if (process.platform === "win32") {
1354
+ await trySpawn("cmd", ["/c", "start", "", url]);
1355
+ return;
1356
+ }
1357
+ const candidates = ["xdg-open", "sensible-browser", "google-chrome", "chromium-browser", "firefox"];
1358
+ for (const cmd of candidates) {
1359
+ if (await trySpawn(cmd, [url])) return;
1360
+ }
1361
+ process.stderr.write(`
1362
+ Open this URL in your browser to continue:
1363
+ ${url}
1364
+
1365
+ `);
1343
1366
  }
1344
1367
  async function startInstallerGui(options = {}) {
1345
1368
  let expectedHost = `127.0.0.1:${(options.port ?? PORT) || 0}`;
@@ -1459,7 +1482,7 @@ var init_installer_gui = __esm({
1459
1482
  init_install_dxt();
1460
1483
  init_install_shared();
1461
1484
  init_oauth();
1462
- VERSION = "0.17.1";
1485
+ VERSION = "0.17.2";
1463
1486
  PORT = Number(process.env.LEADBAY_INSTALLER_PORT ?? 0);
1464
1487
  sessions = /* @__PURE__ */ new Map();
1465
1488
  OAUTH_BASE_URLS = {
@@ -1512,10 +1535,14 @@ async function runBrowserFallback(args) {
1512
1535
  await startInstallerGui2(opts);
1513
1536
  }
1514
1537
  }
1538
+ function hasDisplay() {
1539
+ if (process.platform !== "linux") return true;
1540
+ return !!(process.env.DISPLAY || process.env.WAYLAND_DISPLAY);
1541
+ }
1515
1542
  async function main2() {
1516
1543
  const args = process.argv.slice(2);
1517
1544
  const mainPath = resolve(dirname(fileURLToPath2(import.meta.url)), "../installer/electron-main.cjs");
1518
- if (!existsSync3(mainPath) || args.includes("--browser")) {
1545
+ if (!existsSync3(mainPath) || args.includes("--browser") || !hasDisplay()) {
1519
1546
  await runBrowserFallback(args);
1520
1547
  return;
1521
1548
  }
@@ -27,7 +27,7 @@ function buildClaudeCodeAddArgs(token, region, includeWrite, telemetryEnabled, l
27
27
  if (localBinPath) {
28
28
  args.push("--", "node", localBinPath);
29
29
  } else {
30
- args.push("--", "npx", "-y", "@leadbay/mcp@latest");
30
+ args.push("--", "npx", "-y", "-p", "@leadbay/mcp@latest", "leadbay-mcp");
31
31
  }
32
32
  return args;
33
33
  }
@@ -107,7 +107,7 @@ async function installInJsonConfig(configPath, token, region, includeWrite, tele
107
107
  LEADBAY_TELEMETRY_ENABLED: telemetryEnabled ? "true" : "false"
108
108
  };
109
109
  if (!includeWrite) env.LEADBAY_MCP_WRITE = "0";
110
- parsed.mcpServers.leadbay = localBinPath ? { command: "node", args: [localBinPath], env } : { command: "npx", args: ["-y", "@leadbay/mcp@latest"], env };
110
+ parsed.mcpServers.leadbay = localBinPath ? { command: "node", args: [localBinPath], env } : { command: "npx", args: ["-y", "-p", "@leadbay/mcp@latest", "leadbay-mcp"], env };
111
111
  const tmp = configPath + ".tmp";
112
112
  writeFileSync(tmp, JSON.stringify(parsed, null, 2) + "\n", "utf8");
113
113
  const { renameSync, chmodSync } = await import("fs");
@@ -874,7 +874,7 @@ async function oauthLogin(opts) {
874
874
  }
875
875
 
876
876
  // installer/installer-gui.ts
877
- var VERSION = "0.17.1";
877
+ var VERSION = "0.17.2";
878
878
  var PORT = Number(process.env.LEADBAY_INSTALLER_PORT ?? 0);
879
879
  var sessions = /* @__PURE__ */ new Map();
880
880
  var OAUTH_BASE_URLS = {
@@ -1310,10 +1310,33 @@ function pageHtml() {
1310
1310
  }
1311
1311
  async function openBrowser(url) {
1312
1312
  const { spawn: spawn4 } = await import("child_process");
1313
- const command = process.platform === "darwin" ? "open" : process.platform === "win32" ? "cmd" : "xdg-open";
1314
- const args = process.platform === "win32" ? ["/c", "start", "", url] : [url];
1315
- const child = spawn4(command, args, { stdio: "ignore", detached: true });
1316
- child.unref();
1313
+ const trySpawn = (command, args) => new Promise((resolve) => {
1314
+ try {
1315
+ const child = spawn4(command, args, { stdio: "ignore", detached: true });
1316
+ child.unref();
1317
+ child.on("error", () => resolve(false));
1318
+ child.on("close", (code) => resolve(code === 0));
1319
+ } catch {
1320
+ resolve(false);
1321
+ }
1322
+ });
1323
+ if (process.platform === "darwin") {
1324
+ await trySpawn("open", [url]);
1325
+ return;
1326
+ }
1327
+ if (process.platform === "win32") {
1328
+ await trySpawn("cmd", ["/c", "start", "", url]);
1329
+ return;
1330
+ }
1331
+ const candidates = ["xdg-open", "sensible-browser", "google-chrome", "chromium-browser", "firefox"];
1332
+ for (const cmd of candidates) {
1333
+ if (await trySpawn(cmd, [url])) return;
1334
+ }
1335
+ process.stderr.write(`
1336
+ Open this URL in your browser to continue:
1337
+ ${url}
1338
+
1339
+ `);
1317
1340
  }
1318
1341
  async function startInstallerGui(options = {}) {
1319
1342
  let expectedHost = `127.0.0.1:${(options.port ?? PORT) || 0}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leadbay/mcp",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
4
  "mcpName": "io.github.leadbay/leadbay-mcp",
5
5
  "description": "Model Context Protocol (MCP) server for Leadbay — AI lead discovery, qualification, and enrichment for Claude Desktop, Cursor, and Claude Code.",
6
6
  "type": "module",