Skip to main content
Glama

GraphMemo

GraphMemo gives MCP agents persistent memory across sessions. A text search finds starting memories, and Relate follows relationships to retrieve context that can contain entirely different words.

Setup and run

Use Node.js 20 or newer on a platform supported by the native Relate SDK.

npm install --cache /tmp/npm-cache-relate
npm run demo
npm test
npm run test:mcp
npm start

The server uses the official MCP TypeScript SDK and communicates over stdio. Configure your MCP host to launch the entry point directly. Replace the paths in this example with absolute paths on your machine.

{
  "mcpServers": {
    "graphmemo": {
      "command": "node",
      "args": ["/absolute/path/to/graphmemo/src/server.js"],
      "env": {
        "GRAPHMEMO_DB_PATH": "/absolute/path/to/data/graphmemo.rl"
      }
    }
  }
}

The default database is data/graphmemo.rl relative to the process working directory. Set GRAPHMEMO_DB_PATH=:memory: for a disposable session. Use one server process per persistent database path and reuse the path across sequential sessions. The server checkpoints persistent writes.

Related MCP server: mcp-memory

Tools

Tool

Arguments

Result

remember

text (1–8,000 characters), optional kind (fact, event, or preference, defaults to fact)

Stored memory with UUID and creation time

recall

query (1–1,000 characters), optional depth (0–3, defaults to 2) and limit (1–50, defaults to 10)

Ordered matches with hop distance and path evidence for connected memories

relate

fromId, toId, and kind (1–80 characters)

Directed relationship between two existing memories. Repeating the same triple reuses the edge

forget

id

Whether the memory was deleted, along with its incident relationships

health

None

Whether a live database query succeeded, the backend, and whether storage is persistent

The embedded database stores Memory nodes and directed RELATED edges. The edge's kind property carries the supplied relationship label. Recall starts with a case-insensitive substring search and expands from direct matches using a bounded Cypher traversal in either direction. It returns direct matches first, newest first, then each connected memory once by shortest hop distance. Each expanded result includes path.ids in traversal order and path.kinds in the corresponding edge order. Set depth: 0 for text-only recall.

Demo and tests

npm run demo runs a scripted conversation against a temporary Relate database using the same storage operations as the MCP tools. In the first process, recall for “Mina” finds only the lunch booking. Two links connect that booking to the Atlas team and its dietary requirement. A second process reopens the database and recalls both connected memories, supporting the scripted answer that Mina should look for a downtown venue with vegan options.

npm test verifies the Relate operations in memory. npm run test:mcp uses an official MCP client over stdio and exercises tool discovery, validation, and persistent recall across server restarts. See REPORT.md for the verification results from this workspace.

License and AI-tool disclosure

GraphMemo is MIT licensed. Its embedded Relate dependency is Apache-2.0 licensed. Relate license

OpenAI Codex was used to implement the server, tests, and demo, write the documentation, and run local verification.

Available Tools

5 tools
forgetA
DestructiveIdempotent

Delete a memory and all its incident relationships.

Inputs: id (required).

healthB
Read-only

Run a database query and report the storage mode.

Inputs: no named parameters.

recallC
Read-only

Find memories by text and follow relationships in either direction.

Inputs: query (required), depth, limit.

relateA
Idempotent

Connect two existing memories with a directed, labeled relationship.

Inputs: kind (required), toId (required), fromId (required).

rememberB

Store a fact, event, or preference and return its ID.

Inputs: text (required), kind.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: remember stores, recall searches/traverses, relate connects memories, forget deletes, and health reports storage status. There is no meaningful overlap between the tools.

    Naming Consistency4/5

    Four tools use consistent single-verb names (remember, recall, relate, forget), which are readable and predictable. The health tool is a noun rather than a verb, a minor deviation from the otherwise consistent pattern.

    Tool Count5/5

    Five tools are well-scoped for a memory graph server, covering storage, retrieval, relationships, deletion, and health. Each tool earns its place without unnecessary surface area.

    Completeness4/5

    The set covers the core lifecycle: create, search/traverse, relate, and delete memories, plus health. A dedicated update/edit operation for existing memories is missing, but most workflows can be handled through the existing tools.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides persistent, searchable memory for MCP-compatible agents, enabling recall by meaning, automatic decay, trust scoring, and cross-agent handoffs.
      5
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides persistent memory with semantic search for MCP-based AI agents, enabling them to store and recall information across sessions using vector embeddings.
      4
      1
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Provides persistent, graph-based memory for AI agents via MCP, enabling semantic search, wikilink traversal, reminders, and injection protection.
      14
      34
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      Provides persistent, multi-tenant knowledge graph memory for MCP-capable AI tools, allowing them to recall and store entities, observations, and relations across sessions with keyword search.
      10
      3
      MIT