Mnemosyne — Claude Code MCP server: memory and installation
The Mnemosyne local MCP server stores an agent’s knowledge and its evidence in SQLite. When a source is corrected, dependent memories are retired.
MIT ★ 162 updated 2026-10-29
claude mcp add --env MNEMOSYNE_INDEX_MODE=<MNEMOSYNE_INDEX_MODE> --transport stdio mnemosyne -- npx -y mnemosy-aiWhat Mnemosyne does
Mnemosyne keeps an agent’s long-term memory in a single SQLite file. Each record retains its source and trust tier, and earlier versions remain inspectable after a correction. When a source changes, dependent records are retired so the agent can work from the current evidence.
Connect the server to Claude Code, Codex, Cursor, and other clients through MCP. The project also offers a TypeScript SDK, CLI, and HTTP interface. Its local engine runs without a model API key, a separate database server, or Docker. Node.js 22.16 or later is required.
Corrections can affect procedures and skills linked to the original record. That means an agent should not keep following instructions grounded in a superseded requirement.
What it helps with
- retain agent knowledge across sessions
- inspect the evidence behind a memory
- retire procedures after a source is corrected
- trace records that affected a retrieval
Example prompts for the agent
- Save this decision with its source so you can use it in later sessions.
- Correct the stored requirement and retire instructions that depend on it.
- Show which records affected this retrieval.
How to install Mnemosyne
Platform CLI
claude mcp add --env MNEMOSYNE_INDEX_MODE=<MNEMOSYNE_INDEX_MODE> --transport stdio mnemosyne -- npx -y mnemosy-aiReplace <…> with your own values
Platform CLI
codex mcp add mnemosyne --env MNEMOSYNE_INDEX_MODE=<MNEMOSYNE_INDEX_MODE> -- npx -y mnemosy-aiReplace <…> with your own values
Config file
{
"mcpServers": {
"mnemosyne": {
"command": "npx",
"args": [
"-y",
"mnemosy-ai"
],
"env": {
"MNEMOSYNE_INDEX_MODE": "<MNEMOSYNE_INDEX_MODE>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"mnemosyne": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mnemosy-ai"
],
"env": {
"MNEMOSYNE_INDEX_MODE": "<MNEMOSYNE_INDEX_MODE>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e MNEMOSYNE_INDEX_MODE=<MNEMOSYNE_INDEX_MODE> mnemosyne npx -y mnemosy-aiReplace <…> with your own values
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 Mnemosyne
How do I install Mnemosyne in Claude Code?
Run claude mcp add --env MNEMOSYNE_INDEX_MODE=<MNEMOSYNE_INDEX_MODE> --transport stdio mnemosyne -- npx -y mnemosy-ai. Set a value for MNEMOSYNE_INDEX_MODE.
What does Mnemosyne do?
It stores agent memories in SQLite alongside their sources and trust tiers. When a source is corrected, dependent records are retired.
Does Mnemosyne need an API key or a separate database server?
The local engine needs neither a model API key nor a database server or Docker. It requires Node.js 22.16 or later.