modelscope·@j3k0/mcp-brain-tools
为模型上下文协议(Model Context Protocol)提供了一个可扩展的知识图谱实现,使用 Elasticsearch,使人工智能模型能够存储和查询信息,具备高级搜索功能、类似记忆的行为和多区域架构。
赋予你的 AI 跨对话持久的记忆。 再也不用担心丢失重要的上下文。
MCP Memory 是一个基于 Elasticsearch 的强大知识图谱系统,它让 AI 模型能够在其上下文窗口之外拥有持久的记忆。该系统专为 Model Context Protocol (MCP) 设计,确保你的大型语言模型能够永远记住重要信息,从而创建更加连贯、个性化和有效的 AI 对话。
<p align="center"> <img src="https://via.placeholder.com/800x400?text=MCP+Memory+Visualization" alt="MCP Memory 可视化" width="600"> </p>你是否曾经历过这些与 AI 助手相关的困扰?
MCP Memory 通过创建一个结构化的、可搜索的记忆存储来解决这些问题,它可以无限期地保存上下文。现在,你的 AI 可以与用户建立有意义的长期关系,并在几天、几周甚至几个月的互动中保持一致性。
开始使用非常简单:
# 1. Clone the repository
git clone https://github.com/mcp-servers/mcp-servers.git
cd mcp-servers/memory
# 2. Install dependencies
npm install
# 3. Start Elasticsearch (uses Docker)
npm run es:start
# Note: If you prefer to use your own Elasticsearch installation,
# set the ES_NODE environment variable to point to your Elasticsearch instance
# 4. Build the project
npm run build
MCP Memory 旨在与 Claude Desktop 无缝协作,使 Claude 在所有对话中都具备持久记忆:
复制并配置启动脚本:
仓库中包含一个 launch.example 文件,你可以直接复制:
# 复制示例启动文件
cp launch.example launch.sh
# 编辑 launch.sh 文件以添加你的 Groq API 密钥
# 这是智能内存检索所必需的
nano launch.sh # 或使用你偏好的编辑器
使脚本可执行:
chmod +x launch.sh
在 Claude Desktop 中添加命令:
验证连接:
有关完整的示例和可视化指南,请参阅在线的 Claude Desktop MCP Server 设置指南。
MCP Memory 创建了一个结构化的知识图谱,其中:
当与 LLM 集成时,系统会自动:
对话 1:初始信息
User: My daughter's name is Emma and she's turning 8 next month.
Claude: That's wonderful! Emma will be turning 8 next month. Is there anything special you're planning for her birthday?
(Behind the scenes: Claude stores "Emma" as an entity of type "Person" with observations about her age and birthday timing)
对话 2:几天或几周后
User: I'm thinking about what to get for a gift.
Claude: If you're looking for gift ideas for Emma's 8th birthday coming up, have you considered what her current interests are? At that age, many children enjoy creative items, books, or educational games.
(Behind the scenes: Claude retrieved the entity "Emma", her age, and the fact that her birthday is approaching)
对话 3:生日之后
User: The party went really well on Saturday!
Claude: I'm glad Emma's 8th birthday party was a success on Saturday! Did she enjoy the gifts she received?
(Behind the scenes: Claude updates the observations about Emma, noting that her birthday party occurred on a Saturday and went well)
当用户提到重要信息时,代理会:
当用户提到与存储信息相关的内容时,代理会:
这一切都是自动发生的——用户只需与助手进行正常的对话,而记忆系统则在幕后工作,以跨会话维护上下文。
MCP Memory 包括对实体创建和更新的智能处理:
MCP Memory 包含了一个全面的管理 CLI 用于维护你的知识图谱:
# Search the memory
node dist/admin-cli.js search "Emma birthday"
# View details about a specific entity
node dist/admin-cli.js entity "Emma"
# Back up your entire memory system
node dist/admin-cli.js backup memory-backup.json
将知识组织成独立的领域:
# Create a project-specific memory zone
node dist/admin-cli.js zones add client-acme "ACME Corp Project Knowledge"
# Import data into that zone
node dist/admin-cli.js import acme-data.json client-acme
您还可以通过自然对话指示助手在不同的区域内组织记忆:
创建和使用记忆区域
User: Claude, can you create a new memory zone called "work-project" for storing information about my current work project?
Claude: I've created a new memory zone called "work-project". I'll store information related to your work project in this zone. What would you like me to remember about your project?
User: The project deadline is March 15th, and we're building a new inventory management system.
Claude: I've stored information about your work project in the "work-project" zone, including the March 15th deadline and that you're building an inventory management system. I'll keep future information about this project organized in this zone.
(Behind the scenes: Claude creates a new memory zone and stores project information specifically in that zone)
检索特定区域的信息
User: What do you remember about my work project?
Claude: Based on what we've discussed about your work project, I recall that you're building an inventory management system with a deadline of March 15th.
(Behind the scenes: Claude specifically searches the "work-project" zone for relevant information)
在记忆区域之间切换
User: Claude, let's switch to my "cooking" memory zone now. I want to discuss a recipe.
Claude: I've switched to your "cooki…
通过向量嵌入技术,为项目提供记忆库和RAG上下文支持,以增强代码理解和管理,并与RooCode和Cline集成。
通过全局和分支特定的记忆库,管理跨 Claude AI 会话的项目文档和上下文的服务器,通过结构化的 JSON 文档存储实现一致的知识管理。
快递100 MCP Server提供快递信息查询、快递运费预估比价、快递时效查询(含发货前时效查询与在途动态时效查询)等功能。
一种模型上下文协议服务器,通过在语言模型交互之间高效缓存数据来减少令牌消耗,自动存储和检索信息以最小化冗余令牌使用。
通过集成DeepSeek R1的高级推理引擎以处理复杂推理任务,从而增强Claude推理能力的服务器。
通过简化的SOLID架构,启用提示词的创建、管理和模板化,允许用户按类别组织提示词并在运行时填充模板。