AI Memory Hub
The server is an MCP interface to a persistent Markdown-based memory vault. You can search existing memories, read individual memory files, propose new memories (auto-stored or queued for review), supersede outdated memories, delete memories by ID, audit vault/index integrity, and rebuild the search index.
memory_policy – Retrieve the current retention policy and active write mode (auto vs. review).
memory_search – Search persistent memory by query, with an optional result limit; use before opening files.
memory_read – Read exactly one memory Markdown file, with path safety enforced inside the vault.
memory_propose – Submit a durable memory candidate; in auto mode it is stored immediately, in review mode it is queued for approval.
memory_supersede – Replace an old memory with a new version; in review mode the replacement is queued for approval.
memory_forget – Delete a persistent memory by its stable memory ID.
memory_audit – Check file/index integrity without modifying memory.
memory_reindex – Rebuild the disposable SQLite search index from the Markdown vault.
Registers the shared memory server with Hermes Agent and installs a behavioral skill that lets the agent read and write memories.
Supports JetBrains AI as a memory client, allowing it to search and contribute to the shared vault.
Enables the ChatGPT desktop app to use the same shared memory vault through OpenAI's Secure MCP Tunnel.
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., "@AI Memory Hub Save that I prefer concise code examples in Python to my memory."
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.
AI Memory Hub
Shared, local-first memory for AI tools. Store preferences, decisions, and project notes as readable Markdown — then retrieve them through one MCP server.
What It Does
AI Memory Hub gives your AI tools a shared memory. Instead of each tool starting from scratch, they read and write to one local Markdown vault. That vault is just a folder — you can open it in Obsidian, back it up, or edit it by hand.
How it works in practice:
Search first — A connected AI checks existing memory before asking you something it should already know.
Propose — When it learns something worth keeping, it proposes a new memory.
Review or auto-accept — Depending on your settings, proposals are either queued for your review or written automatically.
Store — Accepted memories become plain Markdown files that are searchable and rebuildable.
Inject context — At startup, the latest relevant checkpoint is handed to your AI so it remembers where you left off.
Related MCP server: second-brain-mcp
✨ Key Features
Feature | Description |
Shared Memory | Preferences, decisions, project facts, people, topics, and session summaries stored as Markdown |
Review Dashboard | Local web UI ( |
Semantic Search | Keyword (FTS) + optional vector search with local embeddings |
Session Continuity | Capture, checkpoint, and inject context across AI sessions |
Browser Tool Normalizer | Automatically parses Hermes browser tool payloads into human-readable summaries |
Auto-Fix System | Detects and repairs malformed memory lines, orphan session blocks, duplicate IDs |
Encryption at Rest | AES-256-GCM vault encryption via |
GitHub Export | Optional sanitized session summaries pushed to a repository |
Git History | Optional local version control for your vault |
Full Transcripts | Optional raw session capture for local auditing |
Native Acceleration | Rust extensions for hot-path operations (tokenization, embeddings, SQLite) |
Privacy-First | All data stays local unless you explicitly enable export |
🚀 Quick Start
You need Python 3.10+, Git, and uv installed.
# 1. Clone and enter the repository
git clone https://github.com/vib28/ai-memory-hub.git
cd ai-memory-hub
# 2. Set up the environment and vault
.\setup.ps1 -VaultPath "C:\Users\vibm\OneDrive\Documents\Memory"
# 3. Connect your AI tools (auto-detects installed clients)
.\connect-ai-tools.ps1 -VaultPath "C:\Users\vibm\OneDrive\Documents\Memory" -WriteMode review
# 4. Start the dashboard
.\start-memory-hub.ps1 -VaultPath "C:\Users\vibm\OneDrive\Documents\Memory"Then open http://127.0.0.1:8765 in your browser.
🔌 Supported Clients
Client | Version | Capture | Handoff | MCP |
Claude Code | 2.1.276 | ✅ | ✅ | ✅ |
Codex CLI | 0.155.0 | ✅ | ✅ | ✅ |
Gemini CLI | 0.58.0 | ✅ | ✅ | ✅ |
Qwen Code | 0.22.0 | ✅ | ✅ | ✅ |
Kimi Code | 2.0.1 | ✅ | ✅ | ✅ |
Hermes Agent | current | ✅ | ✅ | ✅ |
Other stdio MCP clients can use the manual hook system.
📋 Opt-In Permissions
Permission | Flag | Effect | Default |
Client connection |
| Lets a client call the memory server | Not connected |
Lifecycle capture |
| Buffers session events locally | Off |
Full transcript |
| Keeps raw events for auditing | Off |
Session worker |
| Auto-processes captured sessions | Off |
Startup handoff |
| Injects context at session start | Off |
GitHub export |
| Publishes sanitized summaries | Off |
Encryption |
| Encrypts vault files at rest | Off |
Manual hooks |
| Adds hooks for any stdio client | Off |
Each has a matching removal flag (-RemoveHooks, -DisableSessionAuto, etc.) that does not touch your vault.
🛡️ Security
Path traversal protection via
safe_joinParameterized SQL throughout
Atomic writes with PID-based lock stealing
Timing-safe comparison via
secrets.compare_digestSHA-256 for all hashing
DNS rebinding protection via Host-header validation
Luhn-validated card detection
Multi-pattern secret detection
CSP + X-Frame-Options on dashboard
📊 Current State
Metric | Value |
Tests | 445+ passing |
GitHub Issues | 0 open (all 16 closed) |
Rust Extensions | Built and loaded |
Clients Supported | 6 (5 with hooks installed) |
Documentation | Complete with diagrams |
📚 Documentation
Document | When to Read |
First-time setup and environment | |
Connecting AI tools and limitations | |
Write modes, endpoints, environment variables | |
Review, search, sessions, imports, undo | |
UI walkthrough, tags, links, color modes | |
Deep dive into modules and data flow | |
Symptoms, checks, and recovery | |
Short answers and known limits | |
Complete fix history | |
Feature list |
🏗️ Architecture
flowchart TB
subgraph Clients["AI Clients"]
C1[Claude Code]
C2[Codex CLI]
C3[Gemini CLI]
C4[Qwen Code]
C5[Kimi Code]
C6[Hermes Agent]
end
subgraph Capture["Capture Layer"]
H[ai-memory-hook.exe]
B[Observation Buffer]
N[Browser Normalizer]
end
subgraph Core["Core"]
W[Worker]
CO[Consolidator]
CT[Categorizer]
M[Memory Manager]
end
subgraph Storage["Storage"]
V[(Markdown Vault)]
I[(SQLite Index)]
E[(Encrypted .enc files)]
end
subgraph Output["Output"]
CP[Context Packets]
HF[Handoff]
EX[GitHub Export]
end
C1 & C2 & C3 & C4 & C5 & C6 --> H
H --> N
N --> B
B --> W
W --> CO
CO --> CT
CT --> M
M --> V
M --> I
M --> E
M --> CP
CP --> HF
M --> EX📄 License
Available Tools
8 toolsmemory_auditA
Check file/index integrity without modifying memory.
Inputs: no named parameters.
memory_forgetA
Delete one persistent memory by its stable memory ID.
Inputs: memory_id (required).
memory_policyA
Return the automatic persistent-memory retention policy and active write mode.
Inputs: no named parameters. Returns: result
memory_proposeC
Validate a durable memory candidate. Auto mode stores it; review mode queues it.
Inputs: tag (required), kind (required), text (required), subject, +1 more.
memory_readA
Read exactly one memory Markdown file. Path must be inside the vault.
Inputs: path (required). Returns: result
memory_reindexA
Rebuild the disposable SQLite search index from the Markdown vault.
Inputs: no named parameters.
memory_searchB
Search persistent memory. Prefer this before opening files.
Inputs: query (required), limit. Returns: result
memory_supersedeB
Supersede an old memory. In review mode the replacement is queued for approval.
Inputs: tag (required), kind (required), text (required), old_memory_id (required), +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct operation: policy introspection, search, file read, write/propose, update/supersede, delete, integrity audit, and index rebuild. Memory_search vs memory_read and propose vs supersede are related but clearly separated by descriptions.
All tools share a consistent memory_ prefix and use clear snake_case action suffixes such as search, read, propose, supersede, forget, audit, and reindex. The pattern is predictable and uniform.
Eight tools is well within the ideal range and appropriate for a persistent memory hub. Each tool covers a distinct lifecycle or maintenance need without unnecessary bloat.
The core memory lifecycle is well covered: policy, search, read, create/propose, update/supersede, delete, audit, and reindex. The only minor gap is that review-mode approvals/rejections have no dedicated tool, though this is likely handled outside the agent workflow.
Maintenance
Related MCP Connectors
Persistent memory for AI assistants — one shared, OAuth-secured vault for every MCP client.
Shared memory for your AI tools: tasks, notes and context every tool can read and write over MCP.
Shared AI memory. ChatGPT, Claude, Cursor and any MCP app read and write the same memory.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search, read, and append content to notes in an Obsidian vault via the MCP protocol.BSD Zero Clause
- AlicenseNot gradedqualityDmaintenanceTurns an Obsidian vault into semantic memory for coding agents, providing read-only semantic search and a human-approved write workflow via MCP.8MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that provides controlled read/write tools for managing local-first research memory in an Obsidian vault, enabling AI agents to maintain project context across sessions.7 npm1MIT
- FlicenseNot gradedqualityDmaintenanceEnables reading, writing, searching, and managing Obsidian vault notes through MCP tools and prompts, allowing AI agents to interact with local knowledge bases.-