Graphmind

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Oct 29, 2026

Persistent knowledge graph: entities, relations, and observations for agents.

已验证STDIO仅桌面文件与存储知识与记忆

概览

AI 生成的概览

本地 MCP 服务器,为助手提供持久化知识图谱:实体、带类型的关系和观察记录,全部保存在一个 JSON 文件中。

可以做什么
  • 创建带类型和纯文本观察记录的实体,并在已有实体之间添加带类型的关系
  • 向已有实体追加观察记录,自动跳过重复内容
  • 删除实体、观察记录或关系
  • 读取整张图谱,或按名称打开指定实体及其之间的关系
  • 按子串(不区分大小写)搜索实体名称、类型和观察记录
适用场景
适合希望助手跨会话记住事实、又不想运行数据库或注册服务的场景,也适合需要把记忆保存为可读、可手工编辑、可纳入版本管理的 JSON 文件的情况。
运行要求
通过 npx 或 Docker 镜像以 stdio 在本地运行;无需账号、API 密钥或网络服务。存储路径由环境变量 GRAPHMIND_FILE 指定,默认是工作目录下的 ./graphmind.json。使用 Docker 时需挂载卷到工作目录,图谱才能在多次运行间保留。
安装前请注意
这些工具会写入和删除图谱文件,删除实体还会一并删除所有涉及它的关系。每次变更后文件都会被重写,请把 GRAPHMIND_FILE 指向你愿意被修改的路径。实体名称即身份,重名会被静默跳过,重命名需先删除再重建。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Graphmind,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

graphmind

graphmind is a small, durable memory for agents: a knowledge graph you can build up a fact at a time and query back later. You record entities — people, places, projects, anything with a name — each with a type and a growing list of plain-text observations, and you connect them with typed relations ("Alice — lives_in → Lisbon"). The whole graph lives in one JSON file on disk, so the memory survives restarts and stays readable, diffable, and editable by hand.

There is no database to run and no service to sign up for. The graph file is the product.

Install

bash
npx @reneturcios/graphmind read

Or run the container image:

bash
docker run -i ghcr.io/cloudcorprecords/graphmind

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead. If you run the container, mount a volume over the working directory if you want the graph file to persist between runs.

Where the graph lives

The store file path comes from the GRAPHMIND_FILE environment variable and defaults to ./graphmind.json in the current working directory. The file is loaded when the server (or a CLI command) starts, and it is rewritten after every change, so what is on disk is always the full current graph:

json
{  "entities": [    { "name": "Alice", "entityType": "person", "observations": ["Lives in Lisbon"] }  ],  "relations": [    { "from": "Alice", "to": "Lisbon", "relationType": "lives_in" }  ]}

CLI

The CLI is a read/inspect face over the same store file the MCP server writes:

bash
# Print the whole graph as JSONgraphmind read
# Print the subgraph matching a search termgraphmind search lisbon
# Point at a specific store fileGRAPHMIND_FILE=~/notes/graph.json graphmind read
graphmind --version

Exit codes: 0 on success, 1 when the store cannot be read or written, 2 for usage errors.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/graphmind mcp

MCP client configuration:

json
{  "mcpServers": {    "graphmind": {      "command": "npx",      "args": ["-y", "@reneturcios/graphmind", "mcp"],      "env": { "GRAPHMIND_FILE": "/path/to/graphmind.json" }    }  }}

Tools

ToolInputWhat it does
create_entitiesentities: array of {name, entityType, observations}Adds entities whose names are not already taken. Existing names are skipped and the stored entity is left untouched. Returns only the entities actually created.
create_relationsrelations: array of {from, to, relationType}Adds relations whose exact triple is not already present. Returns only the relations actually created.
add_observationsobservations: array of {entityName, contents}Appends observation strings to existing entities, skipping strings the entity already has. Returns what was added, per entity.
delete_entitiesentityNames: array of stringsRemoves the named entities and every relation that touches any of them.
delete_observationsdeletions: array of {entityName, observations}Removes the listed observation strings from the named entities.
delete_relationsrelations: array of {from, to, relationType}Removes relations matching the given exact triples.
read_graph(none)Returns the entire graph: all entities and all relations.
search_nodesquery: stringCase-insensitive substring search over entity names, types, and observations. Returns the matching entities plus the relations whose endpoints both matched.
open_nodesnames: array of stringsReturns the named entities plus the relations between them. Unknown names are skipped.

Behaviour worth knowing

  • Names are identity. An entity is its name; creating a second entity with the same name does nothing. Rename by deleting and recreating.
  • Relations need real endpoints. create_relations requires both the from and to entities to already exist, and fails the whole call if one is missing — no stub entities are invented, so a typo surfaces immediately instead of quietly corrupting the graph.
  • Observations are a set, in order. Adding a string an entity already carries is a no-op; new strings append in the order given.
  • Deletes cascade only from entities. Deleting an entity removes its relations; deleting observations or relations never touches anything else.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no networknpm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

来源:README.md,提交 f676d42

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 29, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分