
Memory Lean
io.github.zamansheikh由 GitHub 帳號 zamansheikh 發布v1.5.0更新於 Oct 24, 2026
Token-lean memory for AI agents: a knowledge graph searched cheaply. Drop-in for server-memory.
發布方自己的服務:Memory.fit
概覽
給 AI 程式代理使用的本機知識圖譜記憶伺服器,以極省 token 的方式跨工作階段檢索與回想專案、事實和關聯。
- 可以做什麼
- 檢索與讀取記憶:回傳排序後的名称與符合片段,開啟完整實體及其關聯,取得依類型分組的名称索引。
- 建立與修改圖譜:新增實體、關聯和觀察記錄,重新命名實體,刪除實體、關聯或觀察記錄。
- 管理封存事實:列出某實體被封存的內容並還原選定事實。
- 提供本機網頁介面瀏覽、編輯並即時查看圖譜,另有命令列工具可檢查、壓縮及輸出代理使用說明。
- 適用情境
- 適合需要代理在工作階段之間記住專案、相依關係、已發布版本、待辦事項與經驗規則,且希望這種回想只佔用很少上下文的場合。若你已在使用參考版 memory 伺服器,想沿用相同檔案與工具名称但獲得更精簡的回應,也適用。
- 執行需求
- 以本機 stdio 程序執行,通常透過 npx 啟動,因此需要 Node.js。可選環境變數:MEMORY_FILE_PATH(預設 ~/.claude/memory-graph/memory.jsonl)、MEMORY_OBS_MAX_CHARS、MEMORY_OBS_MAX、MEMORY_SEARCH_LIMIT、MEMORY_BACKUPS_KEPT。不需帳號、API 金鑰或網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Memory Lean,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
memory-lean
Long-term memory for AI coding agents that doesn't burn the context window.
A knowledge graph your agent searches cheaply, and a web UI where you can see and edit all of it.
[npm version] [npm downloads] [tests] [listed in the MCP registry] [zero dependencies] [MIT license]
Quick start · Web UI · How it works · Tools · Setup for 12 agents · Contributing
memory-lean is an MCP server that gives Claude
Code, Codex, Cursor, MiMo Code and any other MCP client a memory that lasts between
sessions: which projects exist, what depends on what, which version shipped, what
is still pending, and which rules were learned the hard way. It is a drop-in
replacement for the reference memory server
(@modelcontextprotocol/server-memory),
with the same file and tool names, but its answers are about 40 times smaller.
Highlights
The numbers
Measured on a real graph of 237 entities, 355 relations and 1,160 facts (tokens ≈ characters ÷ 4):
A narrow search that matches one or two entities saves less, because there is
little to trim. To measure your own graph, run node tools/bench.mjs from a clone;
it is read-only and prints sizes, never content.
Quick start
Claude Code: install the plugin. It adds the server, the instructions as a
skill, a short reminder at the start of each session, and /memory-ui.
Any other agent: add the server to its MCP config, then give it the instructions.
Just looking? Open the web UI on a made-up example graph:
Setup for each agent
The graph is created on the first write at ~/.claude/memory-graph/memory.jsonl,
whichever agent writes it, so all your agents share one memory. Set
MEMORY_FILE_PATH to keep it somewhere else.
Web UI
This opens your memory in the browser. Everything an agent can do, you can do here:
- Explore. Each type gets its own bubble. Click an entity to highlight everything it connects to, drag nodes to arrange them, and scroll to zoom. Search matches names, types and facts.
- Edit. Add, edit and delete facts, rename an entity or change its type, add and remove relations, create and delete entities, and restore archived facts. Every change passes the same checks as the agents' tools.
- Watch. Changes your agents make appear within two seconds.
- Spot problems. The overview lists pending work, the most connected entities, and anything over budget, which is also marked on the graph.
The page runs on your machine only (127.0.0.1) and needs the one-time key in
the link it prints, so other websites cannot read or change your memory. Nothing
is uploaded anywhere.
How it works
Search, then open
The reference server answers a search with every matching entity in full, as pretty-printed JSON. memory-lean answers with a ranked list of names and the lines that matched:
The agent then opens only what it needs:
Why it stays lean
How it keeps your data safe
Tools
The three read tools are marked read-only, so clients that support it can run them without asking.
Command line
With npx, put npx -y in front: npx -y memory-lean --ui.
Teach your agent to use it
A memory server only helps if the agent reads it before working and writes to it
when something changes. docs/AGENT-PROTOCOL.md is a
ready-made set of instructions: what to look up at the start of a task, what to
record, how to name things, and what never to store. The Claude Code plugin
includes it. For every other agent, one command installs it:
Adjust the entity types and names in it to your own work.
Coming from the reference memory server
Point MEMORY_FILE_PATH at your existing memory.jsonl and swap the command. The
file format is identical, so you can switch back at any time. Existing
observations longer than 300 characters are kept as they are; only new writes are
checked. To see what is over budget, and optionally fix it:
Settings
All optional, set as environment variables on the server:
FAQ
Is my memory sent anywhere?
No. The server reads and writes local files and makes no network requests. The
web UI listens on 127.0.0.1 only. Keep the graph out of git, and never
store passwords, keys or tokens in it: record where a secret lives, not its value.
Can several agents or sessions share one graph?
Yes. Every write takes a lock, re-reads the file and replaces it atomically, so
parallel sessions (and the web UI) do not overwrite each other.
Why plain text search instead of embeddings?
It needs no model, no index and no dependencies, and an agent's queries are
mostly names it already knows. Good entity names matter more than clever queries.
What happens to old facts?
When an entity passes 15 facts, the oldest dated ones move to
archive/<entity>.md next to the graph. archived_observations,
or the Archive section in the web UI, lists and restores them.
Roadmap
- Claude Code plugin with the server, a skill and
/memory-ui - Setup guides for 12 agents
-
rename_entityand archive restore - A web UI to explore and edit the graph
- Listed in the official MCP registry
- Listed in the Claude Code plugin directory
- Search across the archived facts of every entity
- Undo in the web UI
Contributing
Ideas, bug reports and pull requests are welcome. The server is one file with no
dependencies, the web UI is one HTML file, and npm test runs in a few seconds,
so a first change is quick to make. CONTRIBUTING.md has the
layout, the ground rules and a list of good first contributions.
If memory-lean saves you tokens, a ⭐ helps other people find it.
Support
memory-lean is free and MIT licensed. If it is useful to you, you can support the work:
Author
Created and maintained by Zaman Sheikh at Silifton.
[GitHub] [X] [LinkedIn] [Website]
Built on the file format and tool names of the Model Context Protocol reference memory server.
License
MIT © 2026 Zaman Sheikh. Free to use, change and share, including commercially; keep the copyright notice.
來源:README.md,提交 f2767b0
工具
0版本歷史
2- v1.5.0最新Oct 16, 2026
- v1.4.1Oct 9, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Memory 整合

Memory.fit
fit.memory官方發布者
託管式 Memory.fit 伺服器,讓 AI 讀取你的訓練、睡眠、恢復與飲食資料,並寫回每週計畫、每日目標和飲食計畫。
pg.ddx.io: the PostgreSQL community's memory
io.ddx.pg官方發布者
pg.ddx.io: the PostgreSQL community's memory 的託管 MCP 服務,由 pg.ddx.io 發布;無需登入;Streamable HTTP;29 個工具。
var.gg Naming Memory
gg.var官方發布者
遠端 MCP 伺服器,可依領域概念推薦並檢索韓、日、中、越、英多語言的程式識別字名稱,並提供 ERD 結構查詢。

Counterparts
ai.counterparts
為 Claude Code 與 Claude Desktop 提供的本地優先長期記憶:助理自行寫下關於你與專案的筆記,並在之後的對話中回想起來。

LAHZE - Persian AI Memory Platform
由 GitHub 帳號 pedramgholizadeh 發布
以波斯語為先的地理記憶平臺:發現地點,起草併發布僅限波斯語的記憶。AI 翻譯