Skip to main content
Glama

MemoVault

A personal memory system for AI assistants — runs entirely on your machine, stores everything locally, and integrates with Claude Code, Cursor, Gemini CLI, and Codex via lifecycle hooks.

Privacy first. Nothing leaves your machine by default. Memories are stored as local files. The dashboard polls your own REST API. Plugin hooks call localhost only.


Features

  • STM / LTM architecture — short-term session memory with decay + long-term memory with 4-dimensional importance scoring

  • BM25 + vector search — keyword (simple) or semantic (Qdrant) retrieval

  • MCP server — first-class Claude Code integration with 15+ tools

  • Plugin hooks — lifecycle hooks for Claude Code, Cursor, Gemini CLI, Codex CLI

  • Dashboard UI — real-time web dashboard at http://localhost:8080/ui

  • Token economics — tracks discovery vs read tokens and efficiency ratio

  • Fully local — Ollama LLM + local embeddings + embedded Qdrant, zero cloud dependency


Related MCP server: claude-recall

Installation

From source

git clone https://github.com/your-org/memovault
cd memovault
pip install -e .       # or: uv sync
cp .env.example .env

From PyPI

pip install memovault

Setup

Option A — Fully local (Ollama)

1. Install Ollama and pull models

# macOS
brew install ollama

# Linux
curl -fsSL https://ollama.com/install.sh | sh

ollama pull llama3.1           # main LLM
ollama pull nomic-embed-text   # embeddings

2. Configure .env

MEMOVAULT_LLM_BACKEND=ollama
MEMOVAULT_OLLAMA_MODEL=llama3.1:latest
MEMOVAULT_OLLAMA_API_BASE=http://localhost:11434

MEMOVAULT_EMBEDDER_BACKEND=ollama
MEMOVAULT_EMBEDDER_OLLAMA_MODEL=nomic-embed-text:latest

# simple = BM25 (no vector DB), vector = Qdrant (semantic search)
MEMOVAULT_MEMORY_BACKEND=simple

MEMOVAULT_DATA_DIR=./memovault_data

3. Start

memovault service start
open http://localhost:8080/ui

Option B — OpenAI

MEMOVAULT_LLM_BACKEND=openai
MEMOVAULT_OPENAI_API_KEY=sk-...
MEMOVAULT_OPENAI_MODEL=gpt-4o-mini

MEMOVAULT_EMBEDDER_BACKEND=openai
MEMOVAULT_EMBEDDER_OPENAI_MODEL=text-embedding-3-small

MEMOVAULT_MEMORY_BACKEND=vector

Memory content is sent to OpenAI's API for scoring and embedding when using this backend.


Claude Code — MCP Integration

Add to ~/.claude/claude.json:

Local (Ollama)

{
  "mcpServers": {
    "memovault": {
      "command": "memovault",
      "args": ["mcp"],
      "env": {
        "MEMOVAULT_LLM_BACKEND": "ollama",
        "MEMOVAULT_OLLAMA_MODEL": "llama3.1:latest"
      }
    }
  }
}

OpenAI

{
  "mcpServers": {
    "memovault": {
      "command": "memovault",
      "args": ["mcp"],
      "env": {
        "MEMOVAULT_LLM_BACKEND": "openai",
        "MEMOVAULT_OPENAI_API_KEY": "sk-..."
      }
    }
  }
}

Plugin Hooks

Hooks automatically inject memory context before each prompt and save session summaries on exit. Requires the REST API to be running.

Quick start

memovault service start                        # start REST API
memovault plugins install claude-code          # install hooks

All platforms

memovault plugins list                         # show status for all platforms
memovault plugins install claude-code
memovault plugins install cursor
memovault plugins install gemini
memovault plugins install codex

memovault plugins uninstall claude-code        # remove hooks

What each hook does

Hook

Trigger

Action

UserPromptSubmit

Before every prompt

Fetches recent session summaries + relevant memories, prepends as context

Stop

When the tool exits

Summarizes the session and stores it to LTM

Platform details

Claude Code — writes hooks to ~/.claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [{
      "matcher": ".*",
      "command": "memovault hook prompt-submit --api http://localhost:8080"
    }],
    "Stop": [{
      "command": "memovault hook session-end --api http://localhost:8080"
    }]
  }
}

