
一个轻量级、本地的检索增强生成(RAG)内存存储系统,适用于MCP代理。Memory-Plus允许您的代理记录、检索、更新和可视化持久“记忆”——笔记、想法和会话上下文——跨越多个运行。
🏆 第一名 在 Infosys剑桥AI中心黑客马拉松!
resources 来教您的AI何时(以及何时不)回忆过去的互动。Google API 密钥
从 Google AI Studio 获取,并设置为环境中的 GOOGLE_API_KEY。
<details> <summary><b>设置Google API密钥示例</b></summary>注意,我们将仅使用此API密钥的
Gemini 嵌入API,因此对于您来说是 完全免费 的!
# macOS/Linux
export GOOGLE_API_KEY="<YOUR_API_KEY>"
# Windows (PowerShell)
setx GOOGLE_API_KEY "<YOUR_API_KEY>"
</details>
UV 运行时 需要用于服务MCP插件。
<details> <summary><b>安装UV运行时</b></summary>pip install uv
或者通过shell脚本安装:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
</details>
点击下方徽章以自动在VS Code中安装并配置Memory-Plus:
这将在您的 settings.json 中添加以下内容:
{
"mcpServers": {
//..., 您的其他MCP服务器
"memory-plus": {
"command": "uvx",
"args": [
"-q",
"memory-plus@latest"
],
}
}
}
对于 cursor,转到 文件 -> 首选项 -> 光标设置 -> MCP 并添加上述配置。
如果您没有将 GOOGLE_API_KEY 添加到您的秘密/环境变量中,可以添加如下:
"env": {
"GOOGLE_API_KEY": "<YOUR_API_KEY>"
}
就在 memory-plus 字典中的 args 数组之后。
对于 Cline,在您的 cline_mcp_settings.json 中添加以下内容:
{
"mcpServers": {
//..., 您的其他MCP服务器
"memory-plus": {
"disabled": false,
"timeout": 300,
"command": "uvx",
"args": [
"-q",
"memory-plus@latest"
],
"env": {
"GOOGLE_API_KEY": "${{ secrets.GOOGLE_API_KEY }}"
},
"transportType": "stdio"
}
}
}
对于其他IDE,应该与上述类似。
使用MCP Inspector,您可以本地测试memory-plus服务器。
git clone https://github.com/Yuchen20/Memory-Plus.git
cd Memory-Plus
npx @modelcontextprotocol/inspector fastmcp run run .\\memory_plus\\mcp.py
或者,如果您希望在实际聊天会话中使用此MCP。在 agent.py 中有一个模板聊天机器人。
# 克隆仓库
git clone https://github.com/Yuchen20/Memory-Plus.git
cd Memory-Plus
# 安装依赖
pip install uv
uv pip install fast-agent-mcp
uv run fast-agent setup
设置 fastagent.config.yaml 和 fastagent.secrets.yaml 文件,使用您自己的API密钥。
# 运行代理
uv run agent_memory.py
如果您有任何功能请求,请随时通过添加新问题或在 功能请求 中添加新条目来提出。
本项目根据 Apache 许可证 2.0 授权。详情见 LICENSE。