内存 MCP 服务器
模型上下文协议 (MCP) 服务器提供知识图谱功能,用于管理内存中的实体、关系和观察,并具有严格的验证规则以维护数据一致性。
安装
在 Claude Desktop 中安装服务器:
数据验证规则
实体名称
必须以小写字母开头
可以包含小写字母、数字和连字符
最大长度为 100 个字符
在图表中必须是唯一的
有效名称示例:
python-project
、meeting-notes-2024
、user-john
实体类型
支持以下实体类型:
person
:人类实体concept
:抽象的想法或原则project
:工作计划或任务document
:任何形式的文件tool
:软件工具或实用程序organization
:公司或团体location
:物理或虚拟位置event
:有时限的事件
观察
非空字符串
最大长度为 500 个字符
每个实体必须是唯一的
应为事实和客观的陈述
包含相关时间戳
关系
支持以下关系类型:
knows
:人与人之间的联系contains
:父母/子女关系uses
:实体利用另一个实体created
:作者/创作关系belongs-to
:成员资格/所有权depends-on
:依赖关系related-to
:一般关系
附加关系规则:
源实体和目标实体必须存在
不允许自指关系
不允许循环依赖
必须使用预定义的关系类型
用法
服务器提供了管理知识图谱的工具:
获取实体
获取图表
创建实体
添加观察
创建关系
搜索记忆
搜索功能支持:
时间查询(例如“最近”、“最后”、“最新”)
活动查询(例如“锻炼”、“运动”)
常规实体搜索
具有 80% 相似度阈值的模糊匹配
加权搜索范围:
实体名称(权重:1.0)
实体类型(权重:0.8)
观察结果(权重:0.6)
删除实体
删除关系
刷新内存
错误类型
服务器使用以下错误类型:
NOT_FOUND
:未找到实体或资源VALIDATION_ERROR
:输入数据无效INTERNAL_ERROR
:服务器端错误ALREADY_EXISTS
:资源已存在INVALID_RELATION
:实体之间的关系无效
响应模型
所有工具都使用以下模型返回类型化的响应:
实体响应
GraphResponse
操作响应
发展
运行测试
添加新功能
更新
validation.py
中的验证规则在
tests/test_validation.py
中添加测试在
knowledge_graph_manager.py
中实现更改
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
提供知识图谱功能,用于管理内存中的实体、关系和观察,并使用严格的验证规则来维护数据一致性。
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityProvides tools for managing quantitative research knowledge graphs, enabling structured representation of research projects, datasets, variables, hypotheses, statistical tests, models, and results.Last updated -68
- AsecurityFlicenseAqualityProvides tools for managing qualitative research knowledge graphs, enabling structured representation of research projects, participants, interviews, observations, codes, themes, and findings.Last updated -66
- -securityFlicense-qualityEnables storage and retrieval of knowledge in a graph database format, allowing users to create, update, search, and delete entities and relationships in a Neo4j-powered knowledge graph through natural language.Last updated -3
- -securityFlicense-qualityProvides persistent graph memory with automatic disk storage for building knowledge graphs, storing entity relationships, and maintaining context across sessions.Last updated -