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.

0
MCP Tools
0
Tests
0
Coverage
v0.3.6
Version
"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
Terminal
$ npx stifler-memex-mcp serve --repo .

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

flowchart LR repo[Git Repository] --> watcher[Watcher Pipeline] watcher --> neo4j[(Neo4j Graph)] neo4j --> mcp[MCP Server] mcp --> agent[AI Agent] agent -.->|writes back| neo4j

The Lifecycle

flowchart TD init[memex init] --> watch[memex watch] watch --> extract[Symbol Extraction] extract --> synthesise[Decision Synthesis] synthesise --> write[Graph Write] write --> decay[Confidence Decay] decay --> archive[Historical Archive]

14 MCP Tools

Read Tools (8)

get_project_contextHigh-level briefing
get_symbol_contextSymbol deep-dive
get_recent_decisionsArch history
get_open_problemsActive bugs
search_contextHybrid search
explain_changeDiff synthesis
predict_impactChange coupling
get_module_clustersTopology view

Write & Analytic (6)

record_decisionPersist arch choice
record_problemTrack new bug
resolve_problemMark fix verified
invalidate_edgeExpire stale fact
get_stale_edgesConfidence audit
get_confidence_matrixStaleness heat

The case for bidirectionality

"The graph gets smarter with every session."

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.

Built By

HP

Hill Patel

Architect & Maintainer

@STiFLeR7
NL

Nirvaan Lagishetty

Lead Contributor

@Nirvaan05