BuildAutomata内存MCP服务器
通过模型上下文协议(MCP)为AI代理提供持久、版本化的存储系统

这是什么?
BuildAutomata Memory是一个MCP服务器,它为AI代理(如Claude)提供支持 持久、可搜索的内存 这在对话中仍然存在。把它想象成给你的人工智能一个长期记忆系统:
- 🧠 语义搜索 -通过意义而不仅仅是关键字来寻找记忆
- 📚 时间版本控制 -记忆进化的完整历史
- 🏷️ 智能组织 -类别、标签、重要性评分
- 🔄 跨工具同步 -在克劳德桌面、克劳德代码、光标AI之间共享记忆
- 💾 永久存储 -SQLite+可选Qdrant矢量数据库
快速开始
先决条件
- Python 3.10+
- Claude Desktop(用于MCP集成)或任何兼容MCP的客户端
安装
- 克隆此存储库
git clone https://github.com/brucepro/buildautomata_memory_mcp.git
cd buildautomata_memory_mcp-main- 安装依赖项
pip install mcp qdrant-client sentence-transformers- 配置Claude桌面
编辑您的Claude桌面配置(AppData/Roaming/Claude/claude_desktop_config.json 在Windows上):
{
"mcpServers": {
"buildautomata-memory": {
"command": "python",
"args": ["C:/path/to/buildautomata_memory_mcp_dev/buildautomata_memory_mcp.py"]
}
}
}- 重新启动克劳德桌面
就是这样!内存系统将在首次运行时自动创建其数据库。
CLI使用(Claude代码、脚本、自动化)
除了MCP服务器,此仓库还包括 interactive_memory.py -用于直接内存访问的CLI:
# Search memories
python interactive_memory.py search "consciousness research" --limit 5
# Store a new memory
python interactive_memory.py store "Important discovery..." --category research --importance 0.9 --tags "ai,insight"
# View memory evolution
python interactive_memory.py timeline --query "project updates" --limit 10
# Get statistics
python interactive_memory.py stats看 README_CLI.md 获取完整的CLI文档。
快速访问脚本
窗户:
memory.bat search "query"
memory.bat store "content" --importance 0.8Linux/Mac:
./memory.sh search "query"
./memory.sh store "content" --importance 0.8特性
核心能力
- 混合搜索:结合向量相似度(Qdrant)+全文搜索(SQLite FTS5)
- 时间版本控制:每次内存更新都会创建一个新版本-完整的审计跟踪
- 智能衰变:重要性分数根据访问模式随时间衰减
- 元数据:类别、标签、重要性、自定义元数据
- LRU缓存:通过自动缓存管理实现快速重复访问
- 线程安全:具有适当锁定的并发操作
MCP工具暴露
当作为MCP服务器运行时,向Claude提供以下工具:
store_memory-创建新内存update_memory-修改现有内存(创建新版本)search_memories-带过滤器的语义+全文搜索get_memory_timeline-查看完整版本历史记录get_memory_stats-系统统计prune_old_memories-清理旧的/不重要的记忆run_maintenance-数据库优化
建筑
┌─────────────────┐
│ Claude Desktop │
│ (MCP Client) │
└────────┬────────┘
│
┌────▼─────────────────────┐
│ MCP Server │
│ buildautomata_memory │
└────┬─────────────────────┘
│
┌────▼──────────┐
│ MemoryStore │
└────┬──────────┘
│
┌────┴────┬─────────────┬──────────────┐
▼ ▼ ▼ ▼
┌───────┐ ┌────────┐ ┌──────────┐ ┌─────────────┐
│SQLite │ │Qdrant │ │Sentence │ │ LRU Cache │
│ FTS5 │ │Vector │ │Transform │ │ (in-memory) │
└───────┘ └────────┘ └──────────┘ └─────────────┘用例
1.持续的人工智能环境
User: "Remember that I prefer detailed technical explanations"
[Memory stored with category: user_preference]
Next session...
Claude: *Automatically recalls preference and provides detailed response*2.项目连续性
Session 1: Work on project A, store progress
Session 2: Claude recalls project state, continues where you left off
Session 3: View timeline of all project decisions3.研究与学习
- Store research findings as you discover them
- Tag by topic, importance, source
- Search semantically: "What did I learn about neural networks?"
- View how understanding evolved over time4.多工具工作流程
Claude Desktop → Stores insight via MCP
Claude Code → Retrieves via CLI
Cursor AI → Accesses same memory database
= Unified AI persona across all tools想要完整的捆绑包吗?
🎁 获取Gumroad捆绑包
Gumroad版本包括:
- ✅ 优先支持 通过电子邮件
- ✅ 项目支持 帮助项目获得资金。
这个开源版本:
- ✅ 个人/教育/小型企业免费使用(收入\/memory_repos/_/memoryv012.db
## 问题:
我们现在正在使用嵌入式qdrant。您可以通过运行自己的服务器来覆盖此设置。
## 可选:Qdrant设置
对于增强的语义搜索(强烈推荐):
### 选项1:Docker
docker run -p 6333:6333 qdrant/qdrant
### 选项2:手动安装
下载自 [Qdrant发布](https://github.com/qdrant/qdrant/releases)
## 故障排除
### 数据库上的“权限被拒绝”
- 检查 `memory_repos/` 目录权限
- 在Windows上:如果需要,以管理员身份运行
### Claude Desktop不显示工具
1. 检查 `claude_desktop_config.json` 路径正确
1. 验证Python是否在系统PATH中
1. 完全重新启动克劳德桌面
1. 在Claude Desktop中检查日志→ Help → 查看日志
### 导入错误
pip install --upgrade mcp qdrant-client sentence-transformers
## 许可证
**开源(此GitHub版本):**
- 个人、教育和小型企业免费使用(年收入\<10万美元)
- 必须注明原作者(尤登·布鲁斯)
- 有关完整条款,请参阅许可证文件
**商业许可证:**
- 收入超过10万美元的公司:200美元/用户或20000美元/公司(以较低者为准)
- 联系人:sales@brucepro.net
## 支持
### 社区支持(免费)
- GitHub问题: [报告错误或请求功能](https://github.com/brucepro/buildautomata_memory_mcp/issues)
- 讨论: [提问,分享技巧](https://github.com/brucepro/buildautomata_memory_mcp/discussions)
### 优先支持(Gumroad客户)
- 电子邮件:sales@brucepro.net
- 更快的响应时间
- 安装协助
- 自定义配置帮助
## 贡献
欢迎投稿!拜托:
1. 复刻仓库
1. 创建要素分支
1. 进行更改
1. 提交拉取请求
## 鸣谢
**作者** 尤登 布鲁斯
**项目:** 构建自动数据
**年份:** 2025
**内置:**
- [主控程序](https://github.com/anthropics/mcp) -模型上下文协议
- [Qdrant](https://qdrant.tech/) -矢量数据库
- [句子转换](https://www.sbert.net/) -嵌入件
- [SQLite](https://www.sqlite.org/) -持久存储
## 另见
- [模型上下文协议文档](https://docs.anthropic.com/mcp)
- [Qdrant文件](https://qdrant.tech/documentation/)
- [Gumroad捆绑包](https://brucepro1.gumroad.com/l/zizjl) -简易安装版本
______________________________________________________________________
**标记此回购** ⭐ 如果你觉得它有用的话!
**考虑一下 [Gumroad捆绑包](https://brucepro1.gumroad.com/l/zizjl)** 如果你想支持发展。
- [请我喝杯咖啡](https://www.buymeacoffee.com/brucepro)
- [Ko-fi](https://ko-fi.com/F1F7U45XV)