# MemPalace — Local-First AI Memory CLI > MemPalace is a local-first memory system with a `mempalace` CLI (+ MCP tools), hitting 96.6% R@5 on LongMemEval with no LLM required. ## Install Copy the content below into your project: ## Quick Use 1. Install (recommended via uv): ```bash uv tool install mempalace mempalace init ~/projects/myapp ``` 2. Mine + search: ```bash mempalace mine ~/projects/myapp mempalace mine ~/.claude/projects/ --mode convos mempalace search "why did we switch to GraphQL" mempalace wake-up ``` ## Intro MemPalace is a local-first memory system with a `mempalace` CLI (+ MCP tools), hitting 96.6% R@5 on LongMemEval with no LLM required. - **Best for:** teams that want durable memory across coding sessions (projects + Claude Code transcripts) - **Works with:** Python + uv/pip; CLI-first workflow; optional MCP tools for Claude Code/Desktop, Cursor, etc. - **Setup time:** 10–25 minutes ## Practical Notes - Quant: LongMemEval raw retrieval recall is **96.6% R@5** (500 questions) without any LLM calls. - Quant: the README also reports **98.4% R@5** on a held-out 450-question split (Hybrid v4) with no LLM required. ## Main Use MemPalace like a “memory pipeline”, not a chat add-on: 1. **Mine two sources**: your repo + your agent transcripts (Claude Code sessions). 2. **Search before you re-explain**: ask MemPalace for the decision history instead of retyping context. 3. **Wake up at session start**: run `mempalace wake-up` and paste only the returned context into the new chat. **Watchouts** - The project warns about impostor domains; treat installers outside GitHub/PyPI/docs as untrusted. - Memory can still leak secrets if you mine private folders into a shared store—scope mines per project. ### FAQ **Q: Is an LLM required to get value?** A: No. The raw retrieval benchmark reported is 96.6% R@5 with no LLM calls. **Q: What should I mine first?** A: Start with one repo and one transcript folder, then expand only after retrieval stays high-signal. **Q: How do I keep memory scoped?** A: Mine per project path and avoid mixing unrelated repos into one shared store. ## Source & Thanks > Source: https://github.com/MemPalace/mempalace > License: MIT > GitHub stars: 52,030 · forks: 6,855 --- ## 快速使用 1. 安装(推荐用 uv): ```bash uv tool install mempalace mempalace init ~/projects/myapp ``` 2. 挖掘与检索: ```bash mempalace mine ~/projects/myapp mempalace mine ~/.claude/projects/ --mode convos mempalace search "为什么我们切到 GraphQL" mempalace wake-up ``` ## 简介 MemPalace 是本地优先的 AI 记忆系统,提供 `mempalace` CLI 与 MCP 工具,可挖掘项目与 Claude 会话;LongMemEval 原始 R@5 达 96.6%,无需 LLM。 - **适合谁:** 需要跨会话长期记忆(项目 + Claude Code 记录)的团队 - **可搭配:** Python + uv/pip;以 CLI 为主;可选 MCP 工具用于 Claude Code/Desktop、Cursor 等 - **准备时间:** 10–25 分钟 ## 实战建议 - 量化信息:LongMemEval 原始检索召回 **96.6% R@5**(500 题),不需要 LLM 调用。 - 量化信息:README 还给出 Hybrid v4 的 **98.4% R@5**(450 题留出集),同样无需 LLM。 ## 主要内容 把 MemPalace 当成“记忆流水线”来用,而不是聊天外挂: 1. **挖两类来源**:代码仓库 + 代理对话记录(例如 Claude Code sessions)。 2. **先搜再解释**:遇到历史决策问题先用 MemPalace 检索,而不是重讲背景。 3. **开局唤醒**:每次新会话先跑 `mempalace wake-up`,再把返回内容粘贴进新对话。 **注意事项** - README 明确提示存在仿冒域名;只信任 GitHub/PyPI/官方文档站的安装入口。 - 记忆库仍可能包含敏感信息;按项目分库/分路径挖掘,避免跨项目串线。 ### FAQ **必须配 LLM 才有价值吗?** 答:不需要。README 报告的原始检索指标 96.6% R@5 不依赖 LLM。 **先挖什么最好?** 答:先从 1 个仓库 + 1 个对话记录目录开始,确保检索质量稳定后再扩展。 **怎么避免记忆串线?** 答:按项目路径挖掘/分库管理,不要把无关仓库混到同一份长期记忆里。 ## 来源与感谢 > Source: https://github.com/MemPalace/mempalace > License: MIT > GitHub stars: 52,030 · forks: 6,855 --- Source: https://tokrepo.com/en/workflows/mempalace-local-first-ai-memory-cli Author: Agent Toolkit