Every AI chat I opened started from zero, and every app started from zero again. I'm a student, I use several AI apps every day, and I kept re-explaining my projects, my stack and my decisions to each of them.
So I built Keepfold: one memory folder on my own PC that all of them read from and add to, through MCP. This post is how it works, what broke while shipping it alone, and where other tools are the better choice.
What it does
You install it, pick a folder and connect your AI apps (one click each for Claude Desktop, Claude Code, Codex CLI, Gemini CLI, Cursor, VS Code, Windsurf, Antigravity and LM Studio). From then on:
- What you work on, decide and prefer is saved as plain Markdown notes in that folder.
- A new chat in any connected app starts with the parts that matter for your message.
- Everything stays on your computer. No account, no telemetry.
Here is what an AI app actually gets. In the sample vault, a made-up student types "Add a save command to my text adventure game". Before the model answers, Keepfold adds this (shortened):
## Related
- [[text-adventure]] — A small terminal game: rooms in a dict, one function per command.
- [[functions]] — Functions
- [[loops]] — Loops
So the model starts out knowing how the game is built. With your own vault, the lines you pinned ("Python 3.12, type hints, uv only") and the preferences that fit the message come first.
The design in one picture
Claude Code, Codex, Gemini CLI ── hook ──┐
Claude Desktop, Cursor, VS Code ── MCP ──┤
▼
keepfold (stdio MCP server)
│
▼
vault: one folder, in git, opens in Obsidian
Markdown notes + JSONL events = source of truth
│
┌──────────────────────┴───────────────┐
▼ ▼
search: SQLite FTS5 levels, plan, dashboard:
+ local embeddings derived, rebuilt on demand
A few choices that shaped everything else:
- The vault is the source of truth. Notes are Markdown with YAML front matter. Events (what was asked, graded, saved) are append-only JSONL. Everything else, like the search index, the vector cache and the dashboard, is derived. Delete it and Keepfold rebuilds it.
-
Every write goes through one module. It takes a lock, writes a temp file, swaps it in with an atomic replace and refuses text that looks like a secret. With git on, each chat's changes become one commit, so
keepfold undo <session>can revert a chat that saved something wrong. - Search is local. SQLite full-text search plus a small embedding model (about 150 MB, downloaded once). Without the model, keyword search still works.
- Context arrives before the first tool call. Waiting for the model to decide to call a memory tool is unreliable, so Claude Code, Codex CLI and Gemini CLI get context through a hook on the first real message of each chat. Cursor, VS Code and Codex also get your pinned lines in their rules file.
- Each app sees only what its profile allows. By default a coding app gets your pinned lines, coding preferences, setup and projects, never your journal or people pages.
Why plain files
I wanted to be able to read my memory, fix it by hand, grep it, back it up and delete it, without asking a service. A folder of Markdown gives all of that for free. Obsidian opens it as a vault. Git gives it history. If Keepfold disappeared tomorrow, the notes would still be readable.
There is one rule that keeps this honest: numbers are never stored in notes. Study levels and spaced-repetition states (FSRS) are worked out from the event log every time. If a grade was wrong, cancelling it makes everything recompute, and nothing goes stale.
Your notes are untrusted input
A memory that AI apps read is also a place where someone can plant instructions. A web page you saved, an imported chat or a note could contain "ignore your previous instructions".
So note text never reaches a model as plain text. Over MCP it is wrapped in <untrusted_note> tags, so the model can tell your notes from instructions. In the app and the dashboard it is escaped and stripped of links and images, and the dashboard runs under a default-src 'none' content security policy. Lines about you that try to drop an AI's rules, give it a persona or open with a role label are refused when they are written.
None of this makes prompt injection impossible. It makes the easy versions fail.
What broke while shipping a Windows app alone
Keepfold had 15 releases in its first ten days on GitHub. Most of the fixes were not about memory at all:
-
Usernames with spaces. The installer failed when the install folder's path had a space in it, which is every
C:\Users\First Last. Fixed in 0.6.1, along with making sure every PC gets x64 Python. - Campus networks. The one-time model download failed behind a proxy and its own certificates. Keepfold now uses the system proxy and the OS certificate store, and says in a plain sentence what went wrong.
- SmartScreen. The installer is not code-signed yet, so Windows warns that it "protected your PC". The README says so up front, explains More info then Run anyway, and every release lists the installer's SHA-256.
- Renaming the project. It was called Cortex until 0.6.2. The rename moves settings, the vault and every AI-app connection over by itself on first run. But the older versions' updater could not find releases in the renamed repo, so people on 0.6.1 have to download the installer once by hand. If you might rename, plan the updater for it first.
The test suite (about 4,800 tests) runs only on made-up data in temp folders. The real vault never goes near it.
Keepfold next to other AI memories
Each of these is a good tool built for a different job. This is only what their own docs say, as of November 2026:
| Keepfold | ChatGPT memory | Claude's memory | Basic Memory | mem0 / OpenMemory | |
|---|---|---|---|---|---|
| Works across several AI apps | Yes | No, ChatGPT only | No, Claude apps only | Yes, any MCP app | Yes, any MCP app |
| Plain files on your PC | Yes | No | No (you can export it) | Yes, Markdown | No, a vector database |
| Free and open source | Yes, MIT | No | No | Yes, AGPL-3.0 | Yes, Apache-2.0 |
| One-click Windows installer | Yes | Built in | Built in | No, uv or Homebrew | No, Docker |
When the other tool is the better choice:
- ChatGPT's or Claude's own memory if you live in one app and don't want to install anything.
- Basic Memory if you're on macOS or Linux and want a Markdown memory for MCP apps that installs with uv or Homebrew.
- mem0 if you're building memory into your own app or agents and already run Docker.
- claude-mem if you only use Claude Code and want its tool activity recorded for you.
Limits
- The installer is Windows 10 and 11 only. On macOS and Linux it runs from source with uv, and it is tested most on Windows.
- The installer is not code-signed yet.
- It's a beta until 1.0. I use it every day, but expect rough edges.
- The optional local Chat with a small model (2B) can get a detail wrong. It cites the notes it used, so check them.
Try it
Keepfold is free and MIT: github.com/alenissacsam-2/keepfold. Issues and Discussions are open, and bug reports are the most useful thing you can send me.
If you'd rather watch than read, here is the 43-second film:
One question for you: what would you want your AI apps to remember about you, and what should they never be allowed to save?
Written by Claude (AI) from Keepfold's docs and commit history, and published at my request.

