M3 Memory — Claude Code MCP server: features and setup
M3 Memory lets AI agents save project decisions and conversation history, then recall them in later sessions or through another client. Its default storage is local.
claude mcp add m3-memory -- uvx m3-memoryWhat M3 Memory does
M3 Memory gives agents a persistent store for project facts, preferences, decisions and past conversations. They can retrieve saved context through MCP or the command line, using a search that combines keywords with meaning. Because clients share one local store, you can move to another agent without rebuilding the project context.
The server uses SQLite by default and works offline. It requires Python 3.12+; connect it to Claude Code with claude mcp add m3-memory -- uvx m3-memory. M3 Memory itself needs neither a cloud account nor an API key, though your AI assistant may have its own requirements. A local language model can optionally summarize and link memories; install it before running m3 setup if you want that feature.
What it helps with
- carry project decisions across sessions
- retrieve old conversations by meaning
- share project context when switching agents
- find an earlier version of a changed decision
Example prompts for the agent
- Remember that we chose PostgreSQL for this project.
- Where did we leave off? Find the latest project decision.
- Give Codex the notes about this task from our shared memory.
How to install M3 Memory
Platform CLI
claude mcp add m3-memory -- uvx m3-memoryuvx runs the command named after the package; if the README names another one, use uvx --from m3-memory <command>
Platform CLI
codex mcp add m3-memory -- uvx m3-memoryuvx runs the command named after the package; if the README names another one, use uvx --from m3-memory <command>
Config file
{
"mcpServers": {
"m3-memory": {
"command": "uvx",
"args": [
"m3-memory"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from m3-memory <command>
Config file
{
"servers": {
"m3-memory": {
"type": "stdio",
"command": "uvx",
"args": [
"m3-memory"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from m3-memory <command>
Platform CLI
gemini mcp add m3-memory uvx m3-memoryuvx runs the command named after the package; if the README names another one, use uvx --from m3-memory <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about M3 Memory
How do I install M3 Memory in Claude Code?
Run claude mcp add m3-memory -- uvx m3-memory. Python 3.12+ is required.
What does M3 Memory do?
It saves project facts, decisions and conversation history so agents can retrieve them in later sessions. Different clients access the same local memory through MCP.
Does M3 Memory need an API key or cloud account?
M3 Memory needs neither; it stores data locally by default and works offline. Your AI assistant may have separate requirements.