Skip to main content
Glama

Mnemo

Autonomous bitemporal memory engine and AST-based knowledge graph for AI agents via Model Context Protocol (MCP). Zero external infrastructure, single-file SQLite storage.

PyPI version Python License: MIT


Core Capabilities

  • Bitemporal Fact Store: Separates validity timeline (valid_time) from system recording time (ingest_time) using SQLite WAL mode.

  • 3-Channel Hybrid Retrieval: Fuses dense vector embeddings, FTS5 full-text search, and recursive CTE graph traversal via Reciprocal Rank Fusion (RRF).

  • Ebbinghaus Memory Decay: Four dynamic tiers (Core, Working, Peripheral, Archived) prevent context bloat through piecewise exponential decay.

  • AST Knowledge Graph: Parses project syntax trees, tracks cross-file class/function relationships, and reconciles deleted modules automatically.

  • Zero Infrastructure: Operates locally inside a single embedded database file without requiring Docker, external vector databases, or cloud accounts.


Related MCP server: Menhir

Installation

Install the package directly from PyPI into your environment:

pip install mnemo-agentmcp

Or run commands directly via uvx without global installation:

uvx --from mnemo-agentmcp mnemo --help

MCP Server Configuration

Connect Mnemo to your preferred AI environment (Cursor, Claude Desktop, Antigravity, Windsurf) by updating your client settings.

Cursor / Antigravity (.cursor/mcp.json or mcp_config.json)

{
  "mcpServers": {
    "mnemo": {
      "command": "python",
      "args": ["-m", "mnemo.mcp.server"]
    }
  }
}

Zero-Setup via uvx (Cross-Platform)

{
  "mcpServers": {
    "mnemo": {
      "command": "uvx",
      "args": ["--from", "mnemo-agentmcp", "mnemo", "serve"]
    }
  }
}

Quick Start

Initialize the memory database in your project directory:

mnemo init

Analyze the repository topology and populate the initial knowledge graph:

mnemo scan .

Generate an interactive dark-themed Sankey visualization of your memory tiers and graph connections:

mnemo visualize

Verify your environment dependencies and database health:

mnemo doctor

Available MCP Tools

Agents communicate with Mnemo over stdio JSON-RPC using these tools:

  • mnemo_remember: Classify and persist facts using AUDN operations (Add, Update, Delete, Noop).

  • mnemo_search: Retrieve facts using hybrid vector, lexical, and graph ranking.

  • mnemo_invalidate: Soft-retire facts by ending their validity window without losing history.

  • mnemo_reinforce: Boost fact salience upon confirmation or repeated access.

  • mnemo_inspect: View full metadata, source trace, and bitemporal intervals for any fact.

  • mnemo_get_debt_ledger: Audit active architectural tensions, deprecated items, and unresolved debt.

  • mnemo_scan_project: Trigger project-wide AST dependency re-indexing directly from the agent.


Architecture Overview

Component

Technology

Responsibility

Storage Engine

SQLite (WAL mode)

ACID guarantees, bitemporal schema, and lightweight blob arrays

Lexical Search

SQLite FTS5

Sub-millisecond keyword matching across architectural decisions

Vector Search

Cosine Similarity

Semantic retrieval and similarity clustering

Graph Traversal

Recursive CTEs

Fast multi-hop entity dependency traversal

Agent Interface

FastMCP (stdio)

Protocol-compliant JSON-RPC layer isolated on stderr


License

This project is licensed under the MIT License — see the LICENSE file for details.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Offline-first, persistent repository memory for coding agents. Provides MCP tools for repository scanning, searching, context, and impact analysis, helping agents navigate and edit code efficiently.
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides coding agents with governed semantic memory and code-graph context via MCP, enabling code-linked recall, blast-radius impact analysis, and lifecycle-aware memory management.
    3
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides AI agents with persistent, human-like memory infrastructure via MCP, enabling them to store, search, summarize, and forget episodic, semantic, procedural, and working memories across sessions.
    293 npm
    MIT