vanguard-memory-node
Vanguard Memory Node (VMN)
Local deterministic memory for AI agents via the Model Context Protocol (MCP).
No cloud. No vector database. No semantic drift. Your data stays on your machine.
What it does
VMN gives any MCP-compatible AI agent a persistent, queryable memory vault stored entirely on local disk. Text is ingested once, content-addressed with SHA-256, segmented, and indexed with a sharded BM25 inverted index. Retrieval is deterministic: the same query always returns the same ranked result from the same data.
Optionally, vaults can be synced to the ExergyNet LNES-17 ledger for cross-device and cross-agent recall with cryptographic provenance.
Related MCP server: NarratorDB
Install
npm install -g @lnes/vanguard-memory-nodeOr run without installing:
npx @lnes/vanguard-memory-nodeClaude Desktop integration
Mac — ~/Library/Application Support/Claude/claude_desktop_config.json
Windows — %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"vanguard-memory": {
"command": "npx",
"args": ["-y", "@lnes/vanguard-memory-node"]
}
}
}With ExergyNet vault sync enabled:
{
"mcpServers": {
"vanguard-memory": {
"command": "npx",
"args": ["-y", "@lnes/vanguard-memory-node"],
"env": {
"EXERGYNET_API_KEY": "sk-exergy-your-key",
"EXERGYNET_NETWORK": "mainnet",
"AUTO_SYNC_VAULT": "true"
}
}
}
}WSL on Windows:
{
"mcpServers": {
"vanguard-memory": {
"command": "wsl",
"args": ["-d", "Ubuntu", "npx", "-y", "@lnes/vanguard-memory-node"]
}
}
}Tools (11 total)
vmn_ingest
Stores text as a SHA-256 content-addressed shard. Segments it, indexes it, and updates the local catalog.
Parameter | Type | Required | Description |
| string | yes | Content to store |
| string | no | Human-readable label |
| string | no | Logical partition (default: |
| string[] | no | Search tags |
| string | no | MIME type hint (default: |
| string | no | Source label |
Returns: SHA-256 root hash + vault path + vault_synced flag.
vmn_recall
Retrieves a 900-character evidence window from a specific shard using lexical BM25 scoring.
Parameter | Type | Required | Description |
| string | yes | Root hash from |
| string | yes | Search query |
Returns: best-matching evidence window, or a human-readable no-match message.
vmn_search
Full-vault keyword search across all ingested objects. Returns ranked results with snippets.
Parameter | Type | Required | Description |
| string | yes | Search query |
| number | no | Max results (default: 10) |
| string | no | Restrict search to this namespace only |
vmn_ingest_file
Delta-ingests a growing file into the vault, tracking progress with a cursor so only new lines are ingested on each call. Designed for Stop hooks and continuous log pipelines — safe to call repeatedly with no duplicates.
Parameter | Type | Required | Description |
| string | yes | Absolute path to the file |
| string | no | Cursor key (defaults to file path) |
| string | no | Namespace for ingested content (default: |
| string | no | Optional title override |
| string[] | no | Optional tags |
Returns: lines_ingested, cursor_line, and shard hash (null if no new content).
Stop hook example — ingest every Claude session automatically:
{
"hooks": {
"Stop": [{
"matcher": "",
"hooks": [{
"type": "command",
"command": "npx -y @lnes/vanguard-memory-node vmn_ingest_file --file_path \"$CLAUDE_SESSION_FILE\" --session_id \"$CLAUDE_SESSION_ID\""
}]
}]
}
}vmn_list
Lists all memory objects in the vault.
Parameter | Type | Required | Description |
| string | no | Filter by namespace |
vmn_inspect
Returns full catalog metadata for a specific object.
Parameter | Type | Required | Description |
| string | yes | Root hash |
vmn_delete
Permanently removes an object and all its index entries.
Parameter | Type | Required | Description |
| string | yes | Root hash |
vmn_stats
Returns aggregate vault statistics: entry count, total bytes, namespaces, oldest/newest timestamps.
vmn_index_status
Returns current BM25 index state (READY, REBUILD_REQUIRED, REBUILDING, DEGRADED).
vmn_rebuild_index
Rebuilds the full BM25 index from authoritative object files. Safe at any time — objects are never modified.
vmn_sync_vault
Syncs a local memory object to the ExergyNet LNES-17 vault. Requires EXERGYNET_API_KEY. Use EXERGYNET_NETWORK to target mainnet or testnet.
Parameter | Type | Required | Description |
| string | yes | Root hash of the object to sync |
| string | no | Sync intent label (default: |
Returns: xlmp_root, bytes_committed, status, and the resolved vault URL.
Environment variables
Variable | Default | Description |
|
| Set to |
| — | API key for ExergyNet vault access ( |
|
| Target substrate: |
| (resolved from | Override vault base URL entirely |
Vault layout
~/.vanguard/
├── local_vault/
│ └── <sha256>.txt # authoritative object files (never modified after write)
├── catalog/
│ └── <sha256>.json # per-object metadata (O(1) reads)
├── segments/
│ └── <sha256>.json # segment records with term frequencies
├── cursors/
│ └── <session_id>.json # cursor state for vmn_ingest_file
└── index/
└── v2/
├── index_manifest.json # version + state header
├── corpus_stats.json # BM25 corpus statistics
└── postings/
└── <2-hex>.json # 256 sharded posting bucketsHow retrieval works
Normalization — Unicode NFC → phrase alias substitution → tokenize → suffix stem → stop-word filter → token alias expansion
Stemmer — 13-rule suffix stripper:
tions→(5),ions→(4),tion→(4),ings→(4),ing→(3),ers→(3),ies→(3),ic→(2),er→(2),ed→(2),es→(2),s→(1),y→(1). Rules applied longest-first;medicationsandmedicationboth reduce to the same root.Alias expansion — clinical, technical, and legal synonym clusters (
smok↔tobacco↔cigarett,physician↔doctor,hypertens↔bp, etc.)BM25 scoring — sharded 256-bucket inverted index; top-150 postings per term to cap high-DF stall
Fallback — stemmed-token set comparison when BM25 score is zero; prevents false positives on partial-word matches
Comparison
VMN | ChromaDB / Pinecone | |
Result determinism | Same query → same result, always | Varies with model version |
Data location | Local disk only | Cloud upload required |
Per-query cost | $0 | API charges |
Setup time | 60 seconds | Account + key + SDK |
Semantic drift | None | Breaks on model updates |
Offline capable | Yes | No |
License
MIT — free forever, no telemetry, no usage limits.
Built by ExergyNet.
Available Tools
11 toolsvmn_deleteA
Delete a memory object from the local vault by its SHA-256 root hash. This is permanent.
Inputs: hash (required).
vmn_index_statusA
Return the current status of the BM25 inverted index. Indicates if a rebuild is needed.
Inputs: no named parameters.
vmn_ingestB
Ingest text into the local Vanguard Memory Vault. Returns a SHA-256 shard hash.
Inputs: text (required), tags, title, source, +2 more.
vmn_ingest_fileA
Ingest new content from a file into the vault, tracking progress with a cursor so only new lines are ingested on each call. Safe to call repeatedly — only the delta since the last call is stored.
Inputs: file_path (required), tags, title, namespace, +1 more.
vmn_inspectB
Inspect the catalog metadata for a specific memory shard by its SHA-256 root hash.
Inputs: hash (required).
vmn_listA
List all memory objects in the local vault. Optionally filter by namespace.
Inputs: namespace.
vmn_rebuild_indexA
Rebuild the BM25 inverted index from existing vault objects. Safe to run at any time — objects are never modified.
Inputs: no named parameters.
vmn_recallB
Recall evidence from a local Vanguard Memory shard using deterministic xLMP lexical search.
Inputs: hash (required), query (required).
vmn_searchA
Search across all memory objects in the vault by keyword query. Returns candidate roots. Use vmn_recall with a specific root to retrieve full evidence.
Inputs: query (required), limit, namespace.
vmn_statsB
Return statistics about the local Vanguard Memory Vault.
Inputs: no named parameters.
vmn_sync_vaultB
Sync a local memory object to the ExergyNet LNES-17 vault. Requires EXERGYNET_API_KEY env var.
Inputs: xlmp_root (required), intent.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct operation (ingest, search, recall, delete, index management), so selection is mostly clear. The search/recall and ingest/ingest_file pairs are related but descriptions differentiate candidate-root listing versus evidence retrieval and raw-text versus cursor-tracked file ingestion.
All tools share the vmn_ prefix and most use an imperative verb (recall, ingest, delete, rebuild, sync), which is easy to predict. vmn_stats and vmn_index_status break the verb-first pattern by using noun phrases, but this is a minor inconsistency.
Eleven tools is a reasonable size for a memory-vault server and every tool addresses a concrete function: storage, retrieval, deletion, stats, index health, and external sync. It avoids both bloat and minimalism for the stated scope.
The surface covers the core memory lifecycle: ingest text/files, list, search, recall evidence, inspect metadata, delete, index maintenance, stats, and sync. No critical dead ends appear, though there is no explicit update operation—probably appropriate because memory objects are addressed by immutable hashes.
Maintenance
Related MCP Connectors
Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Related MCP Servers
- AlicenseAqualityCmaintenancePersistent, searchable memory for AI agents over the Model Context Protocol, enabling memory storage, full-text search with BM25 ranking, and retrieval across sessions.6MIT
- AlicenseNot gradedqualityDmaintenanceLocal-first long-term memory database for AI systems, providing SQLite FTS5/BM25 retrieval and optional SentenceTransformer embeddings via MCP server.MIT
- AlicenseNot gradedqualityCmaintenanceA searchable long-term memory server for AI agents using BM25 indexing over document chunks, enabling durable recall across sessions without cloud dependencies.1Apache 2.0
- AlicenseAqualityBmaintenanceLocal-first agent memory & knowledge service (v2.4.4): hybrid retrieval (vector + BM25) + offline CSV/Excel row-level Q&A without LLM; REST + MCP dual protocol (13 tools incl. list/delete documents); memory governance; Python.1325 PyPI5Apache 2.0