Menu

#95 installer: step 5 (mcp add) fails if MCP entry already exists — blocks reinstall

closed
nobody
None
2026-04-08
2026-04-07
Anonymous
No

Originally created by: kumaakh

Summary

Running apra-fleet-win-x64.exe install --skill fails at step 5 when the MCP server entry already exists in ~/.claude.json. This is the normal state for any user upgrading from a previous version — they always have the entry already registered.

Reproduction

  1. Install apra-fleet once (registers MCP entry).
  2. Download a newer binary.
  3. Run apra-fleet-win-x64.exe install --skill.
  4. Fails at step 5:

    [5/7] Registering MCP server...
    MCP server apra-fleet already exists in user config
    Install failed: Command failed: claude mcp add --scope user apra-fleet -- "C:\Users\akhil.apra-fleet\bin\apra-fleet.exe"

Steps 1–4 complete, step 5 throws, steps 6–7 (skill install) never run. The binary is replaced but skills are not updated.

Workaround

Manually remove the entry before installing:

claude mcp remove apra-fleet --scope user

Then re-run the installer.

Expected behaviour

The installer should be idempotent. If the MCP entry already exists and points to the correct binary, skip silently. If it points to a different path, remove and re-add. Either way, never fail on reinstall — upgrade is the primary use case.

Suggested fix

Before running claude mcp add, check if the entry exists:

  • If yes and path matches → skip, continue to step 6.
  • If yes and path differs → run claude mcp remove then claude mcp add.
  • If no → run claude mcp add as today.

Related

Tickets: #96

Discussion

  • Anonymous

    Anonymous - 2026-04-08

    Originally posted by: kumaakh

    Fixed: installer now runs claude mcp remove before mcp add (src/cli/install.ts:425), making step 5 idempotent on reinstall.

     
  • Anonymous

    Anonymous - 2026-04-08

    Ticket changed by: kumaakh

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB