Skip to main content
Glama

MemoVault

一个为 AI 助手设计的个人记忆系统——完全在您的机器上运行,所有内容本地存储,并通过生命周期钩子与 Claude Code、Cursor、Gemini CLI 和 Codex 集成。

隐私至上。 默认情况下,没有任何数据会离开您的机器。记忆以本地文件形式存储。仪表板轮询您自己的 REST API。插件钩子仅调用 localhost


功能特性

  • STM / LTM 架构 — 带有衰减机制的短期会话记忆 + 带有 4 维重要性评分的长期记忆

  • BM25 + 向量搜索 — 关键词(简单)或语义(Qdrant)检索

  • MCP 服务器 — 与 Claude Code 的一流集成,提供 15+ 种工具

  • 插件钩子 — 适用于 Claude Code、Cursor、Gemini CLI、Codex CLI 的生命周期钩子

  • 仪表板 UI — 位于 http://localhost:8080/ui 的实时 Web 仪表板

  • Token 经济学 — 追踪发现与读取的 Token 数量及效率比

  • 完全本地化 — Ollama LLM + 本地嵌入 + 内嵌 Qdrant,零云依赖


Related MCP server: claude-recall

安装

从源码安装

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

从 PyPI 安装

pip install memovault

设置

选项 A — 完全本地化 (Ollama)

1. 安装 Ollama 并拉取模型

# 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. 配置 .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. 启动

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

选项 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

使用此后端时,记忆内容会被发送到 OpenAI 的 API 进行评分和嵌入。


Claude Code — MCP 集成

添加到 ~/.claude/claude.json

本地 (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-..."
      }
    }
  }
}

插件钩子

钩子会在每次提示词之前自动注入记忆上下文,并在退出时保存会话摘要。需要运行 REST API。

快速开始

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

所有平台

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

每个钩子的作用

钩子

触发时机

操作

UserPromptSubmit

每次提示词之前

获取最近的会话摘要 + 相关记忆,作为上下文预置

Stop

工具退出时

总结会话并将其存储到 LTM

平台详情

Claude Code — 将钩子写入 ~/.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 — 将 memovault.hooks 配置写入 Cursor 的 settings.json

Gemini CLI / Codex CLI — 将 shell 包装函数添加到 ~/.zshrc。安装后运行一次 source ~/.zshrc 以激活。

登录时自动启动服务

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

服务管理

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

许可证

MIT

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    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
    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
    C
    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
    8
    MIT

View all related MCP servers

Related MCP Connectors

  • Long-term memory for AI assistants. Hybrid retrieval, query expansion, auto-topics.

  • Persistent memory for AI agents — verbatim conversations, searchable by meaning.

  • Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Blvckjs96/MemoVault'

If you have feedback or need assistance with the MCP directory API, please join our Discord server