Skip to content

feat(mcp): add privacy-safe recall receipts#1031

Open
cat0825 wants to merge 1 commit into
supermemoryai:mainfrom
cat0825:cat/receipt-retrieval
Open

feat(mcp): add privacy-safe recall receipts#1031
cat0825 wants to merge 1 commit into
supermemoryai:mainfrom
cat0825:cat/receipt-retrieval

Conversation

@cat0825
Copy link
Copy Markdown

@cat0825 cat0825 commented Jun 1, 2026

Summary

Adds an optional includeReceipt flag to the MCP recall tool. When enabled, recall responses include a privacy-safe retrieval receipt in structuredContent.receipt.

The receipt helps users and maintainers debug cross-client memory retrieval without exposing raw memory text, raw queries, project names, transcripts, or private repository content.

Closes #985.

What changed

  • Added includeReceipt to the MCP recall schema.
  • Added createRetrievalReceipt() helper.
  • Receipt includes:
    • hashed query
    • hashed project/container tag
    • hashed result IDs
    • hashed returned memory/chunk content
    • result count / total
    • score buckets
    • latency
    • MCP client name/version when available
    • profile static/dynamic counts when profile recall is used
  • Added tests verifying raw private values are not exposed.

Validation

  • bunx biome check --write apps/mcp/src/server.ts apps/mcp/src/retrieval-receipt.ts apps/mcp/src/retrieval-receipt.test.ts
  • bunx vitest run src/retrieval-receipt.test.ts
  • bun run --cwd apps/mcp build:ui

bun run check-types currently fails on existing unrelated @supermemory/tools type errors.

@graphite-app graphite-app Bot requested a review from Dhravya June 1, 2026 14:23
@MaheshtheDev MaheshtheDev self-requested a review June 1, 2026 17:14
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.

Expose privacy-safe memory retrieval receipts

1 participant