Every AI session
should begin with context.
memex is a developer continuity system that transforms repositories, architecture decisions, and execution history into a persistent temporal knowledge graph accessible through MCP-native tooling.
"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."— Vannevar Bush, 1945
The problem no one talks about
Every developer working with AI coding agents in 2026 has the same conversation every single day.
They open Claude Code, Gemini CLI, or Cursor. They start a new session. And immediately, before a single line of code is written, they spend five to fifteen minutes re-explaining their codebase to the agent. The architecture. The decisions made last month. The refactor that broke the payment service. The reason the auth module uses EdDSA instead of RS256.
This is not a minor inconvenience. It is a structural failure in how AI-assisted development works. Agents are stateless by design. Context windows are ephemeral. Every switch from one agent harness to another resets everything to zero. The accumulated understanding of a codebase — the reasoning behind every architectural choice, the history of every problem encountered and solved — exists only in the developer's head.
How it works
The Watcher
Installs git hooks to observe every file save and commit. Uses tree-sitter for sub-50ms local symbol extraction and Gemini Flash to synthesise architectural decisions from commit messages.
The Graph
A local bitemporal Neo4j knowledge graph. Edges never disappear; they expire. Confidence scores decay over time unless corroborated by commits or validated by humans.
The MCP Server
Exposes the graph through 14 tools. Agents don't just read project context; they write back decisions and problems they discover, making the graph smarter with every session.
System Architecture
The Lifecycle
14 MCP Tools
Read Tools (8)
get_project_contextHigh-level briefingget_symbol_contextSymbol deep-diveget_recent_decisionsArch historyget_open_problemsActive bugssearch_contextHybrid searchexplain_changeDiff synthesispredict_impactChange couplingget_module_clustersTopology viewWrite & Analytic (6)
record_decisionPersist arch choicerecord_problemTrack new bugresolve_problemMark fix verifiedinvalidate_edgeExpire stale factget_stale_edgesConfidence auditget_confidence_matrixStaleness heatThe case for bidirectionality
Most context systems are read-only. They ingest data from somewhere and serve it to agents. The insight that makes memex different is that agents themselves are a source of knowledge that should be persisted.
An AI coding agent, working through a complex refactoring task over several hours, accumulates understanding of the codebase that far exceeds what can be extracted from git history alone. It discovers why a particular abstraction exists. It identifies a coupling between two modules that was never explicitly documented. This understanding disappears when the session ends.
Bidirectionality means that instead of discarding this understanding, it is written back into the graph. The next agent — whether it is the same agent in a new session or a completely different agent harness — starts with that understanding already present. The graph gets smarter with every session.
Install
npx stifler-memex-mcp init --repo .npx stifler-memex-mcp watch --repo .What memex is not
Not a personal memory tool
memex doesn't remember your name, preferences, or personal trivia. It solves institutional memory of a codebase.
Not a RAG system
It doesn't just chunk text snippets. It builds a structured graph of relationships — functions, decisions, and problems.
Not a cloud product
It runs entirely on your machine. Your graph never leaves your infra. Gemini API only sees commit messages.
Not a documentation replacement
It captures what actually happened — the decisions that never made it into the README or the PR descriptions.