[GH-ISSUE #190] uninstall: npx MCP registration ownership check rejects setup-owned args layout #136

Closed
opened 2026-10-15 18:21:31 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @morluto on GitHub (Jul 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/190

Summary

runUninstall() can fail to remove a default npx MCP registration because ownership detection in isOwnedRegistration() expects npx registrations to have args.length === 1, while setup writes npx -y <package> mcp.

Reproduction

  1. Configure a client with REA’s default registration:
    • command: "npx"
    • args: ["-y", "rea-agents", "mcp"]
  2. Run runUninstall() (or rea uninstall).
  3. Observe uninstall status for that client.

Expected

The REA rea registration should be considered owned and removed, matching configureJsonClient/configureTomlClient behavior.

Actual

isOwnedRegistration only accepts:

  • command === "npx" && args.length === 1 && args[0] === "mcp"
    so the default npx registration does not match and is retained as non-REA-owned.

Why this matters

Uninstall leaves an actionable MCP registration behind in common install modes, requiring manual cleanup.

Evidence

  • src/application/Setup.ts default client command: command = ["npx", "-y", PRODUCT_IDENTITY.packageName, "mcp"]
  • src/application/Uninstall.ts has ownership gate around lines 198-204 requiring only one npx argument and value mcp.
Originally created by @morluto on GitHub (Jul 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/190 ### Summary `runUninstall()` can fail to remove a default `npx` MCP registration because ownership detection in `isOwnedRegistration()` expects `npx` registrations to have `args.length === 1`, while setup writes `npx -y <package> mcp`. ### Reproduction 1. Configure a client with REA’s default registration: - `command: "npx"` - `args: ["-y", "rea-agents", "mcp"]` 2. Run `runUninstall()` (or `rea uninstall`). 3. Observe uninstall status for that client. ### Expected The REA `rea` registration should be considered owned and removed, matching `configureJsonClient`/`configureTomlClient` behavior. ### Actual `isOwnedRegistration` only accepts: - `command === "npx" && args.length === 1 && args[0] === "mcp"` so the default npx registration does not match and is retained as non-REA-owned. ### Why this matters Uninstall leaves an actionable MCP registration behind in common install modes, requiring manual cleanup. ### Evidence - `src/application/Setup.ts` default client command: `command = ["npx", "-y", PRODUCT_IDENTITY.packageName, "mcp"]` - `src/application/Uninstall.ts` has ownership gate around lines 198-204 requiring only one `npx` argument and value `mcp`.
bsakaguchi 2026-10-15 18:21:31 +00:00
Author
Owner

@N0zoM1z0 commented on GitHub (Jul 14, 2026):

Triage on current main (6a3fd5b): this report is not reproducible. Since e651cb6, isOwnedRegistration() has matched the setup-owned npx layout exactly as ["-y", PRODUCT_IDENTITY.packageName, "mcp"]. The uninstall lifecycle coverage passes in the full suite.

<!-- gh-comment-id:4966821814 --> @N0zoM1z0 commented on GitHub (Jul 14, 2026): Triage on current `main` (`6a3fd5b`): this report is not reproducible. Since `e651cb6`, `isOwnedRegistration()` has matched the setup-owned npx layout exactly as `["-y", PRODUCT_IDENTITY.packageName, "mcp"]`. The uninstall lifecycle coverage passes in the full suite.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#136
No description provided.