Highlights
One-call memory maintenance — memory_quality(action="maintain")
Agents that want to keep their memory database tidy no longer need to chain memory_cleanup → memory_conflicts → memory_resolve → memory_list(stale_days=…) → memory_quality(action="analyze") by hand. A single call now runs the full hygiene cycle and returns a structured report:
- cleanup — find and remove duplicates
- conflicts — detect contradictions, optionally auto-resolve above threshold
- stale — count memories not accessed in >N days (uses
stale_daysfrom v10.46.0) - quality — snapshot quality score distribution
memory_quality(action="maintain") // dry-run preview (default)
memory_quality(action="maintain", dry_run=false) // actually mutate
memory_quality(action="maintain_status") // last run statsSafe defaults. dry_run=true on first call. Auto-resolve is opt-in (MCP_MAINTAIN_AUTO_RESOLVE=true) and gated by three signals:
- similarity ≥
MCP_MAINTAIN_AUTO_RESOLVE_THRESHOLD(default0.95) - same
memory_type - age delta >
MCP_MAINTAIN_AUTO_RESOLVE_AGE_DAYS(default7)
When all three line up, the memory with the higher created_at wins (newer-wins). Otherwise the conflict is reported but left alone — you handle it manually. No silent data loss.
Closes #799. Big thanks to @filhocf for the proposal, the design dialogue, and a tight implementation that landed both review iterations on the same day. (PR #802)
Faster, leaner Docker quality images
The :quality-cpu Docker variant now ships a pre-quantized DeBERTa ONNX classifier instead of running quantization on every cold start. Image size drops from ~1.7 GB to ~600 MB and the first quality scoring call is instant.
New configuration
| Variable | Default | Purpose |
|---|---|---|
MCP_MAINTAIN_STALE_DAYS
| 30
| Days threshold for stale memory detection |
MCP_MAINTAIN_AUTO_RESOLVE
| false
| Enable automatic conflict resolution (opt-in) |
MCP_MAINTAIN_AUTO_RESOLVE_THRESHOLD
| 0.95
| Similarity threshold for auto-resolve |
MCP_MAINTAIN_AUTO_RESOLVE_AGE_DAYS
| 7
| Minimum age delta (days) between memories for auto-resolve |
Tests
~1,780 tests (10 new for the maintain orchestrator).
Upgrade
pip install --upgrade mcp-memory-service
# or
uv pip install --upgrade mcp-memory-serviceNo breaking changes. All existing memory_quality actions (rate, get, analyze) continue to work unchanged.
Full Changelog: v10.46.0...v10.47.0