
Memex
io.github.evan-moon由 GitHub 账号 evan-moon 发布v0.5.0更新于 Oct 24, 2026
Local-first second brain with semantic search. Markdown notes indexed by a local ML model.
概览
本地优先的 Markdown 笔记库,带离线语义搜索,让助手把笔记当作长期记忆来保存、检索、读取和更新。
- 可以做什么
- 按 past、state、rule 三种层级保存笔记,并提示重复笔记与相关旧笔记
- 按语义搜索笔记,支持标签、文件夹和日期筛选,并列出最近笔记、标签和文件夹
- 读取笔记全文与反向链接,更新标题或内容,删除笔记
- 查看确定性信号与已归纳的推断,并提交经确认的推断
- 适用场景
- 适合希望助手跨会话记住你自己的决策、计划和背景,而不必每次粘贴进对话,并且偏好把笔记以纯 Markdown 文件保存在本机的场景。
- 运行要求
- 以本地进程运行,从 npm 包 @evan-moon/memex 安装(需要 Node.js)。首次运行会下载约 450MB 的嵌入模型到 ~/.memex/models/。笔记和 SQLite 数据库存放在 ~/.memex/ 下。无需 API 密钥或账号。
安装
在 SourceWeft 中
- 打开 控制台中的 Memex,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
memex
Make Claude smarter about you.
[npm version] [License] [Node version]
npm install -g @evan-moon/memex
Make Claude smarter about you.
Local-first second brain that connects to Claude via MCP. Notes are stored as plain Markdown and indexed with a local ML model, fully offline, no API keys, nothing leaves your machine.
The problem
Claude is only as smart as what's in the conversation. Your decisions, your context, your thinking, invisible unless you paste them in every time.
The fix
Claude searches your notes before answering and saves insights at the end of every conversation, automatically, without being asked.
Install
Connect your apps:
This registers memex with every MCP client on this machine — Claude, Claude Code, Codex, Cursor — by writing each one's own config file. Restart the clients afterwards.
That's it. On first run, the embedding model (~450MB) downloads once to ~/.memex/models/.
Auto-recall (optional)
Turns retrieval from something Claude has to decide to do into something that just happens. Every prompt you type is semantically searched against your notes, and the top 3 titles are injected as context before Claude answers — the same way native memory works. Claude then pulls full notes with get_note when a title looks relevant.
A background daemon keeps the embedding model warm (~/.memex/recall.sock), so a lookup costs ~30ms instead of the ~1.5s a cold CLI search spends loading the model. It idles out after 2 hours.
Cost: ~200MB resident while warm, plus up to 3 note titles of context per prompt. Remove with memex recall uninstall.
Features
- Semantic search, finds notes by meaning, not just keywords. Multilingual (Korean + English), runs fully offline via
multilingual-e5-base - Hybrid retrieval, vector search + BM25 full-text + tag matching, fused via Reciprocal Rank Fusion
- Chunk-level embeddings, long notes are split into ~340-token passages and embedded individually, so an answer buried on page three is as findable as one in the opening paragraph. Search returns the passage that matched, not the note's first lines
- Cross-encoder reranking (opt-in,
MEMEX_RERANK=1), retrieves twice as many candidates and reorders them withbge-reranker-v2-m3. Worth ~+20pp hit@1 on the golden set, at ~1.8s per search — off by default because auto-recall and the CLI are built around instant lookups - Date filter, narrow search to a time range with
--from/--to - Note layers, every note is
past(immutable record),state(mutable plan), orrule(Claude behaviour guide). Past notes refuse updates; rule notes auto-inject into Claude's system prompt - Flashback, save and search automatically surface older notes from a different folder that are semantically related, "you wrote about this 124 days ago in a different context"
- Inference engine, deterministic signals surface un-synthesized patterns (cross-year arcs, stale state notes, tag revivals); you promote good ones into inferences (hypotheses with provenance) that auto-invalidate when their source notes change. No LLM in the core
- MCP server, Claude searches and saves automatically. No extra CLAUDE.md setup needed
- Auto-recall, opt-in hook that searches your notes on every prompt and injects the hits before Claude answers, so recall never depends on Claude remembering to look
- Duplicate detection,
save_notewarns when a semantically similar note already exists, nudging Claude to update rather than create - Backlinks, link notes with
[[Title]]syntax;get_noteshows which notes reference it - Series collapse, a dated work log ("… 2026-07-20", "… 2026-07-23") takes at most two slots on a result page, and search reports how many more it held back
- Amendments, a correction records what it corrects (
amends), so search flags the superseded note and points at the newest fix instead of returning a claim you already know is wrong - Digest,
memex digestsummarises notes saved in the last N days, grouped by folder - CLI, add, search, tag, browse, and index notes from the terminal
- Obsidian-compatible, notes saved as
.mdfiles; works alongside existing vaults - Local DB, SQLite +
sqlite-vecat~/.memex/memex.db
CLI
MCP server
Claude, Claude Code, Codex, Cursor
It writes each client's own config file and leaves the servers already in it alone. If a client still runs an older copy of memex, it gets repointed. memex mcp path prints the server path for a client memex does not know about yet.
Available tools
Inferences are kept separate from notes (excluded from search) and are cited as hypotheses, never facts. Detection stays deterministic; the only LLM step is synthesizing an inference's summary, which Claude does, never memex.
Note layers
Every note is classified into one of three layers based on mutability:
The CLI prints a colour-coded [past] / [state] / [rule] badge next to each note in list, search, and show.
save_note(MCP) andmemex add(CLI) require an explicitlayer. The classification rules are documented in the tool description so Claude picks correctly.- On first run, existing notes get a folder-based backfill:
projects/dev/herald→state,coding→rule, everything else →past. Migration is idempotent. rulenotes are also auto-injected into the MCP server's instructions, see Rule layer auto-inject below.
Flashback
When you save a note or search, memex automatically surfaces older notes from a different folder that are semantically similar, "you wrote about this 124 days ago in a different context." Stored as system-generated backlinks (note_links.source = 'flashback'), separate from your [[wikilinks]] (source = 'wiki').
Tune via env:
Rule layer auto-inject
Notes with layer = 'rule' are appended to the MCP server's instructions on boot, under a ## House Rules section. Claude sees them at the start of every conversation, no search_notes call required. This is the right home for coding style guides or other behavioural guidance.
Updates to rule notes are picked up on the next Claude Desktop / Claude Code restart.
Configuration
Config lives at ~/.memex/config.json.
Architecture
The ecosystem
memex is one of three local-first tools that share one principle, your data stays on your machine, and the AI comes to it. They interoperate through any MCP client, and none depends on the others.
- firma · money, portfolio, net worth, cash flow
- memex · memory, notes and the context behind them, across sessions
- skope · news, a personalized lens on the world
You reach them through Claude Desktop, Claude Code, Cursor, or any other MCP client. The tools compose through the model, never by calling each other.
Where this is going
memex is a memory engine, not a place to read. There is no window, no editor, and no screen to keep up with. Everything a person would have supervised by hand — what is still true, what a later note corrected, which notes answer a question nobody phrased the way they were written — has to be settled by the retrieval path itself, at the moment an agent asks.
The reasoning behind dropping the desktop app: a document an LLM wrote is a document nobody reads. A vault that needs curating is a vault that rots. So the target is a structure that retrieves correctly without being read and without being maintained:
Out of scope: a GUI, sync, collaboration, publishing, a plugin system, and a graph canvas.
The design record is in docs/plans/. Those documents are a
history of decisions, not a roadmap, and the ones written for the desktop app
have been removed.
llms.txt
llms.txt is a machine-readable summary of this project for LLM agents, concise description with documentation links, following the llms.txt standard.
License
MIT
来源:README.md,提交 19aae2c
工具
0版本历史
1- v0.5.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
