hero_auth: users_delete MCP tool does not actually delete users #40

Closed
opened 2026-03-18 20:11:54 +00:00 by mik-tf · 1 comment
Owner

Bug

The users_delete MCP tool on hero_auth returns an empty JSON-RPC result {} but does not actually remove the user from the database.

Steps to reproduce

  1. Create a user via MCP: tools/call with users_add (name: "crudtest", scope: "read")
  2. Verify user exists: tools/call with users_list → shows 2 users
  3. Delete user: tools/call with users_delete (name: "crudtest") → returns {}
  4. List users again: tools/call with users_list → still shows 2 users

Expected

After users_delete, the user should be removed and users_list should show one fewer user.

Verified on

herodev.gent04.grid.tf — tested via direct curl to hero_auth_ui.sock MCP endpoint.

Notes

The MCP transport is working correctly (request reaches backend, response returns). This is a hero_auth service-level bug in the delete handler.

## Bug The `users_delete` MCP tool on hero_auth returns an empty JSON-RPC result `{}` but does not actually remove the user from the database. ## Steps to reproduce 1. Create a user via MCP: `tools/call` with `users_add` (name: "crudtest", scope: "read") 2. Verify user exists: `tools/call` with `users_list` → shows 2 users 3. Delete user: `tools/call` with `users_delete` (name: "crudtest") → returns `{}` 4. List users again: `tools/call` with `users_list` → still shows 2 users ## Expected After `users_delete`, the user should be removed and `users_list` should show one fewer user. ## Verified on herodev.gent04.grid.tf — tested via direct curl to `hero_auth_ui.sock` MCP endpoint. ## Notes The MCP transport is working correctly (request reaches backend, response returns). This is a hero_auth service-level bug in the delete handler.
Author
Owner

Fixed and verified on herodev (2026-03-18)

Root cause: The users_delete MCP/RPC tool required client_id (UUID) but callers naturally passed name. Since args.get("client_id") returned None, it returned an error instead of deleting.

Fix: Both MCP and RPC handlers now accept name OR client_id for user lookup. Updated OpenRPC spec and inline docs.

Verification (CRUD round-trip on herodev):

  1. users_list → 0 users
  2. users_add(name: deltest) → created with UUID
  3. users_delete(name: deltest){"deleted": "deltest"}
  4. users_list → 0 users (confirmed deletion)

Commit (on development):

  • hero_auth 5dd8373 — fix: users_delete now accepts name or client_id

Deployed to herodev.

**Fixed and verified on herodev (2026-03-18)** **Root cause:** The `users_delete` MCP/RPC tool required `client_id` (UUID) but callers naturally passed `name`. Since `args.get("client_id")` returned None, it returned an error instead of deleting. **Fix:** Both MCP and RPC handlers now accept `name` OR `client_id` for user lookup. Updated OpenRPC spec and inline docs. **Verification (CRUD round-trip on herodev):** 1. `users_list` → 0 users 2. `users_add(name: deltest)` → created with UUID 3. `users_delete(name: deltest)` → `{"deleted": "deltest"}` ✅ 4. `users_list` → 0 users (confirmed deletion) ✅ **Commit (on `development`):** - hero_auth `5dd8373` — fix: users_delete now accepts name or client_id Deployed to herodev.
Sign in to join this conversation.
No labels
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
lhumina_code/home#40
No description provided.