使用说明
内存插件
一个基于Python的内存插件,使用SQLite进行持久存储。
概述
此插件使用SQLite作为后端数据库提供内存存储功能。它旨在跨会话持久地存储和管理数据。
设置
-
环境配置
创建一个
.env根目录中的文件,配置如下:MEMORY_DB_PATH=/path/to/your/memory.sqlite您可以使用提供的
.env.example作为模板:cp .env.example .env -
依赖项
该项目需要Python,并使用SQLite进行数据存储。确保你的系统上安装了Python。
配置
-
将.env.example.重命名为.env,并根据需要编辑值:
-
找到claude_desktop_config.json,并使用下面的模板将“MQTT Bridge”添加到mcpServers部分。 MacOs:~/库/应用支持/Claude/Claude_desktop_config json Windows:C:\用户<用户名>\AppData\Roaming\Claude\Claude_desktop_config json
{
"mcpServers": {
"memory_recall": {
"command": "/path/to/python3",
"args": [
"/path/2/your/cloned/repository/memory_plugin.py"
]
}
}
}
SQLite数据库路径是通过以下方式配置的 MEMORY_DB_PATH 环境变量。这应该指向您希望存储SQLite数据库文件的位置。
当前配置:
MEMORY_DB_PATH=/path/to/your/dabatase.sqlite
用法
基本用法
请参阅memory_plugin.py文件中的@mcp.resource和@mcp.tool修饰函数
在聊天中键入的示例:
memory://load在新的聊天开始时加载保存的记忆Save into the memory, under aNewName category, the following: a new message with important info to rememberSave the relevant points of the conversation into the memory under aNewName category
发展
在为该项目做出贡献时:
- 确保不要提交敏感信息
- 保持你的
.env文件私有 - 使用
.env.example用于共享模板配置
许可证
该项目根据MIT许可证获得许可。