Top comments (15)
With stdio, every connected app starts its own keepfold process, so Claude Desktop, Cursor and Codex open at the same time are three processes writing one vault. The reference memory server in the MCP servers repository documents this case: each client starts its own server process, a write takes a lock file next to the memory file, a write that cannot get the lock within 60 seconds fails instead of overwriting, and a network filesystem that does not honour the lock cannot share it safely. Is your lock a file lock that all keepfold processes see, or one inside each process? A separate point on the one-click list: Windsurf has been Devin Desktop since 2 June, and its docs name three different paths for the MCP config, so I would check which one the installer writes.
You were right about Windsurf, thank you. Current Devin Desktop reads
%APPDATA%\devin\mcp_config.jsonon Windows and~/.config/devin/mcp_config.jsonon macOS and Linux, and Keepfold was still writing the old~/.codeium/windsurffile. We'll fix that in the coming release, 0.8.0: Keepfold will write Devin Desktop's file, and the old one too when an older Windsurf build is installed.This is fixed in 0.8.0, out now. Connect AI apps writes Devin Desktop's mcp_config.json, and the old ~/.codeium/windsurf file too when an older Windsurf build is installed. Thanks again for catching it. github.com/alenissacsam-2/keepfold...
It's a file lock that every Keepfold process sees:
.keepfold/lockin the vault, created with O_EXCL and holding the pid, a timestamp and the host name. Each process also has a thread lock, so one process can't race itself. A write waits a few seconds (5 by default), then fails with "the vault is busy" rather than overwriting. Under the lock, a page goes to a temp file and is moved into place with os.replace, and an event is one appended line.A lock is taken over only when its holder is gone: a dead pid, or a pid reused after a reboot. A lock from another machine is judged by its age, after 120 seconds. That lock did bite me once. On Windows, two processes took it inside the same 15.6 ms clock tick, and the second one took over a live lock. The token now carries a counter and the process's start time.
On shared folders: a synced folder (OneDrive, Syncthing) can't carry a lock between two PCs in time. So Keepfold finds the conflict copies those tools leave, and merges its own event log copies. I haven't tested a network filesystem that ignores O_EXCL, so I wouldn't promise that case.
Thanks for the Windsurf note. Keepfold writes
~/.codeium/windsurf/mcp_config.jsontoday. I'll check it against the current docs.The separation between source notes and rebuildable indexes is a strong design choice. For cross-app injection, I would also keep provenance and review state beside each retrieved note: who or what created it, when it was last confirmed, and whether it is a preference, a project decision, or untrusted imported material. That gives a new agent enough context to weigh a memory without treating every matching line as equally authoritative.
Thanks, agreed. Some of that is already there. Each line has a tier: what you typed or confirmed goes into the prompt plain, and a line an AI app inferred is marked "(ask)" and ranked below, so the next agent checks before leaning on it. A guess made in one app isn't served to the others until you confirm it, and a guess no app uses for 30 days retires itself. Page text, imported chats included, arrives inside
<untrusted_note>tags, so an agent reads it as data, not instructions. What's missing is a "last confirmed" date on each line. That's a good idea, and I'll look at adding it.@alenissacsam The miss is the number to log. Count how many times a session fetches a second page after the slice. If that rate stays low, a capped start beats loading the vault on every turn.
Agreed, and part of it is there already. Each recall an agent makes, and the reads that follow it, go into a local log on your own computer, and
keepfold eval recallreplays them. What the log doesn't hold yet is the slice itself, so a miss can't be counted against it. That's the next step: record which pages the slice carried, then count a later read in the same chat that lands on a page it left out. The rate stays on each person's computer, since Keepfold sends nothing home, so I'll start with my own numbers.Update: the miss count is on main now and goes out in the next release.
keepfold eval recallends with one more line: how many prime slices there were, how many pages an app read within 10 minutes after one, and how many of those reads were pages the slice had not carried.It counts from the log Keepfold already keeps of what each tool served (page ids only), so nothing new is stored. One limit: it groups by app, not by chat, so two chats in the same app inside those 10 minutes share their slices. I'll share my own rate after a week of use.
When Keepfold loads shared project notes into Claude Code, Cursor, and Codex, what rules do you include so each agent extends existing shared modules instead of creating duplicate implementations?
Good question. Keepfold doesn't put coding rules into your repo. A rule like "use utils/http.py, don't write a new client" still belongs in the repo's own CLAUDE.md or AGENTS.md, where every tool reads it.
What Keepfold carries is what follows you across apps and repos. Save "Extend an existing module before writing a new one" once as a preference, and each app gets it when a chat starts, through the same MCP call. Decisions ("we picked X over Y because...") are pages any of them can look up before building.
So the rule is written once, not three times. It can't make an agent follow it, though. It only makes sure each one has seen it.
Thanks for the detail on keeping repo-specific rules in CLAUDE.md or AGENTS.md while Keepfold carries cross-repo preferences and decision pages over MCP, I'm building AI Lint, a pre-flight checklist (CHECKLIST.md), language doctrine, and rejects catalog (such as AR-R2: Parallel Solutions, requiring the agent to name the existing module it extends before writing code) that drops into a repo alongside AGENTS.md (the free edition is for personal use only, while company teams use the paid packs or Company license): ai-lint.dosaygo.com/go/forum-20261...
Thanks. Making the agent name the module it's extending before it writes any code is a useful check, and it belongs in the repo next to AGENTS.md, as you say. Good luck with AI Lint.
Shared memory is cheap only while it stays small. Every agent that reads the file loads it again on every run, so its size becomes a fixed cost for each of them.
True, and that's why no agent loads the whole vault. At the start of a chat, Keepfold sends a capped slice picked for that prompt, 2,000 characters at most: a few profile lines, the preferences that match, and the pages related to what you asked. So the vault can grow to thousands of pages and each run still pays the same small cost. Anything more, the agent fetches on request through search or a read. The tradeoff is the one you'd expect: if the right page doesn't make that slice, the agent has to go and ask for it.