Skip to content

fix(mcp,core,dxt): #3504 DXT install warning, 401 message, .dxt bundle (0.2.4)#18

Merged
milstan merged 1 commit intomainfrom
milstan/mcp-dxt-ludo-fixes
Apr 22, 2026
Merged

fix(mcp,core,dxt): #3504 DXT install warning, 401 message, .dxt bundle (0.2.4)#18
milstan merged 1 commit intomainfrom
milstan/mcp-dxt-ludo-fixes

Conversation

@milstan
Copy link
Copy Markdown
Contributor

@milstan milstan commented Apr 22, 2026

Summary

Follow-up to @LudoGranger's 2026-04-22 handoff on @leadbay/mcp@0.2.2. Addresses three client-side items from product#3504 and reships the already-merged refine_prompt fix (product#3508) that never made it to npm.

  • DXT detection in install — Claude Desktop 2026 moved to the DXT extension system; the legacy claude_desktop_config.json is UI-prefs-only there and gets rewritten on every prefs save. install now detects DXT (via Claude Extensions/, extensions-installations.json, or dxt:* keys in config.json), prints a warning, and default-skips the legacy write. Pass --force-legacy to override.
  • New .dxt bundlepackages/dxt/ is a private workspace that esbuild-bundles bin.ts + a DXT 0.2 manifest (user_config with sensitive leadbay_token, us|fr region enum, write-toggle) and zips it. CI uploads it to each GitHub Release so users can drag-drop into Claude Desktop → Settings → Extensions.
  • Clearer 401 login error — new formatLoginError helper in @leadbay/core adds status-appropriate hints; empty-body 401s no longer end with a dangling colon. Shared with @leadbay/mcp so CLI + ClawHub surfaces stay consistent.
  • README — section on npm install -g EACCES (sudo / npx / nvm workarounds) and pointer to the .dxt install for Claude Desktop 2026.
  • Also shipping (merged to main in 307d97a but not yet published) — refine_prompt / set_user_prompt now send { user_prompt } instead of { prompt } to POST /user_prompt (product#3508).

Version bumps: @leadbay/mcp 0.2.3 → 0.2.4, @leadbay/leadclaw 0.2.3 → 0.2.4. On merge, auto-tag.yml pushes both release tags; release.yml publishes to npm and uploads the .dxt to the GH Release.

Out of scope: Bug A from Ludo's session (leadbay_adjust_audience 500: Cannot read properties of undefined (reading 'toLowerCase')) is a server-side taxonomy-resolution bug — tracked separately in the backend repo.

Test plan

Automated (green locally):

  • 8 new unit tests for formatLoginError (401/429/5xx + empty-body behavior).
  • 9 new unit tests for detectClaudeDesktopMode (legacy / DXT / both / malformed).
  • 5 new smoke tests for the .dxt archive (manifest shape, entry point presence, sensitive: true on token, region enum).
  • All 144 existing tests still pass (pnpm -r test).
  • pnpm -r build + pnpm -r typecheck both green.
  • npx-shim smoke test (product#3504 regression guard from 0.2.2) still passes.

Manual on this Mac (Claude Desktop 2026 DXT):

  • node dist/bin.js --version0.2.4.
  • LEADBAY_PASSWORD=<bad> leadbay-mcp install --email milstan@leadbay.ai --region fr --target claude-desktop prints DXT warning with detected markers AND the new (wrong email or password?) 401 message, with no dangling colon.
  • .dxt bundle produced (1.4 MB), contains manifest.json, server/index.js, icon.png, README.md.
  • Built bundle contains user_prompt wire key (product#3508 fix baked in).

Post-publish verification (after merge):

  • npx -y @leadbay/mcp@0.2.4 install --email <you> --region <us|fr> flows end-to-end.
  • Drag-drop leadbay-0.2.4.dxt into Claude Desktop 2026; user_config dialog asks for token + region + write-toggle; tools load.
  • refine_prompt call via any MCP client succeeds (no JSON deserialization error).

🤖 Generated with Claude Code

…e (0.2.4)

Follow-up to Ludo's 2026-04-22 handoff session on @leadbay/mcp@0.2.2. This
release addresses three client-side items from product#3504 and reships the
already-merged refine_prompt fix (product#3508) that didn't make it to npm.

- `install` now detects Claude Desktop 2026 DXT (via Claude Extensions/,
  extensions-installations.json, or dxt:* keys in config.json) and
  default-skips the legacy claude_desktop_config.json write — the app
  overwrites that file on every prefs save, so our previous "registered"
  message was misleading. Pass --force-legacy to override. The warning
  points at the .dxt bundle.
- New @leadbay/dxt workspace builds a DXT 0.2 bundle (manifest + bundled
  server + icon) and CI uploads it to each GitHub Release. Users can
  drag-drop into Claude Desktop → Settings → Extensions; dialog asks for
  token + region + write-toggle (no terminal).
- `login` 401 errors no longer end with a dangling colon on empty-body
  responses. New shared helper formatLoginError in @leadbay/core adds
  status-appropriate hints (wrong email or password? / rate-limited /
  server error).
- README note on `npm install -g` EACCES (sudo / npx / nvm workarounds).
- Also shipping: refine_prompt / set_user_prompt wire-key fix from 307d97a
  (product#3508) that was merged to main but hasn't been published yet.

Tests: +8 login-error units, +9 dxt-detection units, +5 dxt-package smoke.
All 144 existing tests still green.

Out of scope: the adjust_audience 500 from Ludo's session is a backend
taxonomy-resolution bug; tracked separately.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@milstan milstan merged commit a0b3fef into main Apr 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant