io.github.CloudCorpRecords/graphmind

السجل الرسمي الذكاء الاصطناعي والوكلاء

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

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package @reneturcios/graphmind
Claude Code
claude mcp add graphmind -- npx -y @reneturcios/graphmind@0.1.0 mcp
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "graphmind": {
            "command": "npx",
            "args": [
                "-y",
                "@reneturcios/graphmind@0.1.0",
                "mcp"
            ]
        }
    }
}
OCI package ghcr.io/cloudcorprecords/graphmind:0.1.0
Claude Code
claude mcp add graphmind -- docker run -i --rm ghcr.io/cloudcorprecords/graphmind:0.1.0 mcp
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "graphmind": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/cloudcorprecords/graphmind:0.1.0",
                "mcp"
            ]
        }
    }
}

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. graphmind
  2. Install
  3. Where the graph lives
  4. CLI
  5. MCP server
  6. Development
  7. License

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

npx @reneturcios/graphmind read

Or run the container image:

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:

{
  "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:

# Print the whole graph as JSON
graphmind read

# Print the subgraph matching a search term
graphmind search lisbon

# Point at a specific store file
GRAPHMIND_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:

npx -y @reneturcios/graphmind mcp

MCP client configuration:

{
  "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

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

License

MIT — see LICENSE.

الأسئلة الشائعة

ما هو io.github.CloudCorpRecords/graphmind؟

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

كيف أثبّت io.github.CloudCorpRecords/graphmind؟

يعمل على جهازك. في Claude Code: claude mcp add graphmind -- npx -y @reneturcios/graphmind@0.1.0 mcp. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.CloudCorpRecords/graphmind إلى مفتاح API؟

لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.

هل io.github.CloudCorpRecords/graphmind مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.CloudCorpRecords/graphmind؟

ينشره CloudCorpRecords. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.