You repeat yourself
Each new chat, tool, or model needs the same background again. That costs time and tokens, and things get missed.
Portable memory for every AI assistant
Memty keeps the facts, decisions, and preferences you share with AI in one private vault on your own computer. One local daemon serves that memory to ChatGPT, Claude, Gemini, and Perplexity in your browser, and to Cursor, Claude Code, Codex, and any MCP client on your desktop. Save a fact once, and stop repeating yourself in every new chat.
pip install memty
One synthetic five-turn task, three runs. Method, raw results, and limits →
Great choice. Your API uses FastAPI and runs on PostgreSQL 16 on Neon. Deploy it to Fly.io with two machines.
+ Save to MemtyThe problem
You explain your project, your stack, and your preferences again and again. When an assistant does remember, that memory is locked inside one company's product, mixed with everything else, and hard to inspect.
Each new chat, tool, or model needs the same background again. That costs time and tokens, and things get missed.
What ChatGPT knows about you doesn't help in Claude, Gemini, or your code editor. Switching tools means starting over.
Built-in memories are opaque. It's hard to tell what was stored, fix what's wrong, keep secrets out, or delete something for good.
What Memty does instead
A single local file that works with chat websites, MCP clients, the clipboard, and Python.
Memory is stored as short Title: value facts, not long transcripts, so it stays accurate and cheap to send.
Facts from chats are only proposals. You edit or untick them before anything is saved.
Nothing leaves your computer until you press Send. Private facts appear to AIs only as [private].
How it works
Everything runs on your machine. Every assistant reaches the same vault through one local daemon: browser chats through a small local bridge, desktop and coding agents through the Model Context Protocol, and you through the terminal. Nothing is synced between apps. They all read the same file.
memty CLI127.0.0.1:8765. Needs the pairing token and an approved extension. Starts at login.memty_sync, memty_propose, memty_drill.Connections and ports
| Piece | How it's reached | Who may connect |
|---|---|---|
| memtyd | 127.0.0.1, random port, recorded with a secret token in ledger.sqlite3.daemon.json | Local processes that can read that file. Every request carries the token, and only a fixed list of vault operations is accepted. |
| Browser bridge | 127.0.0.1:8765 (change with --port) | Only extensions you paired. Web pages, other hosts, and other origins are refused. |
| MCP server | stdio, no network port | Only the app that started it, such as Cursor or Claude Code |
| CLI | Directly to memtyd | You, in your terminal |
A fact's journey: from ChatGPT to Cursor
In ChatGPT you select "We deploy on Fly.io" and click + Save to Memty.
The bridge turns the selection into short facts on your computer, with no model call. You review and save.
memtyd writes deploy_target: Fly.io into the project.api namespace as a confirmed fact.
In Cursor the agent calls memty_sync for project.api. memtyd builds a 120-token capsule and runs the privacy gate.
Cursor gets Deploy target: Fly.io. A receipt records that one fact was served, without its value.
Five ideas behind it
One value per namespace.slot, at most 40 tokens. Saving a new value replaces the old one and keeps the history.
Separate contexts such as work.project or personal. A chat only gets the namespace you choose.
Builds a small capsule per request: newest facts first, or the most relevant ones for a question, under a hard token budget.
Every capsule is checked: private values are masked, secrets stop the request, blocked providers get nothing.
Proposals need your approval, from chats and from agents. Your own facts can't be overwritten automatically. Deleted means deleted.
Proof: tokens and accuracy
We passed one architecture handoff between Claude and Gemini over five turns, three ways: replaying the full documents, sending retrieved snippets, and sending a selected Memty context. Token counts are what the providers reported. Each run made real, billable API calls.
61.1%
fewer input tokens: 5,448 vs 13,989 across three runs
42.0%
fewer input tokens: 5,448 vs 9,386
30/30
expected values returned exactly. Both baselines: 27/30.
88%
smaller memory payload than the full documents (445 vs 3,710 estimated tokens, five turns)
Every run, as the providers reported it
| Run | Context supplied | Input tokens | Output tokens | Exact answers |
|---|---|---|---|---|
| 1 | Full document replay | 4,663 | 309 | 9/10 |
| 1 | Simulated retrieval | 3,148 | 463 | 9/10 |
| 1 | Selected Memty context | 1,816 | 204 | 10/10 |
| 2 | Full document replay | 4,663 | 308 | 9/10 |
| 2 | Simulated retrieval | 3,090 | 477 | 9/10 |
| 2 | Selected Memty context | 1,816 | 204 | 10/10 |
| 3 | Full document replay | 4,663 | 281 | 9/10 |
| 3 | Simulated retrieval | 3,148 | 363 | 9/10 |
| 3 | Selected Memty context | 1,816 | 204 | 10/10 |
Getting facts in costs nothing
memty scan read this repository's manifests and saved 21 baseline facts in a median of 7.4 ms, with no model call.
Facts are picked from a selection with fixed local rules. An optional local Ollama model never leaves your machine.
Ranking, the privacy gate, and packing to the token budget run locally, in a median of 3.0 ms.
Get started
Requires Python 3.10 or newer on Windows, macOS, or Linux. No account, API key, or sign-up.
pip install memty
Installs the CLI, the vault, the MCP server, and the browser extension files.
memty serve --autostart
Starts Memty now and every time you log in. Per-user, no admin rights. Undo with memty serve --no-autostart.
memty extension --open
Open chrome://extensions, turn on Developer mode, click Load unpacked, and pick the folder that opened. It pairs itself, with no token to copy.
memty connect. It connects each detected client through the client's own official installer. Then restart the client.memty init (or memty scan) once in its folder. Memty reads your manifests and saves 10 to 20 baseline facts about the stack, with zero tokens, so your agents start with context instead of an empty vault.memty remember work.project editor "VS Code" saves a fact, and memty clip work.project copies your facts for any AI app.Browser extension · Memty Bridge
Works on ChatGPT, Claude.ai, Gemini, and Perplexity in Chrome, Edge, and Brave. A small purple pill sits above the message box. Drag its ⋮⋮ grip anywhere, and each site remembers the spot.
Adds your saved facts to the top of the message box, newest first, within about 350 tokens. You see and can edit it before sending.
Select any part of an answer and a bubble appears. Memty proposes short facts from it, right on your computer.
Rename titles, fix values, or untick anything. Saving replaces an older value with the same title and keeps private facts private.
Opens your fact list: search, edit, add, delete, mark private, and switch or create namespaces.
What the AI receives
Database: PostgreSQL 16 on Neon Deploy target: Fly.io Editor: VS Code Files: memty-extension/manifest.json, memty-extension/content.js Client: [private]
Title: value line per fact. Facts with the same title share a line.[private]. A secret fact stops the request instead.How facts are picked from your selection
Removes formatting, links, citation numbers like [1], and Memty blocks you pasted earlier.
Bullet points and Key: value lines first, otherwise the first five plain sentences of 4 to 30 words.
Drops questions, headings, fragments under 3 words, and lines that look like code.
Uses the key as the title (or the first meaningful words), groups file paths, caps each fact at 40 tokens, max 12.
Code is never stored. Each block becomes one line, such as Python code in db.py defines connect, Ledger.
Key: value lines, short sentences), not its meaning, which is why every proposal goes through your review. For smarter extraction, set MEMTY_OLLAMA_MODEL (for example llama3.1) to use a local Ollama model. It still runs on your machine, and Memty falls back to the rules if Ollama doesn't answer.Desktop & CLI agents
Cursor, Claude Code, Codex, VS Code, Windsurf, and Claude Desktop reach the vault over the Model Context Protocol. The clipboard and Python cover everything else. The same vault powers every route; use one or all of them.
MCP clients: one command
| Client | How memty connect connects it |
|---|---|
| Claude Code | Runs Claude Code's official claude mcp add --scope user memty, so Claude Code validates and saves its own settings. |
| Cursor | Opens Cursor's official MCP install link, and Cursor asks you to confirm. |
| Codex CLI | Runs Codex's own codex mcp add memty installer. |
| VS Code | Runs code --add-mcp with a stdio server definition. You confirm in VS Code. |
| Claude Desktop | Prints the exact entry and where to add it (Settings › Developer › Edit Config). |
| Windsurf | Prints the exact entry for Windsurf's MCP settings. |
What agents can do
| Tool | What it does | Guardrail |
|---|---|---|
memty_sync | Recall a namespace's capsule. When you ask, save up to 25 facts in one call and get the updated capsule back. | 120-token capsule, checked by the privacy gate. MCP clients are treated as cloud providers by default. |
memty_propose | Suggest a fact the agent learned on its own, from code, config, or what you said. | New facts are saved as unconfirmed. A change to an existing fact waits in your inbox until you approve it. |
memty_drill | Read the archived source text behind a fact. | Only for a genuinely local model, and at most 4,000 characters. |
memty clip work.project # copy your facts
memty clip work.project --query "deploy" # most relevant first
memty clip work.project --print # print instead
memty clip work.project --format xml # for agents and tools
Treated as a cloud destination: private values are masked, and secrets stop the copy. Tip: bind it to a keyboard shortcut.
from memty import open_ledger
vault = open_ledger() # ~/.memty/ledger.sqlite3
vault.record("work.project", "editor", "VS Code",
verification_state="USER_CONFIRMED")
capsule = vault.context("Which editor do I use?", provider="claude")
print(capsule["text"]) # bounded <memty_state> block
Also: vault.forget(), vault.rehydrate() to restore masked values locally, and vault.drill_down() for archived source text.
Trust control plane
Memory you can't inspect is memory you can't trust. Memty fills itself without a model, lets agents suggest instead of overwrite, and keeps a receipt every time it hands memory to an assistant.
Reads pyproject.toml, package.json, Cargo.toml, Dockerfile, and .env.example and saves your stack as facts in milliseconds, with no model and no network. From env templates it keeps key names only; a real .env is never opened. Facts you confirmed or deleted are never touched.
When Cursor or Claude Code learns something, a brand-new fact is saved as unconfirmed. A change to a fact you already have waits in your inbox: memty approve or memty reject. Approving never lowers a fact's privacy level.
Recall, clip, MCP, and the browser each log what they served: which client, how many facts and tokens, how many values were masked, and any request a secret blocked. Slot names only, never values.
$ memty inbox
[1] project.api -> cache_engine: "Redis" [confirmed] => "DragonflyDB" (Proposed by Cursor)
why: compose.yaml runs dragonfly
$ memty approve 1
[1] approved: project.api.cache_engine = "DragonflyDB" (user-confirmed, v2)
The old value stays in memty history. memty reject 1 leaves the fact untouched.
$ memty report
42 capsules served across Claude, Cursor & Perplexity | 114 verified facts reused
| ~91,000 tokens saved | 4 SECRET slots protected
By channel web 24, mcp 15, recall 3
Privacy 6 confidential value(s) redacted, 2 request(s) blocked by a SECRET slot
Most reused project.api.database x31, project.api.framework x27
Illustrative numbers. "Tokens saved" is a conservative local estimate, compared with sending the whole namespace and its sources, and the report says so.
Your facts, your control
Open Your Memty facts from the ☰ button on the pill or from the extension icon. Everything Memty knows is listed there, newest first.
Every fact in a namespace, with when it was saved and whether you added it or it came from a chat.
Change a title or value, or add a fact by hand. Your edits are marked as confirmed, so automatic extraction can never overwrite them.
Chat AIs only see [private]. The real value is never sent to the browser, not even to this page, but you can still replace or delete it.
Deleting removes the value and its whole history. Saving from a chat can't bring it back. Only you can, by adding it again.
Switch between contexts like work.project and personal, or create a new one. Each chat gets one namespace.
Every change keeps the previous value. In the terminal, memty history work.project editor shows them.
Where your data lives
| What | Where | Notes |
|---|---|---|
| Your facts | ~/.memty/ledger.sqlite3 | One SQLite file on your disk. On Windows: C:\Users\<you>\.memty. Change it with --db or MEMTY_VAULT_PATH. |
| Inbox and receipts | Inside the same file | Agent proposals waiting for you, and one receipt per capsule served (counts and slot names, never values). |
| Daemon | ledger.sqlite3.daemon.json, .daemon.lock | The running memtyd's loopback port and secret token, and the lock that allows only one daemon per vault. |
| Pairing | ledger.sqlite3.web-token, .web-paired.json | The extension's token (owner-only) and which extensions may connect. |
| Extension files | ~/.memty/browser-extension | Installed by memty extension. |
| Browser storage | Extension settings only | Port, token, chosen namespace, and pill position. No facts are stored in the browser. |
| Cloud | Nothing | Memty has no servers, accounts, sync, or telemetry. |
Privacy & security
Every fact has a privacy level. Every request is checked against it before anything is shown to an AI.
Shared with any assistant you send it to.
Editor: VS CodeOnly for local models and providers you trust. Cloud chats don't receive it.
(left out)Cloud assistants see a placeholder. The real value stays on your computer.
Client: [private]Never sent to a cloud assistant. A matching request is stopped and asks for a local model.
request refused127.0.0.1, never on your network. This can't be changed.memty pair: one more extension may connect within two minutes.openai), so a page can't pretend to be trusted.memty serve --new-token and restart the bridge. Every extension must pair again.~/.memty folder.Under the hood
Memty's behaviour is set by a handful of guarantees, each covered by automated tests.
| Guarantee | How it's enforced |
|---|---|
| No contradictions | One value per namespace.slot. A new value supersedes the old one, which moves to an audit table with its version number. |
| Facts stay small | Values over 40 tokens are rejected, so each fact is one clear statement. |
| Deleting is permanent | Forgetting a fact tombstones it and purges its value and history. |
| Automation can't overrule you | Automatically extracted facts can't overwrite facts you confirmed, and can't restore facts you deleted. |
| Agents ask first | An agent's change to an existing fact goes to the inbox, never straight into the vault. Approving keeps the fact's privacy level and provider rules. |
| One writer | All tools go through one memtyd per vault, which handles one request at a time, so concurrent tools can't corrupt or overwrite each other. |
| Every capsule is accounted for | Each capsule served, and each request a secret blocked, writes a receipt with counts and slot names. Values are never written to receipts. |
| Bounded context | Every capsule is checked against a hard token limit: 350 for chat websites, 200 for the clipboard by default, 120 for MCP, and 600 for the API by default. |
| Newest first | Without a question, the most recently saved facts lead. With a question, facts are ranked by keyword overlap and optional semantic similarity. |
| Raw text stays out | Source text archived with a fact is never put in a capsule. It's only returned by an explicit drill-down call. |
| Rules per namespace | Logical rules such as "when writing database queries, always use async Motor" are stored per namespace and managed with memty rule. |
| Fast | Building a capsule takes about 3 ms (median) with 300 facts. Search uses SQLite FTS5 when available, with a plain SQL fallback. |
| Few dependencies | The vault and compiler use only the Python standard library. The package adds the official MCP library. |
Anatomy of a fact
| Field | Example | Meaning |
|---|---|---|
| Namespace | work.project | Which context it belongs to |
| Slot (title) | deploy_target → "Deploy target" | Its name; one value per slot |
| Value | Fly.io | The fact itself, up to 40 tokens |
| Verification | USER_CONFIRMED, SPEC_LOCKED, EXTRACTED | Who stands behind it: you, a pinned spec, or automatic extraction |
| Sensitivity | PUBLIC, INTERNAL, CONFIDENTIAL, SECRET | Who may see it (see Privacy) |
| Providers | allowed / blocked lists | Per-fact allow and block lists, e.g. never send to one provider |
| Version | 3 | How many times it has changed; older values are in the history |
| Hit count | 27 | How many capsules have included it, from the receipts |
Commands
Run memty for a short introduction, or memty --help for every option.
| Command | What it does |
|---|---|
memty serve --autostart | Start the browser bridge now and at every login. --no-autostart undoes it, --stop stops it. |
memty extension | Install or update the browser extension folder. Add --open to open it. |
memty pair | Let one more browser (or a reinstalled extension) connect within two minutes. |
memty connect | Connect Cursor, Claude Code, Codex CLI, VS Code, Windsurf, and Claude Desktop. --dry-run shows the plan. |
memty init · memty scan | Save a code project's baseline facts from its manifests, with zero tokens. --dry-run previews them. |
memty inbox | Review facts your agents proposed. --all includes resolved ones. |
memty approve ID · memty reject ID | Accept a proposal as a confirmed fact, or discard it. --all for every pending one. |
memty receipts · memty report | See each capsule served, or a summary: capsules, facts reused, estimated tokens saved, secrets protected. --days 7 limits the period. |
memty remember NS SLOT VALUE | Save a fact, e.g. memty remember work.project editor "VS Code". |
memty recall "question" | Print the capsule for a question. Add --namespace and --provider. |
memty clip NS | Copy a namespace's facts to the clipboard for any AI app. |
memty list · memty history NS SLOT | List active facts, or show earlier versions of one fact. |
memty forget NS SLOT | Delete a fact and its history. --purge-raw also removes archived source text. |
memty summary NS --set "…" | Set a short summary for a namespace. |
memty rule · rules · rule-delete | Manage logical rules for a namespace. |
memty stats | Show vault counts and its location. |
memty migrate PATH | Import the latest facts from an earlier Memty vault. Deleted facts stay deleted. |
memtyd status · start · stop | Check or control the shared background daemon. It starts automatically when needed. |
Settings
| Setting | Default | Purpose |
|---|---|---|
--db / MEMTY_VAULT_PATH | ~/.memty/ledger.sqlite3 | Where your vault lives |
--user / MEMTY_USER | local | User inside the vault |
MEMTY_PROVIDER | external | How MCP clients are treated by the privacy gate |
MEMTY_OLLAMA_MODEL | not set | Use a local Ollama model to extract facts |
Progress & roadmap
Memty is in alpha (0.x). The storage format is stable and tested, while commands may still change between minor versions. See the changelog.
The foundation: a local SQLite vault of small, versioned facts and a compiler that builds bounded, privacy-checked context.
A shared background service and an MCP server, so desktop and coding assistants use the same memory safely.
memtyd: one local daemon per vault, shared by every clientmemty_sync and capsule resourcesmemty connect through each client's official installer, never editing their settings filesMemty reaches ChatGPT, Claude.ai, Gemini, and Perplexity, with a full fact manager and zero-setup install.
Title: value capsules, newest firstmemty pair, login autostart, memty clippip install memtyMore desktop clients on the same vault, and the first public token benchmark.
memty connect for Codex CLI and VS Code, alongside Claude, Cursor, and Windsurfmemty_sync saves up to 25 facts in one call; memty_drill for local modelsMemty stops being a black box: it fills itself without a model, agents propose instead of overwrite, and every capsule leaves a receipt.
memty scan / memty init: zero-token project bootstrap that never stores secret valuesmemty_propose and the memty inbox, approve, reject review queuememty receipts and memty reportPublish weeks 4 and 5 to PyPI, and list the extension on the Chrome Web Store so it installs in one click, without Developer mode.
More tasks and repeats, comparisons with named RAG and MCP memory products using real tool calls, and the cost of creating memory counted, not just of reusing it.
FAQ
No. Your facts live in one file on your computer, ~/.memty/ledger.sqlite3. Memty has no servers, accounts, sync, or telemetry, and the browser only keeps settings, never facts.
The one moment facts leave your computer is when you press Send in a chat: the block in your message goes to that AI company, like anything you type.
In our published benchmark, yes: across three live runs passing one architecture handoff between Claude and Gemini, Memty's selected context used 5,448 input tokens versus 13,989 for replaying the full documents (61% less) and 9,386 for retrieved snippets (42% less), and it returned all 30 expected values exactly.
That's one synthetic task, not a guarantee for every workload, and it doesn't count the effort of creating the facts. The prompts, raw results, and code are public so you can rerun it. See Proof.
They all talk to the same local daemon, memtyd, which owns your vault file. The browser extension reaches it through the bridge on 127.0.0.1:8765; Cursor, Claude Code, Codex, and other MCP clients reach it through their own MCP server; the CLI reaches it directly. Nothing is copied between apps, so a fact saved in ChatGPT is in Cursor's next recall.
Not on its own. An agent can add a brand-new fact, saved as unconfirmed. Any change to a fact you already have waits in memty inbox until you run memty approve. Facts you confirmed or deleted can't be changed by automation.
Not by default. It uses fixed rules: it reads bullets, Key: value lines, and short sentences, and skips questions, headings, and code. That makes it instant, free, and private. Because rules don't understand meaning, every proposal goes to you for review first.
Set MEMTY_OLLAMA_MODEL to use a local Ollama model instead. It still never leaves your machine.
Since 0.2.0, facts are listed newest first, so a fact you just saved always leads. Check that it was saved to the namespace you're using (shown in the save message and on the facts page).
For your safety, Memty only talks to extensions you approved. A reinstalled extension or a second browser counts as new. Run memty pair in a terminal, then click Try again.
If memty pair says Cannot pair, another Memty bridge, for a different vault or an older version, is using port 8765. Stop it, then pair again.
Chrome, Edge, and Brave, on ChatGPT (chatgpt.com and chat.openai.com), Claude.ai, Gemini, and Perplexity. Chat sites change often, so if the pill can't find an answer, select the text you want instead.
Yes. Saving, editing, and building capsules all run locally. You only need the internet for the AI chat itself.
Its value and whole history are removed from the vault, and automatic saving can't bring it back. You can only restore it by adding it again yourself.
Mark them Private to have chat AIs see only [private], or SECRET so any request that would include them is refused. The vault file itself isn't encrypted, so it relies on your computer account's protection.
Not yet. The Memty web app is a separate companion; its account conversations and MongoDB memory don't sync with the local SQLite vault.
Update: pip install -U memty, then memtyd stop so the daemon restarts on the new version, then memty extension and click reload on the extension. Open chat tabs update by themselves. Restart your MCP clients to pick up new agent tools.
Uninstall: memty serve --no-autostart, pip uninstall memty, and remove the extension. Your vault stays in ~/.memty until you delete it.
Nothing. Memty is open source under the MIT license.
Build with us
Install Memty, read the code, or tell us what to build next.