Skip to main content
Glama

Add to Cursor Add to VS Code Add to Claude Add to ChatGPT Add to Codex Add to Gemini

Mnemex: Temporal Memory for AI

A Model Context Protocol (MCP) server providing human-like memory dynamics for AI assistants. Memories naturally fade over time unless reinforced through use, mimicking the Ebbinghaus forgetting curve.

License: MIT Python 3.10+ Tests Security Scanning codecov SBOM: CycloneDX

WARNING

🚧 ACTIVE DEVELOPMENT - EXPECT BUGS 🚧

This project is under active development and should be considered experimental. You will likely encounter bugs, breaking changes, and incomplete features. Use at your own risk. Please report issues on GitHub, but understand that this is research code, not production-ready software.

Known issues:

  • API may change without notice between versions

  • Test coverage is incomplete

πŸ“– New to this project? Start with the ELI5 Guide for a simple explanation of what this does and how to use it.

What is Mnemex?

Mnemex gives AI assistants like Claude a human-like memory system.

The Problem

When you chat with Claude, it forgets everything between conversations. You tell it "I prefer TypeScript" or "I'm allergic to peanuts," and three days later, you have to repeat yourself. This is frustrating and wastes time.

What Mnemex Does

Mnemex makes AI assistants remember things naturally, just like human memory:

  • 🧠 Remembers what matters - Your preferences, decisions, and important facts

  • ⏰ Forgets naturally - Old, unused information fades away over time (like the Ebbinghaus forgetting curve)

  • πŸ’ͺ Gets stronger with use - The more you reference something, the longer it's remembered

  • πŸ“¦ Saves important things permanently - Frequently used memories get promoted to long-term storage

How It Works (Simple Version)

  1. You talk naturally - "I prefer dark mode in all my apps"

  2. Memory is saved automatically - No special commands needed

  3. Time passes - Memory gradually fades if not used

  4. You reference it again - "Make this app dark mode"

  5. Memory gets stronger - Now it lasts even longer

  6. Important memories promoted - Used 5+ times? Saved permanently to your Obsidian vault

No flashcards. No explicit review. Just natural conversation.

Why It's Different

