对话记忆搜索 MCP Server — 自动导入 Claude Code / WorkBuddy 对话,FTS5 全文搜索,开箱即用
Project description
Rolling Memory
对话记忆搜索 MCP Server。自动导入你的 Claude Code 和 WorkBuddy 对话历史,FTS5 全文搜索,零配置。
功能
8 个 MCP 工具,开箱即用:
| 工具 | 功能 |
|---|---|
memory_search |
搜索对话(关键词 / 语义) |
memory_recent |
最近对话活动 |
memory_segments |
对话段列表 |
memory_relations |
段间关系链 |
memory_detail |
段详情 + 关系 |
memory_stats |
数据统计概览 |
memory_timeline |
屏幕时间线 |
memory_query |
自由 SQL 查询(只读) |
三阶段能力:
| 阶段 | 能力 | 条件 |
|---|---|---|
| P1 | FTS5 关键词搜索 + 时间过滤 + 最近活动 | 默认,开箱即用 |
| P2 | BGE-M3 语义搜索 | 需要 GPU + pip install mcp-rolling-memory[semantic](正在整理中) |
| P3 | 段落级搜索 + 摘要 + 关系链 | 需要感知引擎跑完索引(正在整理中) |
安装
方式一:Claude Code + uvx(最简单,推荐)
一行搞定,无需 pip install:
claude mcp add rolling-memory -- uvx mcp-rolling-memory
方式二:Claude Code + pip install
pip install mcp-rolling-memory
claude mcp add rolling-memory -- python -m rolling_memory.server
方式三:其他 MCP 客户端(Cursor / Windsurf 等)
在客户端的 MCP 配置中添加:
{
"mcpServers": {
"rolling-memory": {
"command": "uvx",
"args": ["mcp-rolling-memory"]
}
}
}
方式四:从源码
git clone https://github.com/1144g7/rolling-memory.git
cd rolling-memory
pip install -e .
claude mcp add rolling-memory -- python -m rolling_memory.server
注意事项
claude mcp add会把配置写入~/.claude.json,不要手动创建.mcp.json文件,Claude Code 无法识别- 添加后需要完全退出 Claude Code 再重新打开(不是新开对话,是退出应用本身)
- 重新打开后运行
/mcp检查是否显示 rolling-memory
首次启动
MCP Server 首次启动时会自动:
- 创建 SQLite 数据库(
~/.rolling-memory/memory.db) - 扫描
~/.claude/projects/下的 Claude Code 对话 - 扫描
~/.workbuddy/projects/下的 WorkBuddy 对话 - 建立 FTS5 全文索引
整个过程无需手动操作,通常几秒钟完成。
使用示例
在 Claude Code 中直接提问:
- "我之前聊过什么关于 Python 装饰器的内容?"
- "最近一周讨论了哪些话题?"
- "帮我找一下之前讨论的那个数据库设计方案"
数据存储
- 数据库位置:
~/.rolling-memory/memory.db(可通过ROLLING_MEMORY_DB环境变量修改) - 只读取本地数据,不上传任何内容
- 纯 SQLite,无外部依赖
支持的数据源
| 数据源 | 路径 | 状态 |
|---|---|---|
| Claude Code | ~/.claude/projects/ |
自动扫描 |
| WorkBuddy | ~/.workbuddy/projects/ |
自动扫描 |
依赖
- Python >= 3.10
mcp(MCP Python SDK)
可选:
numpy+FlagEmbedding(语义搜索,P2)
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mcp_rolling_memory-0.1.2.tar.gz
(12.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_rolling_memory-0.1.2.tar.gz.
File metadata
- Download URL: mcp_rolling_memory-0.1.2.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91aa3ecfa63c9d28fe04fde561a9e2704b12e11eb945bbdfdbb562e687a7822a
|
|
| MD5 |
5bf35a62d6043819924fc11c8080285f
|
|
| BLAKE2b-256 |
592e5a9d896553c5cda8303cf4b40c92636a9ab5f4fe029939f1d5099fa2a3e6
|
File details
Details for the file mcp_rolling_memory-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mcp_rolling_memory-0.1.2-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07ea8b0d0e25ad46007078a111ed37fa44eacab955673073f22a198df0213d8f
|
|
| MD5 |
fde90d45d9aad13de2f87d3d569ecb6a
|
|
| BLAKE2b-256 |
1da7e9185771b8a678d0c30b0d7c0a604c3f347c3c62f9fc157d7b3783de7f2c
|