
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 翻译