graphmory-mcp
Provides optional private Git sync for the Markdown vault, enabling versioned backup and synchronization of memory notes across machines.
Uses an Obsidian-compatible Markdown vault as the memory store, allowing agents to recall, read, and write linked Markdown notes while preserving citations, note hashes, and lifecycle metadata.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@graphmory-mcprecall what I know about the deployment process"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Graphmory is governed memory for AI agents: a local MCP server over plain Markdown notes that you own. Agents search them by keyword, meaning and [[links]], every answer points back to its source, and new memories are checked before they are saved.
Status: experimental, pre-1.0. The contracts, tests and deterministic evals are in place. Only a single-model live pilot is published; there is no cross-model benchmark yet.
Watch the film
https://github.com/user-attachments/assets/910ec002-b976-4b80-aa1b-e4754af3497d
Related MCP server: openmemkit
Why Graphmory
Memory that saves everything fills up with noise, stale facts and guesses. Graphmory keeps a small set of curated notes that any agent can search, and makes every answer prove itself.
Cited recall. Answers come back with the note path and a hash of the note, so each claim can be checked against the original.
Honest when nothing matches. If no note supports an answer, the result is "No supporting note", not a guess.
Guarded writes. A new memory needs evidence. It is checked before it is saved, and the save returns a receipt hash. Conflicts and low-confidence memories are never written silently.
Memory that ages. Notes carry a status, an expiry and revalidation triggers. Stale or replaced notes are not recalled; replaced notes stay as history. When a source changes, summaries built on it are flagged for a recheck.
Plain files. Notes are Markdown in a folder or Obsidian vault, with optional private Git sync. No database and no vector server.
Any MCP client. Six tools, one server: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, Cline, Zed and others.
How it works

Three roles share the work:
Role | Does |
Main agent | The coding agent you chat with. Decides what a finished task means, what is worth remembering, and whether a change is allowed |
Curator | A small, cheap model in your agent host. Reads the original notes, verifies the evidence and returns a short cited brief |
Graphmory | Finds candidate notes and guards every write. Runs on your machine and never invents or rewrites meaning |

Search combines three lanes: keyword matching (BM25F over note sections), meaning (a local BGE embedding model) and the [[links]] you author between notes, followed up to 3 hops. The lanes are merged with Reciprocal Rank Fusion into one ranking. Details: MCP recall.
Quick start
Install Graphmory (not on npm yet, so install from this repository; Node.js 20+ and Git are required):
git clone https://github.com/Grunte12/graphmory.git cd graphmory npm install -g .Set it up. Ask your coding agent: "Install Graphmory from this checkout using
adapters/generic-agent/INSTALL.md." It asks where your vault lives, whether to sync through Git, and which small model the Curator should use. Manual commands for Codex, Claude Code and Cursor are in host setup.Check it:
graphmory doctorExpect
vault ok,curator model ok (<model>),mcp tools: recall · read · remember · link · status · syncandmeaning search ok. Any line that saysneeds attentioncomes with the fix.Connect your agent to the MCP server, below.
Optional: graphmory semantic-warmup downloads the local meaning model once (about 130 MB) so the first recall does not wait.
Connect your agent
graphmory-mcp is a standard stdio MCP server. Point it at your vault with GRAPHMORY_VAULT.
Claude Code (.mcp.json) and Cursor (.cursor/mcp.json):
{"mcpServers":{"graphmory":{"command":"graphmory-mcp","env":{"GRAPHMORY_VAULT":"/path/to/vault"}}}}Codex (config.toml):
[mcp_servers.graphmory]
command = "graphmory-mcp"
env = { GRAPHMORY_VAULT = "/path/to/vault" }OpenCode (opencode.json):
{"mcp":{"graphmory":{"type":"local","command":["graphmory-mcp"],"environment":{"GRAPHMORY_VAULT":"/path/to/vault"}}}}Other hosts: MCP host configuration. For a client that cannot start a local process, Streamable HTTP is available behind a bearer token.
The six tools
Tool | What it does |
| Finds a ranked shortlist for a question: up to ten candidates per page, each with path, heading, excerpt, note hash and the search lanes that found it. Pages with a cursor; a query is limited to 8 pages |
| Opens the original note, or one section of it, so the Curator can verify a candidate. A stale hash is refused |
| Saves a decision with its evidence in a new note, or updates an existing note and keeps its other content. Returns |
| Lets the Curator keep the graph connected: adds or removes relation links (part of, depends on, evidence for, related) and repairs broken links, across many notes in one call |
| Shows what needs attention: an interrupted write, memory waiting for you, notes due for revalidation, vault health and Git sync state. With |
| Pulls from the vault's private Git remote (fast-forward only) or pushes to it. A push lists the changed files and waits for your approval |
What remember returns:
Outcome | Meaning |
| Saved as a new note, with a receipt hash for what was written. A replaced note stays as history |
| An active note overlaps or conflicts. Nothing is written until the agent has read it and answered |
| Evidence is missing or stale, a secret was found, or confidence is low. Nothing is written. Low-confidence memory waits in a private queue, and the host asks you to approve, reject or decide later |
The agent cannot approve its own low-confidence memory or restore an interrupted write: the server asks you through MCP elicitation, and no tool argument answers for you. Guides: recall and citation, guarded writes, status and owner decisions, Git sync, links, memory contracts.
Documentation
Topic | Read |
Install and hosts | Installation · Codex, Cursor and Claude Code · MCP hosts · Vault layout · Troubleshooting |
Using it | CLI reference · Portable Brain Sync · Demo workflow · Managed retrieval |
Design | Memory contracts · Learning loop · Positioning and RAG · Research foundations · Glossary |
Evaluation | Evaluation · Evaluation index · Cost and scale · Live model results · |
Project
MIT license · Changelog · Privacy · Security · Support · Contributing · All docs · Citation · Third-party notices
Graphmory was previously called memory patch harness. Per-vault sync metadata is still stored under .memory-patch-harness/.
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Personal context for every AI: search, read, and write back to your private Markdown library.
Persistent memory for AI agents. Search, store, and recall across sessions.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to search, read, create, update, and remove personal markdown notes stored locally, providing persistent memory across sessions.12 npm2MIT
- AlicenseAqualityBmaintenanceEnables AI agents to maintain a persistent, queryable memory stored as user-owned Markdown files, with dual-channel retrieval (FTS5 and optional semantic search) and an audited write pipeline.11MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to capture, structure, remember, and retrieve source-backed memory as local Markdown files, with reviewable writes and no cloud dependency.199MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to search and retrieve notes from a local Markdown vault using hybrid keyword/semantic search, and to save typed memories with append and guarded replacement operations.MIT