Abstract AI network illustration

Persistent Memory MCP Server for LM Studio

Long‑term memory, knowledge graph management and sequential reasoning workflows – all backed by SQLite.

Get Started →

Why Anamnesion?

Language models normally lose context when a session ends. Anamnesion solves this by providing an external memory layer that enables persistent structured memory across sessions, knowledge‑graph storage, sequential reasoning workflows and full‑text search.

Not an autonomous system. The LLM remains a powerful assistant – not your replacement.

Overview

Persistent Memory

Keep context alive across sessions, even after a restart.

Knowledge Graph

Store entities, relations and observations in an SQLite‑backed graph.

Sequential Reasoning

Create multi‑step workflows that the model can follow reliably.

Full‑Text Search

Score‑based retrieval with tag, date and importance filters.

Key Features

Plugin Dashboard (ncurses)

An interactive terminal UI lets you view, enable/disable and monitor plugins.

# Starting the dashboard
python dashboard.py

# Controls
SPACE – toggle plugin ON/OFF
S      – show server stats
UP/DOWN arrows – navigate

Quick 5‑Step Start

  1. Clone the repo
    git clone https://gitlab.com/Rexodus/anamnesion-memory-server.git
    cd anamnesion-memory-server
  2. Install dependencies
    pip install -r requirements.txt
  3. Run the server
    python memory.py
  4. Add to LM Studio MCP config

    (see snippet below)

  5. Optional: systemd service

    Create a persistent Linux service – see the “systemd service” section.

MCP Configuration Example (LM Studio)

{
  "mcpServers": {
    "anamnesion": {
      "command": "python",
      "args": [
        "/absolute/path/to/anamnesion-memory-server/memory.py"
      ]
    }
  }
}

When using a virtual environment replace the command with the venv’s python binary.

Systemd Service (Linux)

  1. Create file /etc/systemd/system/anamnesion.service
  2. Add the following content:
  3. [Unit]
    Description=Anamnesion MCP Memory Server
    After=network.target
    
    [Service]
    Type=simple
    User=youruser
    WorkingDirectory=/absolute/path/to/anamnesion-memory-server
    ExecStart=/usr/bin/python3 /absolute/path/to/anamnesion-memory-server/memory.py
    Restart=always
    RestartSec=3
    Environment=PYTHONUNBUFFERED=1
    StandardOutput=journal
    StandardError=journal
    NoNewPrivileges=true
    PrivateTmp=true
    
    [Install]
    WantedBy=multi-user.target
  4. Enable & start:
  5. sudo systemctl daemon-reload
    sudo systemctl enable anamnesion
    sudo systemctl start anamnesion
    # Check status:
    sudo systemctl status anamnesion
    # Follow logs:
    journalctl -u anamnesion -f

Advanced Search Capabilities

🔍 search_memory()

Full‑text document search with scoring, tag & date filters.

🧠 search_graph()

Query entities, relations and observations in the knowledge graph.

🔗 search_unified()

One call – searches both memory index **and** knowledge graph.

Documentation

All docs live in the repository’s /documents folder.