Skip to main content

对话记忆搜索 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(推荐)

claude mcp add rolling-memory -- python -m rolling_memory.server

或者一行用 uvx(无需 pip install):

claude mcp add rolling-memory -- uvx mcp-rolling-memory

其他 MCP 客户端(Cursor / Windsurf 等)

{
  "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

首次启动

MCP Server 首次启动时会自动:

  1. 创建 SQLite 数据库(~/.rolling-memory/memory.db
  2. 扫描 ~/.claude/projects/ 下的 Claude Code 对话
  3. 扫描 ~/.workbuddy/projects/ 下的 WorkBuddy 对话
  4. 建立 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.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_rolling_memory-0.1.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_rolling_memory-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_rolling_memory-0.1.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for mcp_rolling_memory-0.1.0.tar.gz
Algorithm Hash digest
SHA256 770142136e1370bed5b614f068bf04cb75e4d73bc81a7a4b4b84ab2452da581c
MD5 f1dd2bb5981ef289e1b20ce66353808f
BLAKE2b-256 9a4a11dcdcacf1190c5085f75c9e1b47ca0675ffe6b7e306a8b79ce4d9366351

See more details on using hashes here.

File details

Details for the file mcp_rolling_memory-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_rolling_memory-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8938ab8d6377eaca277bd3c76863e814bb0c3a94f8742a96c2a186ce5af8a9dc
MD5 f574bdca8b2689b2ec5b56c9f853b84f
BLAKE2b-256 9589fd5203396a1ed9220aa7273791d00580c468df3a02e6ce918981612c2fcd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page