Skip to main content
Glama
aeriondyseti

Vector Memory MCP Server

by aeriondyseti

Vector Memory MCP 服务器

为 AI 助手提供的语义记忆存储。存储可在会话间持久化的决策、模式和上下文。

一个本地优先的 MCP 服务器,提供基于向量的记忆存储。使用本地嵌入和带有 sqlite-vec 的 SQLite 进行快速、私密的语义搜索——所有功能集成在单个文件中。

License: MIT npm version


特性

  • 本地与私密 - 所有嵌入均在本地生成 (all-MiniLM-L6-v2, 384 维),数据存储在单个 SQLite 文件中

  • 语义搜索 - 结合向量与全文搜索,并具备基于意图的排序功能

  • 批量操作 - 同时存储、更新、删除和检索多条记忆

  • 会话路标 (Waypoints) - 在会话间保存和恢复项目上下文

  • 对话历史 - 索引并搜索 Claude Code 会话记录

  • MCP 原生 - 标准协议,适用于任何兼容 MCP 的客户端


Related MCP server: Memorious MCP

安装

根据您需要的集成程度,有两种安装 Vector Memory 的方式。

选项 A:Claude Code 插件(推荐)

安装为插件以获得完整体验:MCP 服务器、会话生命周期钩子、路标技能和上下文监控——全部自动管理。

# Add the marketplace
claude plugin marketplace add AerionDyseti/vector-memory-mcp

# Install the plugin
claude plugin install vector-memory@vector-memory-mcp

这将克隆仓库并直接从源码运行 MCP 服务器。钩子处理会话启动/清除/压缩事件,技能提供 /waypoint:set、/waypoint:get 和记忆使用指导。

选项 B:仅 MCP 服务器

如果您不需要钩子或技能,或者使用的是非 Claude Code 的 MCP 客户端,请通过 npm 仅安装 MCP 服务器。

bun install -g @aeriondyseti/vector-memory-mcp

首次安装会下载机器学习模型(约 90MB)。这可能需要一分钟。

然后添加到您的 MCP 客户端配置中(例如 ~/.claude/settings.json):

{
  "mcpServers": {
    "vector-memory": {
      "type": "stdio",
      "command": "bunx",
      "args": ["--bun", "@aeriondyseti/vector-memory-mcp"]
    }
  }
}

前置要求

  • Bun 1.0+

  • 兼容 MCP 的客户端(Claude Code, Claude Desktop 等)


工具

安装后请重启您的 MCP 客户端。您现在可以使用以下工具:

工具

描述

store_memories

保存记忆(接受数组)

search_memories

语义化查找相关记忆

get_memories

按 ID 检索记忆(接受数组)

update_memories

更新现有记忆

delete_memories

删除记忆(接受数组)

report_memory_usefulness

对记忆的有用性进行投票

set_waypoint

保存会话上下文以备后用

get_waypoint

恢复会话上下文

index_conversations

将 Claude Code 会话日志索引为可搜索的历史记录

list_indexed_sessions

浏览已索引的对话会话

reindex_session

强制重新索引特定会话


使用方法

存储记忆:

You: "Remember that we use Drizzle ORM for database access"
Assistant: [calls store_memories]

搜索记忆:

You: "What did we decide about the database?"
Assistant: [calls search_memories with relevant query]

会话路标:

You: "Save context for next session"
Assistant: [calls set_waypoint with summary, completed items, next steps]

对话历史(需要 --enable-history):

You: "What did we discuss about the API design last week?"
Assistant: [calls search_memories with history_only: true, history_before/after filters]

配置

CLI 标志:

标志

别名

默认值

描述

--db-file <path>

-d

.vector-memory/memories.db

数据库位置(相对于当前工作目录)

--port <number>

-p

3271

HTTP 服务器端口

--no-http

(启用 HTTP)

禁用 HTTP/SSE 传输

--enable-history

(已禁用)

启用对话历史索引

--history-path

(自动检测)

会话日志目录路径

--history-weight

0.75

统一搜索中历史记录结果的权重


发布渠道

插件用户: 插件跟踪仓库的默认分支。要切换渠道,请从特定分支或标签重新安装。

npm 用户: 默认情况下您获得的是稳定版本:

bun install -g @aeriondyseti/vector-memory-mcp

预发布渠道可用于测试即将到来的更改。这些版本不稳定,可能会在没有通知的情况下中断——请自行承担风险。

渠道

npm

描述

@latest

(默认)

稳定版本

@rc

@aeriondyseti/vector-memory-mcp@rc

发布候选版本 — 稳定前的最终测试

@dev

@aeriondyseti/vector-memory-mcp@dev

开发构建 — 最新功能,最不稳定

# Install the dev channel
bun install -g @aeriondyseti/vector-memory-mcp@dev

# Pin to a specific pre-release version
bun install -g @aeriondyseti/vector-memory-mcp@2.1.0-dev.1

# Go back to stable
bun install -g @aeriondyseti/vector-memory-mcp@latest

警告: 预发布版本可能包含重大更改、不完整的功能或尚未最终确定的数据迁移要求。请勿在您依赖的生产工作流中使用它们。


从 1.x (LanceDB) 迁移

2.0 版本将存储引擎从 LanceDB 替换为 SQLite (sqlite-vec)。如果您有来自 1.x 的现有数据,服务器将自动检测并提示您进行迁移:

vector-memory-mcp migrate

这将读取您的 LanceDB 目录,写入一个新的 SQLite 文件,并打印交换它们的说明。您的原始数据将被保留,直到您手动删除它。

变更内容:

  • 存储:LanceDB 目录(约 845 个文件) → 单个 .db 文件

  • 依赖:223MB (@lancedb/lancedb + apache-arrow) → 24KB (sqlite-vec)

  • 运行时:放弃 Node.js 支持,需要 Bun (用于 bun:sqlite)


开发

git clone https://github.com/AerionDyseti/vector-memory-mcp.git
cd vector-memory-mcp
bun install

bun run test      # Run all tests
bun run dev       # Watch mode
bun run typecheck # Type checking

查看 CHANGELOG.md 获取发布历史,查看 ROADMAP.md 获取计划功能。


贡献

欢迎贡献!查看 issues 了解我们希望获得帮助的领域。

许可证

MIT - 见 LICENSE


基于 MCP SDK, sqlite-vec 和 Transformers.js 构建

Maintenance

ActivityMaintained
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides persistent local memory functionality for AI assistants, enabling them to store, retrieve, and search contextual information across conversations with SQLite-based full-text search. All data stays private on your machine while dramatically improving context retention and personalized assistance.
    3
    -
  • A
    license
    A
    quality
    D
    maintenance
    Provides AI assistants with long-term semantic memory capabilities through local vector-based storage. Enables storing, recalling, and managing information across sessions with complete privacy using ChromaDB, with no data ever leaving your machine.
    3
    9
    MIT
  • A
    license
    Not graded
    quality
    Not graded
    maintenance
    Provides AI coding agents with persistent, long-term memory through local semantic search and SQLite storage. It enables agents to save and retrieve architectural decisions or project context across different conversation sessions without requiring cloud services.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides persistent AI agent memory using a local vector database for long-term semantic storage and short-term session scratchpads. It enables low-latency memory operations including search, storage, and bulk management without external cloud dependencies.
    -