Repository navigation
Description
Context
This is the replacement/follow-up issue for:
- Original request: Expose People/contact cleanup tools in hosted MCP #8204
- Draft implementation PR: feat(mcp): add people cleanup tools #8346
- Canonical memory rollout integration branch on the fork: feat(memory): canonical memory domain rollout (store, writes, desktop, backfill) Git-on-my-level/omi#33
The old request is still valid: MCP clients can read People/contact records via get_people, but they cannot clean up false positives, duplicates, or incorrect display names through MCP-only workflows.
However, the draft PR grew into a broader mix of People cleanup tools, MCP API-key scope semantics, REST/SSE scope enforcement, and compatibility handling. That makes it the wrong PR shape to merge before the canonical memory domain rollout lands upstream.
Follow-up timing
Do this after the canonical memory rollout from fork PR Git-on-my-level#33 has been decomposed/merged upstream, or after the relevant MCP memory/auth foundation from that branch is available on upstream main.
The follow-up should be based on upstream main after that landing, not on the older #8346 branch.
Goal
Expose a safe, scoped MCP surface for People/entity cleanup so trusted clients can:
- List People/contact/entity records.
- Correct display names.
- Dismiss/archive false-positive records.
- Eventually merge duplicates or perform hard deletion only when the backend/product semantics support it safely.
Lessons learned from #8346
1. Keep the PR narrow
Do not combine all of these in one upstream PR:
- new People mutation tools
- API-key scope schema changes
- REST route scope enforcement
- SSE tool scope enforcement
- legacy key compatibility migration
- hard-delete data cleanup semantics
That made #8346 hard to review and generated many rounds of legitimate feedback. The next PR should assume the canonical/auth foundation already exists, or split foundation changes first.
2. Do not duplicate MCP scope/auth infrastructure from the canonical rollout
Fork PR #33 already introduces MCP API-key app_id / scopes auth context and converges MCP memory writes onto MemoryService for canonical users.
After that lands, the People cleanup follow-up should reuse the landed auth context and route/tool enforcement patterns instead of reintroducing a separate scope model.
3. Prefer soft cleanup before hard delete
delete_person is too sharp as the first MCP People write primitive. MCP tools are model-controlled, and clients may vary in how well they present human confirmation for destructive calls.
Prefer a safer progression:
rename_person(person_id, name)— non-destructive correction.dismiss_person(person_id)/archive_person(person_id)/mark_person_false_positive(person_id)— soft cleanup, excluded from default People reads.merge_people(source_person_id, target_person_id)— later, once product semantics are clear.delete_person(person_id)— only if hard-delete semantics, cleanup/retry, and authorization are explicitly defined.
4. Treat destructive capability as opt-in
Do not silently grant destructive People write access to every newly-created MCP key just because it defaults to all scopes.
Recommended policy:
- legacy keys keep their pre-existing behavior;
- new default keys should not automatically gain destructive People cleanup;
people.writeor a narrowerpeople.cleanup/people.deletescope should be explicitly requested/granted;- if separate scopes are available, use
people.renameandpeople.cleanup/people.deleterather than one broad write scope.
5. Scope enforcement must be consistent across transports
If a People cleanup capability is exposed in both MCP SSE/Streamable HTTP tools and REST /v1/mcp/* endpoints, enforce the same scope semantics on both. Avoid drift between advertised securitySchemes and actual runtime checks.
6. tools/list should not encourage unusable destructive calls
For keys that lack the write/cleanup scope, consider filtering unavailable write tools from tools/list or marking them clearly as unavailable. Returning all tools and failing with an insufficient-scope error at call time is compatible, but worse for agent ergonomics.
7. Hard-delete cleanup must be durable if/when implemented
If hard delete remains necessary, avoid fire-and-forget storage cleanup that returns success even if blob cleanup later fails. Prefer one of:
- transactional/awaited cleanup when feasible;
- a durable cleanup job with retry and observable status;
- soft-delete first, then asynchronous hard cleanup with retry/audit.
Proposed follow-up scope after fork PR #33 lands
Start with the smallest safe upstream PR:
- Reuse landed canonical MCP auth context / scope infrastructure.
- Add a scoped non-destructive
rename_persontool. - Add a soft cleanup tool if the backend has or can cheaply add a soft state (
dismiss_person,archive_person, or equivalent). - Do not add hard delete unless product/backend deletion semantics and durable cleanup are in place.
- Add regression tests for:
- descriptor metadata and annotations;
- scope enforcement for allowed and disallowed keys;
- legacy key behavior;
- REST/SSE parity if both surfaces expose the feature;
- no transcript/sample leakage from write-only responses;
- soft-dismiss exclusion from default
get_peoplereads.
Acceptance criteria
- Implementation is based on upstream
mainafter the canonical memory/auth foundation lands. - People cleanup tools reuse the landed MCP auth/scope context instead of creating parallel scope infrastructure.
- Non-destructive rename is supported via MCP.
- False-positive cleanup is soft by default, or hard delete is explicitly justified with durable cleanup semantics.
- Destructive cleanup is not granted to legacy keys or default new keys without explicit opt-in.
- Scope enforcement is consistent across MCP transports/routes.
-
tools/listbehavior is deliberate for keys without cleanup scope. - Tests cover compatibility and security cases from feat(mcp): add people cleanup tools #8346 review feedback.
References
- Expose People/contact cleanup tools in hosted MCP #8204 — original feature request for hosted MCP People/contact cleanup tools.
- feat(mcp): add people cleanup tools #8346 — draft PR that explored implementation and surfaced scope/deletion compatibility lessons.
- feat(memory): canonical memory domain rollout (store, writes, desktop, backfill) Git-on-my-level/omi#33 — canonical memory rollout branch; follow up only after the relevant foundation lands upstream.
Activity
Git-on-my-level commentedon Jul 23, 2026
Blocked on: #10394 (prod MEMORY_MODE still off). Do not start until the master rollout tracker unblocks.
aryanorastar commentedon Aug 6, 2026
VERIFY (2026-08-06): still parked / blocked — not starting a PR.
parkedMEMORY_MODEstill off in prod) — “Do not start until the master rollout tracker unblocks.”main, then a narrow soft-cleanup PR (rename → dismiss/archive before delete), not a revival of feat(mcp): add people cleanup tools #8346.Will revisit only after #10394 / canonical MCP foundation is unblocked.