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 分