Memex

io.github.pragneshbagary由 GitHub 账号 pragneshbagary 发布v0.1.9更新于 Oct 24, 2026

Persistent session memory for Claude Code. Local SQLite, no LLMs, no network.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

Memex 为 Claude Code 提供按项目隔离的持久会话记忆,把任务、文件、决策和警告等结构化日志保存在本地 SQLite 数据库中。

可以做什么
在会话开始时加载最近及相关记忆条目,按关键词和文件路径匹配;在完成有意义的工作后保存包含任务、文件、决策、警告和标签的结构化条目。更新已有条目的指定字段,对所有条目做全文搜索,并按标签列出条目。按 id 删除过期条目。在助手之外,命令行工具可查看状态、列出和搜索历史,并把条目导出为带双链和标签的 Markdown 笔记。
适用场景
适合在多个 Claude Code 会话中持续开发同一项目、不想反复说明上次做了什么、决定了什么或哪里出了问题的人。它补充静态项目文档,记录会话之间变化的内容。
运行要求
以 stdio 本地进程运行;需要 Python 3.10+、mcp 包(自动安装)以及支持 FTS5 的 SQLite。README 还要求 Claude Code CLI。可选环境变量 MEMEX_DIR、MEMEX_GLOBAL、MEMEX_RECENT 和 MEMEX_MATCHED 可覆盖默认值。无需网络或账号。
安装前请注意
助手可以写入、更新和删除记忆条目,安装命令会向项目的 .claude/CLAUDE.local.md 文件写入说明。保存的条目可能包含文件路径、决策和警告,并保存在主目录下的本地 SQLite 数据库中,需手动删除。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Memex,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

memex

Every Claude Code session starts without knowing what you built last time - which files you changed, what decisions you made, what broke. You re-explain. Claude re-reads. You start over.

memex keeps a structured log of every session. Claude reads it at the start of the next one.

No cloud. No LLM extraction. No cost per save. Just local SQLite and one command to install.

Install

bash
# with uvuvx mcp-memex install
# with pippip install mcp-memexmemex install

Restart Claude Code. That's it.

What gets saved

Each entry has structure - not a blob of text:

python
mem_save(    task="Replaced JWT auth with session cookies",    files=["src/auth.py", "src/middleware.py"],    decisions=["Session cookies over JWT - simpler, no token refresh needed"],    warnings=["Redis required - app won't start without REDIS_URL set"],    tags=["auth", "sessions"])

Claude calls mem_save when it finishes something meaningful. You can also just tell it: "save what we just did."

What Claude sees at session start

=== memex: session context (db: my_project.db) ===
--- Recent (2) ---[1] #4 - 2026-06-14T10:32  Task      : Replaced JWT auth with session cookies  Files     : src/auth.py, src/middleware.py  Decision  : Session cookies over JWT - simpler, no token refresh needed  Warning   : Redis required - app won't start without REDIS_URL set  Tags      : auth, sessions
[2] #3 - 2026-06-13T15:10  Task      : Added rate limiting to /api/login  Files     : src/middleware.py  Warning   : Rate limiter is in-memory per process - resets on restart  Tags      : auth, rate-limiting

Claude calls mem_load automatically at the start of every session. It returns the most recent entries plus any entries that match what you're working on - by keyword and by file path.

Browse from the terminal

You don't need to be inside Claude to look at your history:

bash
memex status                     # entry count, DB size, top tagsmemex list                       # recent entries for this projectmemex list --tag auth            # filter by tagmemex list --since 7d            # entries from the last 7 daysmemex list --since 2026-06-01 --until 2026-06-15  # date rangememex search "rate limit"        # full-text searchmemex version                    # print installed version

Export to markdown

Turn your history into portable, human-browsable notes - one .md file per entry, with [[wikilinks]] connecting related entries and files, plus tags as #hashtags. Works in Obsidian or any tool that understands [[links]]:

bash
memex export ./my-project-notes/

Entries that share a tag or a touched file are cross-linked under a Related section, so you can navigate your project history as a graph.

Six MCP tools

ToolWhat it does
mem_loadCalled at session start - returns recent + relevant entries
mem_saveSaves a structured entry after meaningful work
mem_updatePatches specific fields of an existing entry (keeps id and timestamp)
mem_searchFull-text search across all entries
mem_listLists entries, optionally filtered by tag
mem_deleteRemoves a stale entry by id

Why not just CLAUDE.md?

CLAUDE.md is for static project documentation - architecture, conventions, how to run tests. It doesn't change much and it isn't session-aware.

memex captures what's changing session to session: what you built yesterday, the decision you made this morning, the warning you discovered an hour ago. It's the difference between "here's the project" and "here's what happened last time."

memex install writes Claude's instructions into .claude/CLAUDE.local.md - a file Claude Code loads automatically without touching your project's own CLAUDE.md.

Memory is scoped per project

Each project gets its own SQLite database at ~/.memex/<project>.db based on the working directory. Sessions from different projects never mix.

Configuration

Set these in the MCP env block in ~/.claude.json if you need to override defaults:

VariableDefaultDescription
MEMEX_DIR~/.memexWhere DBs are stored
MEMEX_GLOBAL0Set to 1 to share one DB across all projects
MEMEX_RECENT5Max recent entries loaded per session
MEMEX_MATCHED5Max FTS-matched entries loaded per session

Uninstall

bash
memex removepip uninstall mcp-memex

Memory DBs are kept at ~/.memex/ - delete that directory manually if you want to wipe everything.

Requirements

  • Python 3.10+
  • mcp package (installed automatically)
  • SQLite with FTS5 (standard since Python 3.8)
  • Claude Code CLI

License

MIT

来源:README.md,提交 281809d

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.9最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分