Skip to content

[Feature] Add 'listMemories' tool to MCP server for enumerating user memories #1030

@fuleinist

Description

@fuleinist

Problem

The current Supermemory MCP server () exposes three tools: memory (save/forget), recall (search), and listProjects. There's no way for an AI agent to enumerate all stored memories — only the top-K results of a recall query, or save/forget one at a time.

This matters for several real workflows:

  • "Show me everything you remember about project X" → today requires guessing the right recall query and hoping nothing gets dropped from the top-K.
  • Auditing what the agent has stored ("list all the preferences you have on file for me").
  • Bulk cleanup of stale or duplicate memories before re-saving.
  • Diffing memories across two container tags.

Proposed

Add a new listMemories tool to apps/mcp/src/server.ts, parallel to recall but returning paged memory records:

{
  "name": "listMemories",
  "description": "Enumerate stored memories. Use this to audit what is on file before a save/forget operation, or to power a 'list everything' view.",
  "inputSchema": {
    "containerTag": "string (optional)",
    "limit": "integer (default 50, max 200)",
    "cursor": "string (optional, opaque pagination token)",
    "sort": "string, one of [created_desc, created_asc, updated_desc] (default created_desc)",
    "filter": "string (optional substring filter against memory content)"
  }
}

Returns:

{
  "memories": [{ "id": "...", "content": "...", "createdAt": "...", "updatedAt": "..." }],
  "nextCursor": "..." 
}

Why it fits

  • Single-file change in apps/mcp/src/server.ts (one server.registerTool("listMemories", ...) block + a thin SupermemoryClient method in client.ts).
  • Reuses the existing containerTag scoping and includeProfile semantics already used by recall.
  • No new dependencies; the underlying search API already supports cursor pagination — just needs a non-query entry point.

Use case

An agent doing a periodic "clean up my memory" task: list all memories, surface the ones the user might want to drop, then call memory with action: "forget" on the chosen IDs. Today this loop is impossible because there's no list step.

Happy to send a PR against main if the maintainers are open to it — would be ~80-150 LOC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions