SAE4U Memory
OfficialThis server provides persistent memory tools for AI assistants (like Claude), letting them store, search, and manage facts, observations, journals, and persona context across sessions.
Remember facts – Save important information about the user, projects, preferences, or general context, optionally categorized (
user,feedback,project,reference,general).Recall memories – Search both SQLite memories and markdown memory files (including Claude Code auto-memory and
~/.sae4u-memory/) with configurable limits, categories, and source filtering (all/sqlite/markdown).List memories – Browse stored memories, optionally filtered by category, with a configurable result limit.
Delete outdated/wrong memories – Remove a memory by its ID using the
forgettool.Write session journals – Record end-of-session notes to
~/.sae4u-memory/journals/YYYY-MM-DD.mdfor human-readable history.Read recent journals – Retrieve journal entries from the past N days (default 7).
Load persona and user context – Get the current persona and user context at session start to maintain identity and personalized behavior.
Support structured memory architecture – Categories, daily tick logs, rules, templates, and hooks help maintain organized, reviewable memory with session continuity.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SAE4U Memory remember that I prefer Python for backend projects"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SAE4U Memory
A persistent memory architecture for Claude — MCP server + hooks + rules + prompts + templates. Free and open source. MIT.
Claude forgets you every time you close the chat. SAE4U Memory fixes that, and goes further: it ships an opinionated architecture for how persistent memory should be organized — not just storage, but classification, periodic review, persona, cleanup, and session continuity.
Built by Simple4u, an engineering firm in New York. Part of the SAE4U OSS family
alongside sae4u-agent.
What you get
Core (works in any MCP client — Claude Desktop, Claude Code, etc.)
Two-corpus recall —
recall(query)searches BOTH SQLite facts AND your markdown memory files (Claude Code auto-memory dirs +~/.sae4u-memory/) in one call. No re-explaining yourself.Hierarchical memory —
remember(text, category)with 5 categories:user,feedback,project,reference,general.Session journals —
journal(text)for end-of-session notes written to~/.sae4u-memory/journals/YYYY-MM-DD.mdfor human reading.Customizable persona —
persona.mdshapes the AI's identity. Default: Simple, a peer-level coder friend who remembers things.Local-first — your memory lives in
~/.sae4u-memory/on your machine. Nothing leaves.
Architecture (Claude Code with --code-full)
hooks/memory-tick.sh— UserPromptSubmit hook that fires every 10 min and forces a brief memory review. Catches borderline observations before they fall out of context.rules/— 10 universal feedback rules covering memory discipline, session continuity, anti-confabulation, hardcode prevention, post-write review.prompts/— opinionated session-open and session-close prompts that pair with the architecture.templates/— formats forMEMORY.md, feedback rules, project facts, and tick logs.commands/memory-distill.md— weekly distill ritual that promotes tick-log items to permanent memory interactively.
Related MCP server: Claude Memory Server
Install
Minimum (MCP only)
git clone https://github.com/Simple4uhq/sae4u-memory
cd sae4u-memory
pip install -e .
sae4u-memory initThis wires the MCP server into Claude Desktop and Claude Code, and
appends a guidance block to ~/.claude/CLAUDE.md. Restart your
client and the memory tools are live.
Full architecture (Claude Code only)
sae4u-memory init --code-fullAdds:
Copy
hooks/memory-tick.sh→~/.claude/hooks/memory-tick.shRegister the hook in
~/.claude/settings.jsonunderhooks.UserPromptSubmitScaffold
~/.sae4u-memory/MEMORY.mdDrop default rules into
~/.sae4u-memory/rules/
Restart Claude Code. The tick will fire every 10 min and instruct the AI to review and classify recent context.
Flags
sae4u-memory init --desktop # Claude Desktop only
sae4u-memory init --code # Claude Code MCP only
sae4u-memory init --code-full # Claude Code MCP + hook + scaffold
sae4u-memory init --no-claude-md # skip CLAUDE.md guidance block
sae4u-memory init --dry-run # preview changes without applying
sae4u-memory uninstall # remove all config entriesTools exposed (MCP)
Tool | Purpose |
| Save a fact to long-term memory |
| Search across SQLite + markdown roots. |
| Browse what's remembered |
| Delete a wrong/outdated memory |
| Write an end-of-session note |
| Read recent journal entries |
| Return full persona + user context |
How memory is organized
~/.sae4u-memory/
├── persona.md # Edit to customize behavior
├── memory.db # SQLite + FTS5
├── MEMORY.md # Index of permanent files (loaded at session start)
├── user/ # User context loaded by get_persona()
│ ├── identity.md
│ ├── projects.md
│ └── preferences.md
├── tick/ # Day-rolling tick log (NOT indexed in MEMORY.md)
│ └── 2026-05-07.md
├── archive/ # User-confirmed archived files
├── journals/ # End-of-session narratives
│ └── 2026-05-07.md
└── .last_tick # Epoch of last memory tickThe 4-type classification (user, feedback, project, reference)
plus the tick / permanent split is the architectural core. See
architecture.md for the
full explanation.
Documentation
All architecture content lives under sae4u_memory/_assets/ so it ships with the wheel.
docs/architecture.md— 5 concepts, file layout, the 4 types, what NOT to savedocs/tick-protocol.md— how the 10-min hook works, what gets written wheredocs/persona-customization.md— what's editable, what's loaded at session startdocs/episodic-bridge.md— optional pattern for users with a remote dev boxprompts/session-open.md— paste this at session startprompts/session-close.md— paste this at session endcommands/memory-distill.md— weekly cleanup ritualrules/— 10 universal feedback ruleshooks/memory-tick.sh— the UserPromptSubmit hook itselftemplates/— MEMORY.md, feedback rule, project fact, tick log
Customize
Edit ~/.sae4u-memory/persona.md to change the AI's identity, voice,
and rules. Edit ~/.sae4u-memory/user/*.md to pre-fill what the AI
knows about you. Both are loaded fresh on every session start.
The default persona is Simple — a peer-level coder friend. Rename, rewrite, or replace as you see fit.
Environment
SAE4U_MEMORY_HOME— override the data directory (default~/.sae4u-memory)SAE4U_MARKDOWN_ROOTS— colon-separated list of markdown roots thatrecall()should search. Defaults to all Claude Code auto-memory dirs (globbed from~/.claude/projects/*/memory/) plusSAE4U_MEMORY_HOME.
Uninstall
sae4u-memory uninstall # remove configs from Claude Desktop + Code
rm ~/.claude/hooks/memory-tick.sh # if you ran --code-full
rm -rf ~/.sae4u-memory # optional — also delete stored memories
pip uninstall sae4u-memoryStatus
v0.2.0 — memory architecture release. Full export of the pattern
the project authors run in production: hooks + rules + prompts +
templates + persona + extended init for Claude Code. Renamed from
simple4u-memory to align with the SAE4U OSS family.
Previous: v0.1.3 (under the old name) shipped two-corpus recall and a working-rules persona. v0.1.x users on PyPI: install fresh from this repo; the old package is no longer maintained.
Sister project
sae4u-agent— multi-tenant control plane and agent runtime template. The agents need memory; this is that memory.
License
MIT.
Available Tools
7 toolsforgetA
Delete a memory by its id.
Use this when a stored fact turns out to be wrong or outdated.
Args: memory_id: The id of the memory to remove.
Inputs: memory_id (required). Returns: result
get_personaA
Return the current persona + user context.
This gives the AI its identity and what it knows about the user. Call this at session start to load full context.
Inputs: no named parameters. Returns: result
journalA
Write an end-of-session journal entry.
Use this at the end of a significant conversation to record what happened, decisions made, and what to remember for next time. Journals are stored in ~/.sae4u-memory/journals/YYYY-MM-DD.md for human reading.
Args: text: The journal entry text.
Inputs: text (required). Returns: result
list_memoriesB
List stored memories, optionally filtered by category.
Args: category: Filter by category (user/feedback/project/reference/general). limit: Max results to return.
Inputs: limit, category. Returns: result
recallA
Search persistent memory for relevant facts.
Scans TWO corpora by default and merges results:
SQLite memories (written via
remembertool)Markdown memory files — Claude Code auto-memory + sae4u-memory home (configurable via SAE4U_MARKDOWN_ROOTS env, colon-separated paths)
Use this at the start of any substantive conversation to pull in prior context, feedback rules, project state, and recent session observations.
Args: query: Search terms. Empty string returns most recent entries. limit: Max results per source (default 5). category: Optional filter (SQLite only). sources: "all" (default), "sqlite", or "markdown".
Inputs: query (required), limit, sources, category. Returns: result
recent_journalsA
Retrieve recent journal entries.
Args: days: Number of days back to search (default 7).
Inputs: days. Returns: result
rememberA
Save a fact, observation, or piece of context to persistent memory.
Use this when you learn something important about the user, their projects, their preferences, or anything else worth recalling in future sessions.
Args: text: The fact or observation to remember. category: Optional category — "user", "feedback", "project", "reference", "general". Defaults to "general".
Inputs: text (required), category. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clear, distinct purpose: create (remember), read (list_memories, recall, get_persona, recent_journals), delete (forget), and journaling (journal). No two tools appear to do the same thing, even list_memories and recall are differentiated by browsing vs. searching.
Names mix patterns: verbs alone (forget, recall, remember, journal), verb+noun (get_persona, list_memories), and adjective+noun (recent_journals). While still readable, the lack of a uniform convention introduces minor confusion.
7 tools cover the essential operations for a memory system—create, read, delete, and journaling—without being excessive. Each tool feels justified and contributes to the server's purpose.
Core CRUD is mostly present, but update is missing (memories and journals can only be overwritten by deletion+recreation). This is a minor gap that agents can work around, so the surface is nearly complete.
Related MCP Connectors
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Portable AI memory you own. Keep memories and notes across Claude, ChatGPT, and other AI tools.
Encrypted long-term memory shared across your AI assistants (Claude, ChatGPT, Perplexity).
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceProvides Claude Desktop with persistent memory across sessions, storing up to 10,000 memories with semantic search and automatic context bridging. Features temporal versioning and anti-degradation protocols to maintain conversation continuity.-
- AlicenseNot gradedqualityDmaintenanceProvides long-term memory capabilities for Claude through persistent storage and full-text search of context across conversations. Enables storing, searching, and managing memories organized by categories like facts, preferences, projects, and goals.1ISC
- FlicenseAqualityDmaintenanceProvides persistent memory, identity, and context for Claude sessions through a memory graph, enabling recall, storage, and relationship management of entities and decisions.8-
- AlicenseNot gradedqualityAmaintenanceEnables Claude and other AI agents to store and retrieve persistent cross-session memories, preserving decisions, patterns, and knowledge across restarts and context limits.17 npmMIT