Local MCP Memory System with Consolidation for AI Conversations

What This Is
A developer created a local memory system for AI conversations that consolidates and synthesizes information rather than just storing it. Built as an MCP server, it works with compatible clients like Claude Desktop and Claude Code, running 100% locally with no data leaving your hardware.
How It Works
The key differentiator from standard RAG systems is the consolidation process. Every 6 hours, a local LLM (Qwen 2.5-7B running in LM Studio) clusters recent memories by topic and consolidates them into structured knowledge documents. It extracts facts, solutions, and preferences, merging them with existing knowledge and versioning everything.
Technical Stack
- Embeddings: nomic-embed-text-v1.5 via LM Studio
- Vector search: FAISS (semantic + keyword hybrid)
- Consolidation LLM: Qwen 2.5-7B (Q4) via LM Studio
- Storage: SQLite for episodes, FAISS for vectors
- Protocol: MCP — works with anything that supports it
- Config: TOML
Features
- Semantic dedup with cosine similarity 0.95 threshold
- Adaptive surprise scoring — frequently accessed memories get boosted, stale ones decay
- Atomic writes with tempfile + os.replace for crash protection
- Tombstone-based FAISS deletion — O(1) instead of rebuilding the whole index
- Graceful degradation — if LM Studio goes down, storage still works, consolidation pauses
- 88 tests passing
MCP Tools
memory_store— save an episode with type, tags, surprise scorememory_recall— semantic search across episodes + consolidated knowledgememory_forget— mark an episode for removalmemory_correct— update a knowledge docmemory_export— full JSON backupmemory_status— health check
Why MCP Was Chosen
Models get replaced frequently, but accumulated knowledge shouldn't disappear with them. MCP makes the memory portable — one store, many interfaces. The memory layer becomes more valuable than any individual model.
Practical Results
After about a week of use, the system built knowledge documents about PC hardware, VR setup, coding preferences, and project architectures — all synthesized from normal conversation. When starting new chats, the AI already knows the user's context without re-explaining.
Requirements
- Python 3.11+
- LM Studio with Qwen 2.5-7B and nomic-embed-text-v1.5 loaded
- Any MCP client
📖 Read the full source: r/LocalLLaMA
👀 See Also

Solitaire: Open-Source Identity Layer for AI Agents Built with Claude Code
Solitaire is an open-source identity layer for AI agents that evolves through interaction rather than static configuration. It's been tested across 600+ production sessions and stores all data locally using SQLite + JSONL with no cloud dependencies.

Slides-grab: Visual Editor for Fixing HTML Slides Generated by Claude Code
Slides-grab is a tool that lets you drag elements on HTML/CSS slides generated by Claude Code, then sends XPath and a highlighted screenshot to the AI agent for precise editing. It addresses the pain point of fixing small layout issues through text prompts alone.

Exporting AI Agent Memories Using Claude's Import Function
A Reddit user shares a prompt for extracting stored memories from AI agents like ChatGPT and Claude, then importing them into OpenClaw. The prompt requests all stored context including instructions, personal details, projects, tools, and preferences.

Agentic Context Engine: Automated Agent Improvement Loop with 34.2% Accuracy Gain
An open-source tool automates the entire agent improvement loop from trace analysis to fix implementation, achieving 34.2% accuracy improvement on Tau-2 Bench in one iteration. The system uses Claude Code in a REPL environment to analyze failures and decide between prompt or code fixes.