
Memex
io.github.STiFLeR7由 GitHub 帳號 STiFLeR7 發布v1.0.3更新於 Oct 26, 2026
Temporal engineering context for agents via MCP.
概覽
本機 MCP 伺服器,為程式碼倉庫建立雙時態 Neo4j 知識圖譜,並向編碼代理提供工程脈絡、決策與問題紀錄。
- 可以做什麼
- 讀取倉庫脈絡:專案簡報、符號呼叫與被呼叫關係、近期決策、未解決問題、過期事實、混合檢索
- 解釋與預測:依提交差異提供有依據的說明,依檔案路徑回傳受影響模組的排序預測
- 記錄與維護知識:記錄決策並支援佐證或取代語意,記錄與解決問題,使失效事實作廢
- 透過 Claude Code 與 Codex 鉤子讓工作階段脈絡保持最新:工作階段起始的工作集、編輯前檢查、恢復時的變更提示、各工作樹獨立檢視
- 提供權杖節省與驗證統計,並以圖譜投影支撐 Anthropic 原生記憶工具
- 適用情境
- 適合持續數週至數月、架構決策不斷累積,且多位代理或開發者共用同一程式碼庫的專案。一次性腳本、臨時原型,或小到可直接貼進提示词的專案則不太必要。
- 執行需求
- 以本機程序執行,可透過 npm(stifler-memex-mcp)或 PyPI(memex-mcp,uvx)安裝,需要 Node.js 或 Python 及 uv/pip。需要自備 Neo4j 5 伺服器,並設定 NEO4J_URI、NEO4J_USER、NEO4J_PASSWORD,以及用於實體抽取的 GEMINI_API_KEY。僅限桌面端;首次啟動會下載 Python 相依套件,可能超出用戶端的連線逾時。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Memex,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
memex: trusted engineering context for agentic software engineering
Open-source MCP server and hook service that keeps Claude Code and Codex engineering context current as the code changes, and holds edits whose evidence changed.
A daemon, hook service and MCP server that turn commits and file changes into structured engineering knowledge and deliver it to agents with freshness and provenance preserved, without making memex a source of personal memory or raw session state.
memex builds a bitemporal knowledge graph of your repository (modules, symbols, decisions, problems, evidence, and code evolution). In v1 it also hooks into Claude Code and Codex: each session starts with the right context, each edit is checked against the current code, and the agent is told exactly what changed.
[Website] [PyPI] [PyPI downloads] [npm] [npm downloads] [Claude Code marketplace] [memex MCP server] [GitHub stars] [Tests] [CodeQL] [OpenSSF Scorecard] [License: MIT]
Where memex lives
Evaluation record in BENCHMARK.md, release history in CHANGELOG.md, reporting process in SECURITY.md, and how to work on it in CONTRIBUTING.md.
https://github.com/user-attachments/assets/b14e3185-ea36-4ae5-bd18-2d34e6bf7be4
memex v1 in 60 seconds. If the player does not load, download the video.
Live context (v1)
Coding agents work from a snapshot of the code. A teammate pushes, another agent edits a file, a branch moves, and the agent keeps acting on what it read earlier. v1 keeps that snapshot current, inside Claude Code and Codex:
memex needs a Neo4j 5 server you already run (Docker is not required). Hooks go only into the checkout's own project configuration, and memex never asks for or stores your client credentials. Full guide, host recipes and rollback: docs/v1/25_ONBOARDING.md.
Install
Via Claude Code marketplace
Restart your Claude Code session.
The first start after installing or upgrading downloads memex's Python dependencies (about 40 seconds), which can exceed Claude Code's MCP connect timeout once. Warm it up first, then restart:
If Claude Code still shows a connection timeout, open /mcp and reconnect
memex. If a tool says memex cannot reach Neo4j, start Neo4j (for example
docker start memex-neo4j); the tools recover without a restart.
Manual
Hermes integration
The Hermes integration is read-only. Hermes retains personal memory, raw
session state, and execution state. memex supplies repository engineering
context through a bounded ContextPacket; it does not ingest Hermes
state.db, transcripts, prompts, or tool results.
Add the memex provider to Hermes' profile configuration:
If Hermes is not installed, use the same context selector through the MCP
get_engineering_context tool. Both paths share the protocol-neutral memex
core and fail open when retrieval is unavailable.
Self-hosted team deployment
For a shared team setup (one Neo4j + one memex-server, auth on by default, Neo4j's ports never exposed to the host):
See docker/TEAM-DEPLOY.md for the full flow, capturing the
initial admin key, and the down -v footgun to avoid.
At a glance
The lifecycle
MCP tools
14 tools: eight read, four write, two analytic.
Read
Write
Bitemporal confidence
Confidence is not a stored number that mutates. It is computed at query time from base_confidence, validation status, time since last reinforcement, and access count.
Hierarchical clusters
memex cluster runs hierarchical Leiden over a hybrid edge graph:
Measure Your Savings
memex tracks token reduction metrics and human review actions locally in a SQLite database (~/.config/memex/telemetry.db).
You can query your savings at any time using the CLI:
Or view the raw JSON payload:
Or target a specific repository scope:
This returns an aggregation of:
- Period Summaries: Calls, tokens returned, naive tokens (size of files requested), tokens saved, and token reduction percentage across
today,last 7 days,last 30 days, andlifetime. - Top Tools: The most valuable tools sorted by total tokens saved.
- Agent Clients: Active agents (Claude Code, Gemini CLI, Cursor, Codex) and their token saving distribution.
- Validation Health: Total validated, unvalidated, and corroborated nodes, along with the elapsed days since the last review.
The same statistics are exposed via the HTTP MCP transport:
Connect your agent
Claude Code
Marketplace install above does this for you. Manual wiring in .claude/settings.json:
Cursor
Add to ~/.cursor/mcp.json:
Gemini CLI
Add to ~/.gemini/settings.json:
Codex
Add to ~/.codex/config.toml:
Anthropic memory tool (memory_20250818)
memex can back Claude's native memory tool: agents read from a per-session graph projection plus a writable scratch zone.
Operating principles
When to use memex
Project structure
Commands
License
MIT. See LICENSE.
Author
Hill Patel (@STiFLeR7)
Core Contributors & Maintainers
- Hill Patel (@STiFLeR7), architect and maintainer
- Nirvaan Lagishetty (@Nirvaan05), lead contributor and maintainer
Contributing
Open an issue or PR. uv sync --all-extras installs the development toolchain.
Run uv run pytest -m "not integration" for the offline suite and uv run ruff check . before opening a PR. Version bumps must update pyproject.toml,
npm/package.json, server.json, and the team Docker image tag together.
Release history is in CHANGELOG.md. The v1 design and
evaluation records are under docs/v1/, and the v0.9 architecture
under docs/architecture/v0.9/.
Vannevar Bush, 1945: "Consider a future device for individual use, which is a sort of mechanized private file and library. It needs a name, and to coin one at random, memex will do."
來源:README.md,提交 62d1f88
工具
0版本歷史
4- v1.0.3最新Oct 26, 2026
- v1.0.2Oct 8, 2026
- v1.0.1Oct 6, 2026
- v0.9.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分