GraphMemory
Provides persistent graph memory backed by Relate, Neo4j's embedded open-source graph database, using Cypher for storing entities, relationships, and notes, with multi-hop recall, shortest-path queries, search, and memory statistics.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
GraphMemory — persistent graph memory for AI agents
AI agents forget everything when the session ends. GraphMemory gives an agent a memory that survives: facts, entities and the relationships between them, stored as a property graph in Relate — Neo4j's embedded, open-source graph database — in a single local store. No server, no account, no network.
An agent teaches the memory in one session (remember, link, note)
and recalls it in the next — including multi-hop recall: "How are Panji
and Neo4j connected?" is answered by traversing the graph
(Panji → GraphMemory → Relate → Neo4j), not by keyword search.
Built for the Relate by Neo4j Hackathon 2026 (topic: relate).
Why a graph?
Agent memory is not a bag of documents — it is connected context: people work on projects, projects use tools, tools are made by organizations. A graph database stores those connections natively, so recall can follow them: direct neighbours, everything reachable within N hops, and the shortest path between any two things the agent knows.
Related MCP server: Graph-Mem MCP
Quick start
pip install -r requirements.txt # installs relate-db
python demo.py # two sessions, one memory
python test_graphmemory.py # library + MCP round-trip testsThe demo runs session 1 (teach), exits the process, then runs session 2
as a separate process — which recalls everything anyway, because the
graph lives in the Relate store demo.rl on disk.
Use it from an MCP host
GraphMemory ships an MCP server (stdio, JSON-RPC) with seven tools:
remember_entity, link_entities, add_note, recall, find_path,
search_memory, memory_stats.
python mcp_server.py my-memory.rlPoint any MCP-compatible host at that command and the host's agent gains a persistent memory shared across sessions.
CLI
python cli.py --store demo.rl ingest examples/notes
python cli.py --store demo.rl ask "what is connected to Relate?"
python cli.py --store demo.rl ask "how are Panji and Neo4j connected?"
python cli.py --store demo.rl stats
python cli.py --store demo.rl export graph.json # then open visualize.htmlingest turns a folder of Markdown notes into connected context:
[[wiki links]] and `backticked` terms become entities, documents
become nodes, and entities mentioned together become related.
How it uses Relate
Embedded Python API (
import relate, packagerelate-db1.2.0): the engine runs in-process — zero deployment.Cypher for everything:
MERGEupserts, variable-length traversal ([:RELATES*1..2]) for recall,shortestPathfor connection queries.Persistent single-file/directory store (
.rl) with one writer — the memory is a file you can copy, back up, and version.The MCP server is a thin JSON-RPC layer over the same library, so the CLI, the tests, and any MCP host all share one memory implementation.
Layout
File | What it is |
| The memory library (schema, ingest, queries) |
| MCP server exposing the memory as agent tools |
| Command-line demo ( |
| Two-session persistence demo |
| Single-file graph visualizer for an exported JSON |
| Sample Markdown knowledge base |
| Tests: library, persistence, MCP round-trip |
AI use disclosure
This project was built with substantial help from an AI coding assistant (Muse), as the hackathon rules allow: the assistant wrote code from a human-written design, and every feature was verified by running the tests and demos above. The idea, design decisions, and submission are the author's.
License
Apache-2.0 (see LICENSE). Relate itself is Apache-2.0 by Neo4j.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Persistent, portable memory for AI assistants — your private memory graph, from any MCP client.
Hosted memory for AI agents over MCP. One memory shared by all your agents.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that gives AI agents and teams persistent, shared memory using a knowledge graph with vector embeddings, automatic consolidation of related facts, and hybrid search.3-
- AlicenseNot gradedqualityCmaintenanceA universal MCP server providing persistent, structured memory through a knowledge graph with graph storage, semantic vector search, and multi-hop traversal for AI agents and IDEs.60 PyPI1MIT
- AlicenseNot gradedqualityBmaintenanceMCP server providing persistent AI memory with four-tier retrieval (SQLite FTS5, graph, vector, LLM agent) to give AI assistants structured, long-term memory without RAG.1Apache 2.0
- AlicenseNot gradedqualityFmaintenanceKnowledge-graph memory server for MCP-compatible AI tools, providing persistent, connected memory with typed relationships and auto-consolidation.MIT