Mnemo Agent Memory
Mirrors agent memories to an Obsidian vault, enabling viewing, editing, and searching notes in Obsidian.
Click on "Install 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., "@Mnemo Agent MemoryRecall why we chose PostgreSQL for this project"
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.
π§ Mnemo Agent Memory
A Lightweight, High-Precision, Zero-Token-Waste Memory Engine, Knowledge Graph, and Portable Notes System Built Exclusively for AI Coding Agents via MCP.
πINSTALLATION & AGENT INTEGRATION:
For complete step-by-step installation guides and integration instructions for Google Antigravity, Claude Desktop, Cursor, Windsurf, OpenCode, and other MCP clients, please refer to INSTALL.md.
π Table of Contents
Related MCP server: memento
π― The Core Problem (Why Mnemo Exists)
As AI coding agents (such as Google Antigravity, Claude, Cursor, and OpenCode) work on complex codebases, they encounter three fundamental limitations:
Context Window Contamination & Token Waste:
Traditional agent workflows perform heavy file dumps or forced multi-turn memory searches. This floods the model's context window with irrelevant lines, depletes API context budgets rapidly, and causes context drift.Heavy External Database Overhead:
Existing agent memory frameworks rely heavily on external vector database services or C++ native binaries (PostgreSQL/pgvector, Pinecone, sqlite3 native builds). In modern agent environments, managing external databases creates complex setup hurdles and cross-platform compilation failures.Team Context Disconnection:
When multiple developers work on the same repository, historical decisions made by one AI agent session are lost to teammates, forcing each developer's AI agent to re-learn architecture from scratch.
Mnemo solves all three problems at the root. It provides a 100% pure Node.js memory engine operating over the Model Context Protocol (MCP), enforces a Zero-Token-Waste Protocol, auto-locks project identity, mirrors all memories into Markdown notes, and supports portable team memory bundles for instant team collaboration.
β‘ Key Architectural Pillars
1. π‘οΈ Zero-Token-Waste Protocol
Mnemo injects relevant past architectural context directly into agent prompts via <MNEMO_CONTEXT> without forcing redundant tool-call turns. Search payloads are ultra-compact (over 90% size reduction), allowing agents to freely use native search tools (grep_search, view_file) at maximum speed.
2. π₯ Portable Team Memory Bundles
Mnemo allows developers to export the entire project memory (notes, index, and Knowledge Graph) into a single portable .json bundle file (mnemo export-memory). Teammates can import this bundle (mnemo import-memory), automatically building local vector embeddings so their AI agent instantly shares the same project context.
3. π Auto-Lock Project ID
To eliminate storage drift, Mnemo automatically persists a mnemo.json file in the workspace root during its first normalization step. Once generated, the Project ID is permanently locked, ensuring absolute memory consistency across developer sessions, folder renames, or structural refactors.
4. πΈοΈ Embedded Knowledge Graph & Local ONNX Embeddings
Mnemo maintains a directed persistent Knowledge Graph tracking relationships between concepts, code entities, decision logs, and file structures. Local embeddings are computed via @xenova/transformers (all-MiniLM-L6-v2 ONNX) 100% locally without external API keys, featuring automatic idle RAM unloading.
5. π§Ή Multi-Agent Auto-Cleanup
Uninstalling Mnemo (npm uninstall -g mnemo-agent-memory or mnemo remove) automatically triggers lifecycle hooks that clean injected agent rules (GEMINI.md, AGENTS.md, CLAUDE.md, .cursorrules, .windsurfrules) and remove registered MCP servers across all supported agents.
ποΈ System Architecture
flowchart TD
subgraph Client ["AI Agent / IDE Environment"]
Agent["AI Coding Agent (Antigravity / Claude / Cursor / OpenCode)"]
end
subgraph MCP ["Model Context Protocol Interface"]
Server["Mnemo MCP Server (stdio / HTTP)"]
end
subgraph Core ["Mnemo Engine Core (Pure Node.js)"]
Store["Index & Memory Store"]
Vec["Local ONNX Embeddings (all-MiniLM-L6-v2)"]
Graph["Knowledge Graph Engine (Nodes & Edges)"]
Bundle["Portable Memory Bundle (Export / Import)"]
Lock["Project ID Auto-Lock (mnemo.json)"]
end
subgraph Storage ["Local Filesystem (~/.mnemo/projects/)"]
NotesDir["notes/ (*.md)"]
GraphDir["graph/ (graph.json)"]
VectorsDir["vectors/ (*.bin)"]
ObsidianVault["Obsidian Vault Mirror"]
end
Agent <-->|"MCP Tools (memory_recall, memory_save, file_info)"| Server
Server --> Core
Core --> Storage
NotesDir <-->|"Two-way Sync"| ObsidianVaultπ Core Features & Capabilities
Hybrid Vector + Keyword Search: Powered by
@xenova/transformers(runningall-MiniLM-L6-v2locally via ONNX without Python) combined with BM25 keyword matching and Reciprocal Rank Fusion (RRF).Smart Memory Auto-Injection: Automatically computes memory similarity and injects relevant context into agent prompts within a configurable token budget.
AST Skeleton Extraction:
file_infoparses file structures and outputs function symbols with line coordinates, enabling precise code inspection.Portable Memory Bundles: Export and import complete memory snapshots (
notes,index,graph) into a single portable.jsonfile for team sharing.Obsidian Mirroring: Seamless two-way sync with an Obsidian-compatible vault directory (
notes_export/notes_import).Web Dashboard: Interactive web interface (default port
3112) to visualize knowledge graphs, view memories, and manage project notes.
π§ MCP Tools Reference
When running as an MCP Server, Mnemo exposes the following 14 tools to the AI Agent:
MCP Tool Name | Description |
| Performs hybrid vector + keyword search to recall relevant project decisions and context. |
| Saves new features, bug fixes, or architecture decisions into persistent memory with auto-indexing. |
| Exports project memory bundle (notes, index, Knowledge Graph) to a portable JSON file. |
| Imports project memory bundle from a JSON file and auto-generates local vector embeddings. |
| Inspects a file's AST skeleton, line counts, imports, and symbol line ranges before reading lines. |
| Queries entities, relationships, and neighbor nodes within the Knowledge Graph. |
| Scans workspace and builds initial Knowledge Graph structure. |
| Dynamically adds new concepts, nodes, and edges to the Knowledge Graph. |
| Computes graph metrics (centrality, god nodes, community clusters). |
| Generates structured architectural reports from stored graph relationships. |
| Compiles a markdown wiki from knowledge graph entities. |
| Analyzes potential impact of changing specific code entities or modules. |
| Re-indexes manual Markdown notes from the local |
| Exports and mirrors all project notes to an Obsidian vault structure. |
π» CLI Usage & Commands
Mnemo comes with a powerful CLI executable (mnemo).
# View CLI Help
mnemo --help
# Export project memory bundle for team sharing
mnemo export-memory mnemo-bundle.json
# Import project memory bundle from teammate
mnemo import-memory mnemo-bundle.json
# Export & sync notes to Obsidian vault
mnemo notes-export
# Import & re-index notes/*.md files
mnemo notes-import
# Knowledge Graph Operations
mnemo graph init # Initialize graph for current workspace
mnemo graph --extend # Extract and extend new graph entities
mnemo graph query <name> # Search specific entity relations
mnemo graph prune # Clean up stale/archived graph nodes
# Agent Connection & Cleanup
mnemo connect agy # Connect Mnemo MCP to Google Antigravity
mnemo remove # Clean up agent rules, MCP registrations, and skillsπ¦ Portable Memory Bundles (Team Collaboration)
Sharing project memory with teammates is simple:
Export Memory:
mnemo export-memory team-memory.jsonShare File: Commit
team-memory.jsonto your repository or send it to your teammate.Import Memory:
mnemo import-memory team-memory.jsonYour teammate's Mnemo engine will reconstruct notes, index, Knowledge Graph, and automatically compute local vector embeddings so their AI agent instantly shares the exact same project context.
βοΈ Configuration & Environment Variables
Mnemo can be configured globally via ~/.mnemo/config.json or overridden per-session using Environment Variables (MNEMO_*):
Environment Variable | Default | Description |
|
| Root storage folder for notes, vectors, graphs, and models. |
| (auto-detect) | Explicit override for Project ID (bypasses auto-detection). |
|
| HTTP Server & Web Dashboard port. |
|
| Enables/disables automatic memory injection into agent prompts. |
|
| Maximum token budget for injected memory context. |
|
| Minimum cosine similarity score required for context injection. |
|
| Rule aggressiveness level ( |
|
| Automatically triggers |
π Project ID Auto-Locking Mechanism
To guarantee 100% session consistency, Mnemo uses a 3-tier deterministic resolution strategy:
mnemo.json(Priority 1): ReadsnameorprojectIdfrom workspace root.package.json(Priority 2): Readsnameifmnemo.jsondoes not exist yet.Folder Slug Fallback (Priority 3): Uses the last two path segments of the workspace folder.
The Auto-Lock Feature: Upon first run, if mnemo.json is missing, Mnemo calculates the target ID and immediately writes a locked mnemo.json file into the root folder. This prevents Project ID shifts even if package.json is added later or the folder is relocated.
π License
Distributed under the MIT License. See LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceA local, persistent memory system for AI coding assistants that stores decisions, patterns, and session context via MCP tools. It enables cross-session memory management using SQLite and optional vector search without external dependencies or cloud storage.5363MIT
- Alicense-qualityAmaintenanceProvides persistent memory for AI coding agents via MCP, enabling agents to store and semantically recall facts, events, and lessons across sessions, all running locally without cloud dependencies.Apache 2.0
- AlicenseAqualityBmaintenanceA local-first memory engine for AI agents with MCP-native, graph-linked, spaced repetition. It enables agents to log, retrieve, and manage learnings via CLI or MCP server.8AGPL 3.0
- Flicense-qualityBmaintenanceA local-first, Markdown-native AI agent layered memory system that provides MCP tools for storing, recalling, exporting, and importing memories with types like working, persona, and fact.
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SiamAlSobari/mnemo-agent-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server