SuperAPI AI Directory

mcp-memory

SQLite-based memory with exponential decay: memories strengthen on access and fade when unused, limiting unbounded context growth.

Open website

About this tool

mcp-memory is an intelligent memory system for AI agents, built on SQLite and using an exponential decay mechanism to manage memories. Its core goal is to solve the so-called "Karpathy problem": a one-off question or interest should not later be repeatedly treated as a persistent focus.

Main Mechanism

Memories decay over time: they are strengthened when accessed and fade when unused for a long time. Topics are weighted by frequency, so one-off questions do not become long-term obsessions.

New Features in v0.2.0

  • Automatic classification: no need to manually specify a category; the system infers it from the content, and manual override is also supported (e.g., category: "preference").
  • Semantic deduplication: prevents duplicate memories based on bigram similarity.
  • Preference override: when "prefers dark mode" is followed by "prefers light mode," it updates rather than duplicates.
  • Automatic reinforcement on recall: searching for a topic is treated as a mention, thereby strengthening that memory.
  • Automatic pruning on recall: invalidated memories are cleaned up on every read.
  • System prompt injection: provides active memories through the MCP prompt capability.
  • Fuzzy forgetting: for example, "VS Code" can match "the user prefers to use VS Code for all editing."
  • Tool simplification: simplified from 7 tools to 4 tools, with a simpler API and backward compatibility with old tool names (reinforce, prune, stats).

Usage

Integrated into AI agents through MCP (Model Context Protocol). Operations such as adding and querying memories are completed through tool calls; the specific commands and API details are not provided in the materials.

Applicable Scenarios

Suitable for AI agents that need long-term memory but also want to avoid unlimited context growth, especially for handling user preferences, one-off questions, and repeated mentions.

Limitations

The materials do not provide detailed information about performance, storage limits, platform support, or pricing. It depends on SQLite and requires self-deployment.