memory
官方by modelcontextprotocol·★ 85,748·综合分 77
一个实现持久化记忆的 MCP 服务器,使用本地知识图谱让 AI 模型能在聊天间记住用户信息。
概述
记忆 MCP 服务器使用本地知识图谱架构提供持久化记忆的健壮实现。它允许 Claude 等 AI 模型在多次对话中记住用户信息,通过存储实体、关系和观察来实现。服务器提供了一套全面的工具,用于在知识图谱中创建和管理实体、关系和观察,实现复杂的记忆管理。实现结构良好,实体(节点)、关系(边)和观察(节点属性)之间有清晰分离,提供了表示复杂知识结构的灵活性。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
如果您需要 AI 助手在聊天会话间记住用户信息,尤其是在 TypeScript 环境中工作或需要自托管解决方案而不依赖外部服务时,选择此服务器。
什么时候不要选它
当需要超出简单事实和关系的复杂推理能力的高记忆系统,或需要与现有数据库集成而非基于文件存储时,避免使用此服务器。
此 server 暴露的工具
从 README 抽取出 9 个工具create_entitiesCreate multiple new entities in the knowledge graph
create_relationsCreate multiple new relations between entities
add_observationsAdd new observations to existing entities
delete_entitiesRemove entities and their relations
delete_observationsRemove specific observations from entities
delete_relationsRemove specific relations from the graph
read_graphRead the entire knowledge graph
search_nodesSearch for nodes based on query
open_nodesRetrieve specific nodes by name
可对比工具
安装
安装
Claude Desktop
添加到你的 claude_desktop_config.json 文件中:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-memory"
]
}
}
}VS Code
使用一键安装按钮或在 .vscode/mcp.json 中手动配置:
{
"servers": {
"memory": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-memory"
]
}
}
}Docker
{
"mcpServers": {
"memory": {
"command": "docker",
"args": ["run", "-i", "-v", "claude-memory:/app/dist", "--rm", "mcp/memory"]
}
}
}FAQ
- 记忆服务器使用什么存储格式?
- 服务器默认使用 JSONL(JSON Lines)格式存储知识图谱数据。存储路径可通过 MEMORY_FILE_PATH 环境变量自定义。
- 服务器如何在不同 AI 模型会话间保持记忆持久化?
- 记忆服务器维护一个持久化的知识图谱,它在会话间仍然存在。实体、关系和观察数据存储在本地文件中,服务器启动时会加载数据,使 AI 模型能够访问之前交互中积累的信息。
Hacker News 讨论
开发者社区最近的相关讨论。
- 帖子 by vinnyglennon · 2025-03-20
memory 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。