Cursor — writes memovault.hooks config to Cursor's settings.json.

Gemini CLI / Codex CLI — adds a shell wrapper function to ~/.zshrc. Run source ~/.zshrc once after install to activate.

Auto-start the service on login

# Add to ~/.zshrc or ~/.bash_profile
memovault service start 2>/dev/null

Service Management

memovault service start           # start REST API in background
memovault service start --port 9090
memovault service status
memovault service stop

# Foreground (useful for debugging)
memovault api --host 127.0.0.1 --port 8080

License

MIT

Available Tools

8 tools
add_memoryA

Store new information in memory.

Use this to remember facts, preferences, events, or any important information the user wants to persist across sessions.

Args: content: The information to remember memory_type: Optional type (fact, preference, event, opinion, procedure, personal)

Returns: Confirmation message with the memory ID

Inputs: content (required), memory_type. Returns: result

chat_with_memoryA

Chat with memory-enhanced responses.

Use this for questions where stored memories might provide context. The response will incorporate relevant memories automatically.

Args: query: User's question or message top_k: Number of memories to use as context (default: 5)

Returns: AI response enhanced with relevant memories

Inputs: query (required), top_k. Returns: result

clear_memoriesA

Clear all stored memories.

Warning: This permanently deletes all memories!

Returns: Confirmation message

Inputs: no named parameters. Returns: result

delete_memoryC

Remove a specific memory.

Args: memory_id: The unique identifier of the memory to delete

Returns: Confirmation message

Inputs: memory_id (required). Returns: result

get_memoryB

Retrieve a specific memory by ID.

Args: memory_id: The unique identifier of the memory

Returns: The memory content and metadata

Inputs: memory_id (required). Returns: object

list_memoriesC

Show recent memories.

Args: limit: Maximum number of memories to return (default: 10)

Returns: Dictionary with list of recent memories

Inputs: limit. Returns: object

memory_statusB

Get the current status of the memory system.

Returns: Dictionary with status information

Inputs: no named parameters. Returns: object

search_memoriesB

Search for relevant memories.

Use this to find stored information related to a topic or question.

Args: query: What to search for top_k: Maximum number of results (default: 5)

Returns: Dictionary with matching memories

Inputs: query (required), top_k. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap. For example, add_memory stores new information, get_memory retrieves a specific memory by ID, search_memories finds relevant memories by query, and chat_with_memory uses memories to enhance responses. The descriptions reinforce these distinct roles, making tool selection unambiguous.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with snake_case (e.g., add_memory, delete_memory, list_memories). The naming is predictable and readable throughout the set, with no deviations in style or convention.

    Tool Count5/5

    With 8 tools, the count is well-scoped for a memory management server. It covers core operations like CRUD (add, get, delete, list), search, chat integration, status checks, and clearing, with each tool earning its place without feeling excessive or insufficient.

    Completeness5/5

    The tool set provides complete coverage for memory management, including CRUD operations (add_memory, get_memory, delete_memory, list_memories), search capabilities (search_memories), integration (chat_with_memory), system management (clear_memories, memory_status). There are no obvious gaps, and agents can handle full memory lifecycles without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      The Cursor10x Memory System creates a persistent memory layer for AI assistants (specifically Claude), enabling them to retain and recall short-term, long-term and episodic memory on autonomously.
      18
      15 npm
      78
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A persistent memory server for Claude Code that captures session context and tool outputs to inject relevant history into future sessions. It enables long-term recall through semantic search and automatic context management, allowing for more consistent and context-aware coding interactions.
      10 npm
      253
      ISC
    • A
      license
      A
      quality
      D
      maintenance
      A persistent semantic memory system for Claude Code that provides a structured, versioned document store with semantic search and graph visualization. It acts as a memoization layer to store and retrieve research, design decisions, and codebase insights across different work sessions.
      10
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      A full-featured long-term memory system for Claude Code that persistently stores and retrieves preferences, decisions, and project context across sessions using hybrid search and LLM-powered extraction.
      14
      18 npm
      MIT