Skip to content

Add lightweight read modes #3953

Closed

Description

@surapuramakhil

Is your feature request related to a problem? Please describe.
The Memory MCP server's read_graph tool returns ALL entities with ALL observations in a single response. Over time, as observations accumulate (weeks/months of usage), this creates critical scalability issues:

  1. Context Explosion: A single memory_read_graph call can consume 50k-80k+ tokens, overwhelming the model's working context. After 6 weeks of daily usage, my graph has 150 entities with 800+ observations.
  2. No Progressive Loading: There's no way to fetch entity names first, then selectively load observations. Even simple status checks like "what applications are queued?" require loading the entire graph.
  3. Observation Bloat: No built-in mechanism exists to split, archive, or reorganize oversized observations into new entities. Users must manually edit memory.jsonl files or lose historical data.
  4. Forced All-or-Nothing Reads: Current tools (read_graph, open_nodes, search_nodes) all return full observations with no pagination, filtering, or metadata-only modes.

This is a scalability blocker for long-running MCP memory server deployments. Without these features, users must either:

  • Manually prune memory.jsonl files (losing historical data)
  • Reset graphs frequently (losing context continuity)
  • Accept degraded model performance as graphs grow

Describe the solution you'd like
A clear and concise description of what you want to happen.

  1. Lightweight Read Modes (Enhance Existing Tools)
    Add optional parameters to existing tools:
// ENHANCED: read_graph with options
read_graph(options?: {
  includeObservations?: boolean,  // default: true
  observationLimit?: number,      // max observations per entity
  entityTypes?: string[],         // filter by entity types
  metadataOnly?: boolean          // return only name + entityType + observationCount
})

// ENHANCED: open_nodes with options
open_nodes(names: string[], options?: {
  includeObservations?: boolean,  // default: true
  observationLimit?: number,      // paginate observations
  observationOffset?: number      // for pagination
})

// ENHANCED: search_nodes with options
search_nodes(query: string, options?: {
  includeObservations?: boolean,  // default: true
  limit?: number,                 // max entities to return
  observationLimit?: number       // max observations per entity
})

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Activity

  1. added 2 commits that reference this issue on Apr 16, 2026
    874d019
    df40bf7
  2. added
    server-memoryReference implementation for the Memory MCP server - src/memory
    on Oct 19, 2026
  3. cliffhall commented on Oct 19, 2026

    @cliffhall
    Member

    Triage: Priority Low (total 5)

    • Severity 3: Optional lightweight or limited reads for read_graph, open_nodes and search_nodes are a reasonable usability improvement for large graphs.
    • Urgency 2: wanted eventually
    • Bonuses: none

    Board: Servers V2 (#43), Status Incoming, awaiting maintainer review (no milestone yet). Part of the backlog triage in #4875.

  4. cliffhall commented on Oct 20, 2026

    @cliffhall
    Member

    Prior work, from the PR backlog triage (#4877). These outside pull requests addressed this issue against the pre-refactor code:

    They are being closed as part of the backlog triage in #4875, since the repository now takes issues rather than outside PRs and their diffs predate the v2 refactor. They stay readable and serve as prototypes for the fix here. Thank you to their authors.

  5. added this to the v2.3.0 milestone on Oct 25, 2026
  6. self-assigned this
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestserver-memoryReference implementation for the Memory MCP server - src/memoryv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions