Skip to content

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

Closed
SiddheshCodes4554 wants to merge 2 commits into
supermemoryai:mainfrom
SiddheshCodes4554:feat/mcp-privacy-receipts
Closed

feat(mcp): add privacy-safe recall receipts#1053
SiddheshCodes4554 wants to merge 2 commits into
supermemoryai:mainfrom
SiddheshCodes4554:feat/mcp-privacy-receipts

Conversation

@SiddheshCodes4554

Copy link
Copy Markdown
Contributor

This PR adds an optional, privacy-safe receipt mechanism for MCP recall operations so users can debug cross-client memory behavior without exposing raw memory content, prompts, or repository text.

Why

In multi-client workflows (Cursor, Claude Code, VS Code, etc.), debugging failures like:

  • “memory wasn’t recalled”
  • “wrong project context was retrieved”
  • “search worked but context wasn’t loaded”

currently requires sharing sensitive raw content.

What’s Included

  • Added a new receipt helper module for:
    receipt shape/type
  • SHA-256-based privacy hashing (with optional salt)
  • similarity score bucketing
  • standardized receipt log formatting
  • Wired receipt generation into recall flow (both profile and non-profile paths)
  • Added optional server-side receipt logging via env flags
  • Documented receipt behavior and configuration in MCP README

@ishaanxgupta ishaanxgupta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The receipt hashing is deterministic when RECEIPT_HASH_SALT is unset because privacyHash() defaults to salt = "" and hashes ${salt}:${input} with plain SHA-256. That means raw queries, project ids, memory ids, and short memory contents can be dictionary-guessed and correlated across receipts, which contradicts the “privacy-safe” behavior described in the PR. Please either require a secret salt and fail/disable receipts without it, or use a per-receipt random HMAC salt that is not emitted so receipts are unlinkable by default.

@MaheshtheDev

Copy link
Copy Markdown
Member

not planned as of now

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.

3 participants