Persistent memory for AI coding agents: one Rust binary, one local SQLite database.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Install β’ How it works β’ Commands β’ Languages β’ Specs
Your coding agent forgets everything when the session ends, and most of it when the context is compacted. Leteo is the memory it keeps: decisions, bug fixes, conventions and the discoveries that were expensive to make, stored in a local SQLite database and handed back when they are relevant.
One binary, no server, no API key. Nothing leaves your machine unless you turn on cloud replication for a project you name.
Measured against itself β the same agent, the same questions, once with it and once without:
Four right answers out of four, where the agent without it got none out of three. That is the finding that survives the variance, and the tokens are the noisier half of it. Every run is here β both baselines, the fixed cost of about 15,400 tokens a session that both arms pay, and the pairing from these same seven runs that says Leteo costs 3.7x as much.
Works with: Claude Code Β· ZCode Β· Codex Β· Cursor Β· Gemini CLI Β· OpenCode Β· Windsurf Β· VS Code Copilot Β· Kilo Code Β· Qwen Β· Kiro Β· Antigravity Β· Pi Β· DeepSeek Harness
You never prompt it to remember. That is the whole idea. Your agent opens each session already holding what the project knows, and saves as it goes while you work β a bug fixed, a convention agreed, something non-obvious learned. Those notes are written for its future self rather than for you, so they stay out of the conversation.

The rest is a SQLite file you own. leteo tui opens it, leteo export takes it
with you, and leteo delete means it.

Measured rather than asserted, over thirteen runs: four right answers out of four on the questions the code cannot answer, where an agent without it got none out of three β or three out of three against that same none out of three, on the strict protocol. That is the finding that survives the variance.
The tokens are noisier. On those same questions the median saving is 27% and the best case 70% β or 17% and 44% if you drop the one run whose prompt differed by a field, which the article does for you. On questions the code does answer the difference is inside the noise, and the same thirteen runs support "costs 3.7x as much" if you pick the opposite pair.
does memory save tokens? shows every run, both baselines, the fixed per-session cost of about 15,400 tokens, and where the number is weak. The honest summary is that it does not reliably save you tokens β it stops your agent confidently answering something else.
Or through a package manager, if you already keep your tools in one. Homebrew covers macOS and Linux, on both architectures:
That last one puts leteo on your PATH for the command line, and is the one
route that cannot configure an agent: leteo setup refuses from a binary npm
is holding, because the path it would write down is one npm deletes. Configure
the agent with the npx line instead, or
install by any of the routes above.
Then open Leteo and set your agent up from the Setup screen:
That is all of it. Nothing else to install first β not Rust, not SQLite, not a
runtime: the archives are prebuilt binaries with SQLite compiled in, and each
script checks its download against the published SHA256SUMS before installing
anything. From the scripts the binary lands in ~/.local/bin, or
%LOCALAPPDATA%\leteo\bin on Windows β Homebrew and Scoop put it where they
put everything else. LETEO_INSTALL_DIR moves that, LETEO_VERSION takes a
tag other than the latest release, and LETEO_BASE_URL downloads from
somewhere other than GitHub releases. Those three belong to the scripts rather
than to the binary, which is why they are not in the
Environment table.
Releases carry five builds β x86-64 Linux, Windows and macOS, and arm64 Linux and macOS. The two Linux ones ask for nothing newer than glibc 2.34, so they run on Debian 12, Ubuntu 22.04, RHEL 9 and anything later. That floor is pinned in the release workflow rather than inherited from whichever image GitHub calls latest: v0.1.0 inherited it, and wanted a glibc newer than Debian stable's. On anything else, build from source, which is the one route that needs Rust:
That builds the released version from crates.io.
cargo binstall leteo fetches the same release binary instead of compiling it,
which is the faster half of that sentence. To build whatever is on main
instead, including work that has not been released yet, ask for the repository:
cargo install --git https://github.com/asanabrial/leteo.
Most MCP documentation assumes npx, so there is a wrapper on npm that fetches
the release binary for your platform, checks it against the same published
SHA256SUMS, and hands it every argument:
bunx @asanabrial/leteo mcp works the same way β it is the same package from
the same registry, and the wrapper depends on nothing but what both runtimes
already have. npm install -g above is that same package installed once
instead of fetched per run.
The npm version is the release tag, so pinning one in npm pins the binary it
fetches β a guard holds the two numbers together, because published one behind
it would quietly serve the previous release to everybody arriving this way. It
is a way in rather than the way to run it: a binary on your PATH starts
without a download and is what leteo setup writes into your agent.
Claude Code takes Leteo as a plugin, which registers the same MCP entry and the
same five lifecycle hooks leteo setup writes, through Claude Code's own plugin
machinery:
The plugin carries configuration, not the binary. Install leteo by one of the
routes above first: the MCP entry and every hook the plugin registers run
leteo from PATH, so without it they are five commands that are not there.
What the plugin replaces is the setup step, and removing it takes those entries
away again.
Pick one of the two, not both. Registered twice, every lifecycle event runs
twice β which stored each prompt twice, 23 identical pairs on the machine where
it was found, before anybody noticed anything was wrong. leteo setup --hooks
now looks for an installed bundle and refuses rather than adding a second
registration, naming the file it found.
Codex has the same bundle under plugin/codex, and there it is
the only route to the hooks β leteo setup codex registers the MCP server and
no hooks at all, which leaves Codex holding the tools with nothing telling it
when to reach for them.
ZCode has one under plugin/zcode, from the same marketplace.
Adding a marketplace is a desktop action, not a command: Settings β Plugins β
Create β Add marketplace, pointing at asanabrial/leteo. Then install
leteo-zcode from the list.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/leteo)<a href="https://allmcps.com/mcp/leteo"><img src="https://allmcps.com/api/badge/leteo?style=directory" alt="Leteo on AllMCPs" /></a>