modelcontextprotocol / modelcontextprotocol/servers

Add lightweight read modes

Open
#3,953 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the existing read_graph, open_nodes, and search_nodes tool definitions and trace how their responses include observations. Define and implement the requested filtering, metadata, limits, and offsets while preserving current defaults, then verify that lightweight and paginated reads return the documented fields and bounded results.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.