Most memory systems are dumb:

  • ❌ "Delete after 7 days" (doesn't care if you used it 100 times)

  • ❌ "Keep last 100 items" (throws away important stuff just because it's old)

Mnemex is smart:

  • βœ… Combines recency (when?), frequency (how often?), and importance (how critical?)

  • βœ… Memories fade naturally like human memory

  • βœ… Frequently used memories stick around longer

  • βœ… You can mark critical things to "never forget"

Related MCP server: JauMemory MCP Server

Technical Overview

This repository contains research, design, and a complete implementation of a short-term memory system that combines:

  • Novel temporal decay algorithm based on cognitive science

  • Reinforcement learning through usage patterns

  • Two-layer architecture (STM + LTM) for working and permanent memory

  • Smart prompting patterns for natural LLM integration

  • Git-friendly storage with human-readable JSONL

  • Knowledge graph with entities and relations

Why Mnemex?

πŸ”’ Privacy & Transparency

All data stored locally on your machine - no cloud services, no tracking, no data sharing.

  • Short-term memory: Human-readable JSONL files (~/.config/mnemex/jsonl/)

    • One JSON object per line

    • Easy to inspect, version control, and backup

    • Git-friendly format for tracking changes

  • Long-term memory: Markdown files optimized for Obsidian

    • YAML frontmatter with metadata

    • Wikilinks for connections

    • Permanent storage you control

You own your data. You can read it, edit it, delete it, or version control it - all without any special tools.

Core Algorithm

The temporal decay scoring function:

$$ \Large \text{score}(t) = (n_{\text{use}})^\beta \cdot e^{-\lambda \cdot \Delta t} \cdot s $$

Where:

  • $\large n_{\text{use}}$ - Use count (number of accesses)

  • $\large \beta$ (beta) - Sub-linear use count weighting (default: 0.6)

  • $\large \lambda = \frac{\ln(2)}{t_{1/2}}$ (lambda) - Decay constant; set via half-life (default: 3-day)

  • $\large \Delta t$ - Time since last access (seconds)

  • $\large s$ - Strength parameter $\in [0, 2]$ (importance multiplier)

Thresholds:

  • $\large \tau_{\text{forget}}$ (default 0.05) β€” if score < this, forget

  • $\large \tau_{\text{promote}}$ (default 0.65) β€” if score β‰₯ this, promote (or if $\large n_{\text{use}}\ge5$ in 14 days)

Decay Models:

  • Power‑Law (default): heavier tail; most human‑like retention

  • Exponential: lighter tail; forgets sooner

  • Two‑Component: fast early forgetting + heavier tail

See detailed parameter reference, model selection, and worked examples in docs/scoring_algorithm.md.

Tuning Cheat Sheet

  • Balanced (default)

    • Half-life: 3 days (Ξ» β‰ˆ 2.67e-6)

    • Ξ² = 0.6, Ο„_forget = 0.05, Ο„_promote = 0.65, use_countβ‰₯5 in 14d

    • Strength: 1.0 (bump to 1.3–2.0 for critical)

  • High‑velocity context (ephemeral notes, rapid switching)

    • Half-life: 12–24 hours (Ξ» β‰ˆ 1.60e-5 to 8.02e-6)

    • Ξ² = 0.8–0.9, Ο„_forget = 0.10–0.15, Ο„_promote = 0.70–0.75

  • Long retention (research/archival)

    • Half-life: 7–14 days (Ξ» β‰ˆ 1.15e-6 to 5.73e-7)

    • Ξ² = 0.3–0.5, Ο„_forget = 0.02–0.05, Ο„_promote = 0.50–0.60

  • Preference/decision heavy assistants

    • Half-life: 3–7 days; Ξ² = 0.6–0.8

    • Strength defaults: 1.3–1.5 for preferences; 1.8–2.0 for decisions

  • Aggressive space control

    • Raise Ο„_forget to 0.08–0.12 and/or shorten half-life; schedule weekly GC

  • Environment template

    • MNEMEX_DECAY_LAMBDA=2.673e-6, MNEMEX_DECAY_BETA=0.6

    • MNEMEX_FORGET_THRESHOLD=0.05, MNEMEX_PROMOTE_THRESHOLD=0.65

    • MNEMEX_PROMOTE_USE_COUNT=5, MNEMEX_PROMOTE_TIME_WINDOW=14

Decision thresholds:

  • Forget: $\text{score} < 0.05$ β†’ delete memory

  • Promote: $\text{score} \geq 0.65$ OR $n_{\text{use}} \geq 5$ within 14 days β†’ move to LTM

Key Innovations

1. Temporal Decay with Reinforcement

Unlike traditional caching (TTL, LRU), Mnemex scores memories continuously by combining recency (exponential decay), frequency (sub-linear use count), and importance (adjustable strength). See Core Algorithm for the mathematical formula. This creates memory dynamics that closely mimic human cognition.

2. Smart Prompting System

Patterns for making AI assistants use memory naturally:

Auto-Save

User: "I prefer TypeScript over JavaScript"
β†’ Automatically saved with tags: [preferences, typescript, programming]

Auto-Recall

User: "Can you help with another TypeScript project?"
β†’ Automatically retrieves preferences and conventions

Auto-Reinforce

User: "Yes, still using TypeScript"
β†’ Memory strength increased, decay slowed

No explicit memory commands needed - just natural conversation.

3. Natural Spaced Repetition

Inspired by how concepts naturally reinforce across different contexts (the "Maslow effect" - remembering Maslow's hierarchy better when it appears in history, economics, and sociology classes).

No flashcards. No explicit review sessions. Just natural conversation.

How it works:

  1. Review Priority Calculation - Memories in the "danger zone" (0.15-0.35 decay score) get highest priority

  2. Cross-Domain Detection - Detects when memories are used in different contexts (tag Jaccard similarity <30%)

  3. Automatic Reinforcement - Memories strengthen naturally when used, especially across domains

  4. Blended Search - Review candidates appear in 30% of search results (configurable)

Usage pattern:

User: "Can you help with authentication in my API?"
β†’ System searches, retrieves JWT preference memory
β†’ System uses memory to answer question
β†’ System calls observe_memory_usage with context tags [api, auth, backend]
β†’ Cross-domain usage detected (original tags: [security, jwt, preferences])
β†’ Memory automatically reinforced, strength boosted
β†’ Next search naturally surfaces memories needing review

Configuration:

MNEMEX_REVIEW_BLEND_RATIO=0.3           # 30% review candidates in search
MNEMEX_REVIEW_DANGER_ZONE_MIN=0.15      # Lower bound of danger zone
MNEMEX_REVIEW_DANGER_ZONE_MAX=0.35      # Upper bound of danger zone
MNEMEX_AUTO_REINFORCE=true              # Auto-reinforce on observe

See docs/prompts/ for LLM system prompt templates that enable natural memory usage.

4. Two-Layer Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Short-term memory                 β”‚
β”‚   - JSONL storage                   β”‚
β”‚   - Temporal decay                  β”‚
β”‚   - Hours to weeks retention        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ Automatic promotion
               ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   LTM (Long-Term Memory)            β”‚
β”‚   - Markdown files (Obsidian)       β”‚
β”‚   - Permanent storage               β”‚
β”‚   - Git version control             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

Installation

Recommended: UV Tool Install (from PyPI)

# Install from PyPI (recommended - fast, isolated, includes all 7 CLI commands)
uv tool install mnemex

This installs mnemex and all 7 CLI commands in an isolated environment.

Alternative Installation Methods

# Using pipx (similar isolation to uv)
pipx install mnemex

# Using pip (traditional, installs in current environment)
pip install mnemex

# From GitHub (latest development version)
uv tool install git+https://github.com/simplemindedbot/mnemex.git

For Development (Editable Install)

# Clone and install in editable mode
git clone https://github.com/simplemindedbot/mnemex.git
cd mnemex
uv pip install -e ".[dev]"

Configuration

Copy .env.example to .env and configure:

# Storage
MNEMEX_STORAGE_PATH=~/.config/mnemex/jsonl

# Decay model (power_law | exponential | two_component)
MNEMEX_DECAY_MODEL=power_law

# Power-law parameters (default model)
MNEMEX_PL_ALPHA=1.1
MNEMEX_PL_HALFLIFE_DAYS=3.0

# Exponential (if selected)
# MNEMEX_DECAY_LAMBDA=2.673e-6  # 3-day half-life

# Two-component (if selected)
# MNEMEX_TC_LAMBDA_FAST=1.603e-5  # ~12h
# MNEMEX_TC_LAMBDA_SLOW=1.147e-6  # ~7d
# MNEMEX_TC_WEIGHT_FAST=0.7

# Common parameters
MNEMEX_DECAY_LAMBDA=2.673e-6
MNEMEX_DECAY_BETA=0.6

# Thresholds
MNEMEX_FORGET_THRESHOLD=0.05
MNEMEX_PROMOTE_THRESHOLD=0.65

# Long-term memory (optional)
LTM_VAULT_PATH=~/Documents/Obsidian/Vault

MCP Configuration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "mnemex": {
      "command": "mnemex"
    }
  }
}

That's it! No paths, no environment variables needed.

For development (editable install):

{
  "mcpServers": {
    "mnemex": {
      "command": "uv",
      "args": ["--directory", "/path/to/mnemex", "run", "mnemex"],
      "env": {"PYTHONPATH": "/path/to/mnemex/src"}
    }
  }
}

Configuration:

  • Storage paths are configured in ~/.config/mnemex/.env or project .env

  • See .env.example for all available settings

Troubleshooting: Command Not Found

If Claude Desktop shows spawn mnemex ENOENT errors, the mnemex command isn't in Claude Desktop's PATH.

macOS/Linux: GUI apps don't inherit shell PATH

GUI applications on macOS and Linux don't see your shell's PATH configuration (.zshrc, .bashrc, etc.). Claude Desktop only searches:

  • /usr/local/bin

  • /opt/homebrew/bin (macOS)

  • /usr/bin

  • /bin

  • /usr/sbin

  • /sbin

If uv tool install placed mnemex in ~/.local/bin/ or another custom location, Claude Desktop can't find it.

Solution: Use absolute path

# Find where mnemex is installed
which mnemex
# Example output: /Users/username/.local/bin/mnemex

Update your Claude config with the absolute path:

{
  "mcpServers": {
    "mnemex": {
      "command": "/Users/username/.local/bin/mnemex"
    }
  }
}

Replace /Users/username/.local/bin/mnemex with your actual path from which mnemex.

Alternative: System-wide install

You can also install to a system location that Claude Desktop searches:

# Option 1: Link to /usr/local/bin
sudo ln -s ~/.local/bin/mnemex /usr/local/bin/mnemex

# Option 2: Install with pipx/uv to system location (requires admin)
sudo uv tool install git+https://github.com/simplemindedbot/mnemex.git

Maintenance

Use the maintenance CLI to inspect and compact JSONL storage:

# Show storage stats (active counts, file sizes, compaction hints)
mnemex-maintenance stats

# Compact JSONL (rewrite without tombstones/duplicates)
mnemex-maintenance compact

Migrating to UV Tool Install

If you're currently using an editable install (uv pip install -e .), you can switch to the simpler UV tool install:

# 1. Uninstall editable version
uv pip uninstall mnemex

# 2. Install as UV tool
uv tool install git+https://github.com/simplemindedbot/mnemex.git

# 3. Update Claude Desktop config to just:
#    {"command": "mnemex"}
#    Remove the --directory, run, and PYTHONPATH settings

Your data is safe! This only changes how the command is installed. Your memories in ~/.config/mnemex/ are untouched.

Migrating from STM Server

If you previously used this project as "STM Server", use the migration tool:

# Preview what will be migrated
mnemex-migrate --dry-run

# Migrate data files from ~/.stm/ to ~/.config/mnemex/
mnemex-migrate --data-only

# Also migrate .env file (rename STM_* variables to MNEMEX_*)
mnemex-migrate --migrate-env --env-path ./.env

The migration tool will:

  • Copy JSONL files from ~/.stm/jsonl/ to ~/.config/mnemex/jsonl/

  • Optionally rename environment variables (STM_* β†’ MNEMEX_*)

  • Create backups before making changes

  • Provide clear next-step instructions

After migration, update your Claude Desktop config to use mnemex instead of stm.

CLI Commands

The server includes 7 command-line tools:

mnemex                  # Run MCP server
mnemex-migrate          # Migrate from old STM setup
mnemex-index-ltm        # Index Obsidian vault
mnemex-backup           # Git backup operations
mnemex-vault            # Vault markdown operations
mnemex-search           # Unified STM+LTM search
mnemex-maintenance      # JSONL storage stats and compaction

MCP Tools

11 tools for AI assistants to manage memories:

Tool

Purpose

save_memory

Save new memory with tags, entities

search_memory

Search with filters and scoring (includes review candidates)

search_unified

Unified search across STM + LTM

touch_memory

Reinforce memory (boost strength)

observe_memory_usage

Record memory usage for natural spaced repetition

gc

Garbage collect low-scoring memories

promote_memory

Move to long-term storage

cluster_memories

Find similar memories

consolidate_memories

Merge similar memories (algorithmic)

read_graph

Get entire knowledge graph

open_memories

Retrieve specific memories

create_relation

Link memories explicitly

Search across STM and LTM with the CLI:

mnemex-search "typescript preferences" --tags preferences --limit 5 --verbose

Example: Reinforce (Touch) Memory

Boost a memory's recency/use count to slow decay:

{
  "memory_id": "mem-123",
  "boost_strength": true
}

Sample response:

{
  "success": true,
  "memory_id": "mem-123",
  "old_score": 0.41,
  "new_score": 0.78,
  "use_count": 5,
  "strength": 1.1
}

Example: Promote Memory

Suggest and promote high-value memories to the Obsidian vault.

Auto-detect (dry run):

{
  "auto_detect": true,
  "dry_run": true
}

Promote a specific memory:

{
  "memory_id": "mem-123",
  "dry_run": false,
  "target": "obsidian"
}

As an MCP tool (request body):

{
  "query": "typescript preferences",
  "tags": ["preferences"],
  "limit": 5,
  "verbose": true
}

Example: Consolidate Similar Memories

Find and merge duplicate or highly similar memories to reduce clutter:

Auto-detect candidates (preview):

{
  "auto_detect": true,
  "mode": "preview",
  "cohesion_threshold": 0.75
}

Apply consolidation to detected clusters:

{
  "auto_detect": true,
  "mode": "apply",
  "cohesion_threshold": 0.80
}

The tool will:

  • Merge content intelligently (preserving unique information)

  • Combine tags and entities (union)

  • Calculate strength based on cluster cohesion

  • Preserve earliest created_at and latest last_used timestamps

  • Create tracking relations showing consolidation history

Mathematical Details

Decay Curves

For a memory with $n_{\text{use}}=1$, $s=1.0$, and $\lambda = 2.673 \times 10^{-6}$ (3-day half-life):

Time

Score

Status

0 hours

1.000

Fresh

12 hours

0.917

Active

1 day

0.841

Active

3 days

0.500

Half-life

7 days

0.210

Decaying

14 days

0.044

Near forget

30 days

0.001

Forgotten

Use Count Impact

With $\beta = 0.6$ (sub-linear weighting):

Use Count

Boost Factor

1

1.0Γ—

5

2.6Γ—

10

4.0Γ—

50

11.4Γ—

Frequent access significantly extends retention.

Documentation

Use Cases

Personal Assistant (Balanced)

  • 3-day half-life

  • Remember preferences and decisions

  • Auto-promote frequently referenced information

Development Environment (Aggressive)

  • 1-day half-life

  • Fast context switching

  • Aggressive forgetting of old context

Research / Archival (Conservative)

  • 14-day half-life

  • Long retention

  • Comprehensive knowledge preservation

License

MIT License - See LICENSE for details.

Clean-room implementation. No AGPL dependencies.

Knowledge & Memory

  • mem0ai/mem0-mcp (Python) - A MCP server that provides a smart memory for AI to manage and reference past conversations, user preferences, and key details.

  • mnemex (Python) - A Python-based MCP server that provides a human-like short-term working memory (JSONL) and long-term memory (Markdown) system for AI assistants. The core of the project is a temporal decay algorithm that causes memories to fade over time unless they are reinforced through use.

  • modelcontextprotocol/server-memory (TypeScript) - A knowledge graph-based persistent memory system for AI.

Citation

If you use this work in research, please cite:

@software{mnemex_2025,
  title = {Mnemex: Temporal Memory for AI},
  author = {simplemindedbot},
  year = {2025},
  url = {https://github.com/simplemindedbot/mnemex},
  version = {0.5.3}
}

Contributing

Contributions are welcome! See CONTRIBUTING.md for detailed instructions.

🚨 Help Needed: Windows & Linux Testers!

I develop on macOS and need help testing on Windows and Linux. If you have access to these platforms, please:

  • Try the installation instructions

  • Run the test suite

  • Report what works and what doesn't

See the Help Needed section in CONTRIBUTING.md for details.

General Contributions

For all contributors, see CONTRIBUTING.md for:

  • Platform-specific setup (Windows, Linux, macOS)

  • Development workflow

  • Testing guidelines

  • Code style requirements

  • Pull request process

Quick start:

  1. Read CONTRIBUTING.md for platform-specific setup

  2. Understand the Architecture docs

  3. Review the Scoring Algorithm

  4. Follow existing code patterns

  5. Add tests for new features

  6. Update documentation

Status

Version: 1.0.0 Status: Research implementation - functional but evolving

Phase 1 (Complete) βœ…

  • 10 MCP tools

  • Temporal decay algorithm

  • Knowledge graph

Phase 2 (Complete) βœ…

  • JSONL storage

  • LTM index

  • Git integration

  • Smart prompting documentation

  • Maintenance CLI

  • Memory consolidation (algorithmic merging)

Future Work

  • Spaced repetition optimization

  • Adaptive decay parameters

  • Performance benchmarks

  • LLM-assisted consolidation (optional enhancement)


Built with Claude Code πŸ€–

Available Tools

13 tools
cluster_memoriesA

Cluster similar memories for potential consolidation or find duplicates.

Groups similar memories based on semantic similarity (if embeddings are enabled) or other strategies. Useful for identifying redundant memories.

Args: strategy: Clustering strategy (default: "similarity"). threshold: Similarity threshold for linking (0.0-1.0, uses config default if not specified). max_cluster_size: Maximum memories per cluster (1-100, uses config default if not specified). find_duplicates: Find likely duplicate pairs instead of clustering. duplicate_threshold: Similarity threshold for duplicates (0.0-1.0, uses config default).

Returns: List of clusters or duplicate pairs with scores and suggested actions.

Raises: ValueError: If any input fails validation.

Inputs: strategy, threshold, find_duplicates, max_cluster_size, +1 more. Returns: object

consolidate_memoriesA

Consolidate similar memories using algorithmic merging.

This tool intelligently merges similar memories by:

  1. Combining content (preserving unique information)

  2. Merging tags and entities (union)

  3. Calculating appropriate strength based on cohesion

  4. Preserving earliest created_at and latest last_used timestamps

Modes:

  • "preview": Generate merge preview without making changes

  • "apply": Execute the consolidation (requires cluster_id)

Args: cluster_id: Specific cluster ID to consolidate (valid UUID, required for apply mode). mode: Operation mode - "preview" or "apply". auto_detect: If True, automatically find high-cohesion clusters. cohesion_threshold: Minimum cohesion for auto-detection (0.0-1.0, default: 0.75).

Returns: Consolidation preview or execution results.

Raises: ValueError: If cluster_id is invalid or cohesion_threshold is out of range.

Inputs: mode, cluster_id, auto_detect, cohesion_threshold. Returns: object

create_relationA

Create an explicit relation between two memories.

Links two memories with a typed relationship.

Args: from_memory_id: Source memory ID (valid UUID). to_memory_id: Target memory ID (valid UUID). relation_type: Type of relation (must be one of: related, causes, supports, contradicts, has_decision, consolidated_from). strength: Strength of the relation (0.0-1.0). metadata: Additional metadata about the relation.

Returns: Created relation ID and confirmation.

Raises: ValueError: If any input fails validation.

Inputs: to_memory_id (required), relation_type (required), from_memory_id (required), metadata, +1 more. Returns: object

gcA

Perform garbage collection on low-scoring memories.

Removes or archives memories whose decay score has fallen below the forget threshold. This prevents the database from growing indefinitely with unused memories.

Args: dry_run: Preview what would be removed without actually removing. archive_instead: Archive memories instead of deleting. limit: Maximum number of memories to process (1-10,000).

Returns: Statistics about removed/archived memories.

Raises: ValueError: If limit is out of valid range.

Inputs: limit, dry_run, archive_instead. Returns: object

get_performance_metricsA

Get current performance metrics and statistics.

Returns: Dictionary containing performance statistics for various operations.

Inputs: no named parameters. Returns: object

open_memoriesA

Retrieve specific memories by their IDs.

Similar to the reference MCP memory server's open_nodes functionality. Returns detailed information about the requested memories including their relations to other memories.

Pagination: When retrieving many memories by ID, results are paginated. Use page and page_size to navigate through the list of requested memories.

Args: memory_ids: Single memory ID or list of memory IDs to retrieve (max 100 IDs). include_relations: Include relations from/to these memories. include_scores: Include decay scores and age. page: Page number to retrieve (1-indexed, default: 1). page_size: Number of memories per page (default: 10, max: 100).

Returns: Dictionary with paginated results including: - memories: Detailed memory information for current page - not_found: List of IDs that weren't found - pagination: Metadata (page, page_size, total_count, total_pages, has_more)

Examples: # Get first page of memories open_memories(["id1", "id2", "id3", ...], page=1, page_size=10)

# Get next page
open_memories(["id1", "id2", "id3", ...], page=2, page_size=10)

Raises: ValueError: If any memory ID is invalid or list exceeds maximum length.

Inputs: memory_ids (required), page, page_size, include_scores, +1 more. Returns: object

promote_memoryA

Promote high-value memories to long-term storage.

Memories with high scores or frequent usage are promoted to the Obsidian vault (or other long-term storage) where they become permanent.

Args: memory_id: Specific memory ID to promote (valid UUID). auto_detect: Automatically detect promotion candidates. dry_run: Preview what would be promoted without promoting. target: Storage backend for promotion. Default: "obsidian" (Obsidian-compatible markdown). Note: This is a storage format, not a file path. Path configured via LTM_VAULT_PATH. force: Force promotion even if criteria not met.

Returns: List of promoted memories and promotion statistics.

Raises: ValueError: If memory_id is invalid or target is not supported.

Inputs: force, target, dry_run, memory_id, +1 more. Returns: object

read_graphA

Read the entire knowledge graph of memories and relations.

Returns the complete graph structure including all memories (with decay scores), all relations between memories, and statistics about the graph.

Pagination: Results are paginated to help you navigate large knowledge graphs. Use page and page_size to retrieve specific portions of the graph. If searching for specific memories or patterns, increment page to see more results.

Args: status: Filter memories by status - "active", "promoted", "archived", or "all". include_scores: Include decay scores and age in results. limit: Maximum number of memories to return (1-10,000). page: Page number to retrieve (1-indexed, default: 1). page_size: Number of memories per page (default: 10, max: 100).

Returns: Dictionary with paginated graph including: - memories: List of memories for current page - relations: All relations (not paginated, for graph structure) - stats: Graph statistics - pagination: Metadata (page, page_size, total_count, total_pages, has_more)

Examples: # Get first page of active memories read_graph(status="active", page=1, page_size=10)

# Get next page
read_graph(status="active", page=2, page_size=10)

# Larger page for overview
read_graph(status="active", page=1, page_size=50)

Raises: ValueError: If status is invalid or limit is out of range.

Inputs: page, limit, status, page_size, +1 more. Returns: object

reset_performance_metricsA

Reset all performance metrics and return confirmation.

Returns: Dictionary confirming metrics have been reset.

Inputs: no named parameters. Returns: object

save_memoryA

Save a new memory to short-term storage.

The memory will have temporal decay applied and will be forgotten if not used regularly. Frequently accessed memories may be promoted to long-term storage automatically.

Args: content: The content to remember (max 50,000 chars). tags: Tags for categorization (max 50 tags, each max 100 chars). entities: Named entities in this memory (max 100 entities). source: Source of the memory (max 500 chars). context: Context when memory was created (max 1,000 chars). meta: Additional custom metadata.

Raises: ValueError: If any input fails validation.

Inputs: content (required), meta, tags, source, +2 more. Returns: object

search_memoryA

Search for memories with optional filters and scoring.

This tool implements natural spaced repetition by blending memories due for review into results when they're relevant. This creates the "Maslow effect" - natural reinforcement through conversation.

Pagination: Results are paginated to help you find specific memories across large result sets. Use page and page_size to navigate through results. If a search term isn't found on the first page, increment page to see more results.

Args: query: Text query to search for (max 50,000 chars). tags: Filter by tags (max 50 tags). top_k: Maximum number of results before pagination (1-100). window_days: Only search memories from last N days (1-3650). min_score: Minimum decay score threshold (0.0-1.0). use_embeddings: Use semantic search with embeddings. include_review_candidates: Blend in memories due for review (default True). page: Page number to retrieve (1-indexed, default: 1). page_size: Number of memories per page (default: 10, max: 100).

Returns: Dictionary with paginated results including: - results: List of matching memories with scores for current page - pagination: Metadata (page, page_size, total_count, total_pages, has_more)

Some results may be review candidates that benefit from reinforcement.

Examples: # Get first page (10 results) search_memory(query="authentication", page=1, page_size=10)

# Get next page
search_memory(query="authentication", page=2, page_size=10)

# Larger page size
search_memory(query="authentication", page=1, page_size=25)

Raises: ValueError: If any input fails validation.

Inputs: page, tags, query, top_k, +5 more. Returns: object

search_unifiedA

Search across both STM and LTM with unified ranking.

Pagination: Results are paginated to help you find specific memories across large result sets from both short-term and long-term memory. Use page and page_size to navigate through results. If a search term isn't found on the first page, increment page to see more results.

Args: query: Text query to search for (max 50,000 chars). tags: Filter by tags (max 50 tags). limit: Maximum total results before pagination (1-100). stm_weight: Weight multiplier for STM results (0.0-2.0). ltm_weight: Weight multiplier for LTM results (0.0-2.0). window_days: Only include STM memories from last N days (1-3650). min_score: Minimum score threshold for STM memories (0.0-1.0). page: Page number to retrieve (1-indexed, default: 1). page_size: Number of memories per page (default: 10, max: 100).

Returns: Dictionary with paginated results including: - results: List of matching memories from STM and LTM for current page - pagination: Metadata (page, page_size, total_count, total_pages, has_more)

Examples: # Get first page (10 results) search_unified(query="architecture", page=1, page_size=10)

# Get next page
search_unified(query="architecture", page=2, page_size=10)

Raises: ValueError: If any input fails validation.

Inputs: page, tags, limit, query, +5 more. Returns: object

touch_memoryA

Reinforce a memory by updating its last accessed time and use count.

This resets the temporal decay and increases the memory's resistance to being forgotten. Optionally can boost the memory's base strength.

Args: memory_id: ID of the memory to reinforce (valid UUID). boost_strength: Whether to boost the base strength.

Returns: Updated memory statistics including old and new scores.

Raises: ValueError: If memory_id is invalid.

Inputs: memory_id (required), boost_strength. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 13 tools

    Disambiguation4/5

    Tools are mostly distinct, with clear separation between search, retrieval, mutation, and maintenance operations. The main potential confusion is between search_memory and search_unified, and between cluster_memories and consolidate_memories, but descriptions clarify their different scopes.

    Naming Consistency4/5

    Nearly all tools follow a consistent verb_noun snake_case pattern (e.g., save_memory, search_memory, consolidate_memories). The abbreviation 'gc' for garbage collection is the only notable deviation, making the naming slightly inconsistent.

    Tool Count5/5

    The 13 tools are well-scoped for a memory server, covering creation, retrieval, search, maintenance, relations, and metrics. Each tool has a clear role without redundancy or excessive fragmentation.

    Completeness4/5

    The tool set covers the core memory lifecycle: creation (save_memory, create_relation), retrieval (open_memories, search_memory, read_graph), reinforcement (touch_memory), consolidation (cluster_memories, consolidate_memories), promotion (promote_memory), and deletion (gc). Minor gaps include lack of direct memory content update and relation deletion, but these are workable via existing tools.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides human-like memory dynamics for AI assistants where memories naturally fade over time unless reinforced through use, mimicking the Ebbinghaus forgetting curve. Enables automatic saving, searching, and management of contextual information with temporal decay algorithms.
      11
      39
      AGPL 3.0
    • A
      license
      A
      quality
      D
      maintenance
      Provides persistent memory capabilities for AI assistants, enabling storage, recall, and analysis of information across conversations with intelligent memory management.
      25
      35 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides long-term memory for AI agents with per-user scoped recall, ranking by relevance, recency, and importance, consolidation of repeated events, and automatic forgetting.
      MIT