MCP Catalogs
首页

memory

官方

by modelcontextprotocol·85,748·综合分 77

一个实现持久化记忆的 MCP 服务器,使用本地知识图谱让 AI 模型能在聊天间记住用户信息。

knowledge-graphai-llmproductivity
10,713
Forks
459
活跃 Issue
本月
最近提交
2 天前
收录于

概述

记忆 MCP 服务器使用本地知识图谱架构提供持久化记忆的健壮实现。它允许 Claude 等 AI 模型在多次对话中记住用户信息,通过存储实体、关系和观察来实现。服务器提供了一套全面的工具,用于在知识图谱中创建和管理实体、关系和观察,实现复杂的记忆管理。实现结构良好,实体(节点)、关系(边)和观察(节点属性)之间有清晰分离,提供了表示复杂知识结构的灵活性。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:通过记住用户偏好、历史和关系来个性化 AI 助手交互
:构建维护对话历史的上下文感知聊天应用
:创建在 AI 模型会话间持久化的知识库
:记忆服务器使用什么存储格式?
:服务器如何在不同 AI 模型会话间保持记忆持久化?

什么时候选它

如果您需要 AI 助手在聊天会话间记住用户信息,尤其是在 TypeScript 环境中工作或需要自托管解决方案而不依赖外部服务时,选择此服务器。

什么时候不要选它

当需要超出简单事实和关系的复杂推理能力的高记忆系统,或需要与现有数据库集成而非基于文件存储时,避免使用此服务器。

此 server 暴露的工具

从 README 抽取出 9 个工具
  • create_entities

    Create multiple new entities in the knowledge graph

  • create_relations

    Create multiple new relations between entities

  • add_observations

    Add new observations to existing entities

  • delete_entities

    Remove entities and their relations

  • delete_observations

    Remove specific observations from entities

  • delete_relations

    Remove specific relations from the graph

  • read_graph

    Read the entire knowledge graph

  • search_nodes

    Search for nodes based on query

  • open_nodes

    Retrieve specific nodes by name

可对比工具

mcp-pineconemcp-neo4jvectordb-mcpmcp-redislocal-storage-mcp

安装

安装

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 讨论

开发者社区最近的相关讨论。

memory 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。