Give Claude Code long-term memory: open-source tools (2026)
Our pick
Start with mcp-memory-service if you want Claude Code to keep memory between sessions on your own machine. You install it with pip, then add it to Claude Code with one line (claude mcp add memory -- memory server). It runs its embeddings locally so memory stays on your infrastructure, and it is Apache-2.0 licensed. The table shows its last commit and latest release, and how the other tools compare.
Best for
- Local storage on your own machine
doobidoo/mcp-memory-serviceAfter a pip install, one line adds it to Claude Code (claude mcp add memory -- memory server). Embeddings run locally and memory is stored in SQLite on your own machine.
- Searching your whole conversation history
MemPalace/mempalaceLocal-first memory that stores your conversation history word for word and finds it again with semantic search, with no API calls.
- Claude Code learning from your corrections
ReflexioAI/claude-smartA plugin for Claude Code, Codex and OpenCode that turns your corrections into skills they follow in later sessions.
- A knowledge graph your agents can search
topoteretes/cogneeA self-hosted knowledge graph built from documents, code and conversations, with a Claude Code plugin and a local mode that needs no API key.
- Memory for an agent you are building yourself
mem0ai/mem0Runs three ways: as a library, a self-hosted server or a cloud platform.
- Memory kept as plain files in git
okf-memory/okf-agent-memoryVersion-controlled plain-text memory you can review with git diff, with an MCP server that works with Claude Code.
The repos compared
Checked on Dec 2, 2026: the oldest day any repo in the table was last read from GitHub.
| Repo | Stars | Last commit | Latest release | Licence | Needs |
|---|---|---|---|---|---|
| doobidoo / mcp-memory-service Persistent memory for Claude and agent pipelines such as LangGraph, CrewAI and AutoGen. | 2,176 GitHub (opens in new tab) | Active Dec 1, 2026 | v13.1.0, Nov 27, 2026 | Apache-2.0 | |
| thedotmack / claude-mem Captures what your agent does during a session and carries that context into later sessions. | 121,207 GitHub (opens in new tab) | Active Dec 2, 2026 | v17.2.0, Dec 2, 2026 | Apache-2.0 | Node.js: 20.19 or later in the 20.x line, or 22.12 or later; A supported agent: Claude… |
| MemPalace / mempalace A free, open-source memory system for AI agents. | 60,785 GitHub (opens in new tab) | Active Dec 1, 2026 | v3.12.0, Nov 12, 2026 | MIT | Python 3.10+; A vector-store backend (ChromaDB by default); ~300 MB disk for the… |
| topoteretes / cognee A memory platform that gives AI agents persistent long-term memory. | 33,790 GitHub (opens in new tab) | Active Nov 28, 2026 | v1.6.10, Nov 18, 2026 | Apache-2.0 | |
| mem0ai / mem0 A memory layer you add to AI agents and apps. | 69,894 GitHub (opens in new tab) | Active Nov 27, 2026 | ts-v3.3.1, Sep 25, 2026 | Apache-2.0 | |
| ReflexioAI / claude-smart Turns your corrections into preferences and skills for Claude Code and Codex. | 798 GitHub (opens in new tab) | Active Dec 1, 2026 | v0.3.15, Oct 27, 2026 | Apache-2.0 | |
| EverMind-AI / EverOS A portable, local-first memory layer for AI agents, stored as Markdown. | 14,035 GitHub (opens in new tab) | Active Dec 1, 2026 | v1.8.0, Nov 25, 2026 | Apache-2.0 | Python 3.12+; One OpenRouter API key |
| okf-memory / okf-agent-memory Persistent memory for AI coding agents, stored in Git. | 880 GitHub (opens in new tab) | Active Nov 29, 2026 | v0.9.1, Nov 29, 2026 | MIT |
Install commands
Copied from each repo. Read its setup steps before you run anything.
doobidoo/mcp-memory-service
pip install "mcp-memory-service[sqlite]"thedotmack/claude-mem
npx claude-mem installMemPalace/mempalace
npx skills add MemPalace/mempalace Our video
thedotmack/claude-mem
Questions
Does Claude Code remember between sessions?
Partly. Each Claude Code session starts with a fresh context window, but two built-in things carry knowledge across sessions: CLAUDE.md files, which hold instructions you write, and auto memory, on by default, which holds notes Claude writes itself from your corrections and preferences. The repos on this page are separate projects that add their own memory store.
What is a Claude Code memory plugin?
A plugin or MCP server that saves what happens in your sessions and gives it back later. For example, claude-smart is a plugin for Claude Code, Codex and OpenCode, and mcp-memory-service is an MCP server whose hooks save what a session learned.
Are these memory tools free?
All of them are open source; the Licence column shows each licence. Some setups ask for an account or a key: EverOS needs an OpenRouter API key, and mem0 offers a hosted cloud platform next to its library and self-hosted server.
Do these tools only work with Claude Code?
No. mcp-memory-service works with Claude Code, Gemini CLI, OpenCode and Codex CLI. claude-smart works with Claude Code, Codex and OpenCode. EverOS has an MCP server for Claude Code, Codex, Claude Desktop and Cursor.
What is open source AI agent memory?
Software that stores what an agent has seen or decided and returns it in later sessions. mem0 is a memory layer for AI agents, and Cognee is an open-source memory platform for agents.

