
t1nker-1220/memories-with-lessons-mcp-server 是从 https://github.com/t1nker-1220/memories-with-lessons-mcp-server. 导入的 MCP 服务器候选
概览
t1nker-1220/memories-with-lessons-mcp-server 是从 https://github.com/t1nker-1220/memories-with-lessons-mcp-server. 导入的 MCP 服务器候选
概述(AI 翻译)
基于本地知识图谱的基本持久记忆实现。这使 Claude 能够在聊天中记住用户信息,并通过课程系统从过去的错误中学习。
核心概念
实体
实体是知识图谱中的主要节点。每个实体具有:
- 唯一名称(标识符)
- 实体类型(例如,“人”、“组织”、“事件”)
- 观察列表
示例:
关系
关系定义了实体之间的有向连接。它们总是以主动语态存储,描述实体之间如何相互作用或关联。
示例:
观察
观测是关于一个实体的离散信息片段。它们包括:
- 以字符串形式存储
- 附属于特定实体
- 可以独立添加或移除
- 应为原子(每个观察点一个事实)
示例:
课程
课程是捕捉关于错误及其解法知识的特殊实体。每个课程包含:
- 唯一名称(标识符)
- 错误模式信息(类型、消息、上下文)
- 解法步骤与验证
- 成功率追踪
- 环境背景
- 元数据(严重度、时间戳、频率)
示例:
API
工具
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Knowledge Graph Memory Server
A basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats and learn from past errors through a lesson system.
Core Concepts
Entities
Entities are the primary nodes in the knowledge graph. Each entity has:
- A unique name (identifier)
- An entity type (e.g., “person”, “organization”, “event”)
- A list of observations
Example:
{
"name": "John_Smith",
"entityType": "person",
"observations": ["Speaks fluent Spanish"]
}
Relations
Relations define directed connections between entities. They are always stored in active voice and describe how entities interact or relate to each other.
Example:
{
"from": "John_Smith",
"to": "Anthropic",
"relationType": "works_at"
}
Observations
Observations are discrete pieces of information about an entity. They are:
- Stored as strings
- Attached to specific entities
- Can be added or removed independently
- Should be atomic (one fact per observation)
Example:
{
"entityName": "John_Smith",
"observations": [
"Speaks fluent Spanish",
"Graduated in 2019",
"Prefers morning meetings"
]
}
Lessons
Lessons are special entities that capture knowledge about errors and their solutions. Each lesson has:
- A unique name (identifier)
- Error pattern information (type, message, context)
- Solution steps and verification
- Success rate tracking
- Environmental context
- Metadata (severity, timestamps, frequency)
Example:
{
"name": "NPM_VERSION_MISMATCH_01",
"entityType": "lesson",
"observations": [
"Error occurs when using incompatible package versions",
"Affects Windows environments specifically",
"Resolution requires version pinning"
],
"errorPattern": {
"type": "dependency",
"message": "Cannot find package @shadcn/ui",
"context": "package installation"
},
"metadata": {
"severity": "high",
"environment": {
"os": "windows",
"nodeVersion": "18.x"
},
"createdAt": "2025-02-13T13:21:58.523Z",
"updatedAt": "2025-02-13T13:22:21.336Z",
"frequency": 1,
"successRate": 1.0
},
"verificationSteps": [
{
"command": "pnpm add shadcn@latest",
"expectedOutput": "Successfully installed shadcn",
"successIndicators": ["added shadcn"]
}
]
}
API
Tools
- create_entities
- Create multiple new entities in the knowledge graph
- Input:
entities(array of objects)- Each object contains:
name(string): Entity identifier
- Each object contains:
安装
docker run -i -v claude-memory:/app/dist --rm mcp/memory配置
{
"mcpServers": {
"memory": {
"command": "docker",
"args": ["run", "-i", "-v", "claude-memory:/app/dist", "--rm", "mcp/memory"]
}
}
}