
Memex
io.github.STiFLeR7Published by GitHub account STiFLeR7v1.0.3Updated Oct 26, 2026
Temporal engineering context for agents via MCP.
Overview
Local MCP server that builds a bitemporal Neo4j knowledge graph of a repository and serves engineering context, decisions and problems to coding agents.
- What you can do
- Read repository context: project briefing, symbol callers and callees, recent decisions, open problems, stale facts, hybrid search
- Explain and predict: grounded explanation of a commit's diff, ranked impact prediction for a file path
- Record and maintain knowledge: record decisions with corroborate or supersede semantics, record and resolve problems, invalidate outdated facts
- Keep agent sessions current through Claude Code and Codex hooks: session-start working set, pre-edit checks, resume change notices, per-worktree views
- Expose token-savings and validation statistics, and back Anthropic's native memory tool with a graph projection
- When to use it
- Worth adding for long-running, multi-week repositories where architectural decisions accumulate and several agents or developers work on the same codebase. Less useful for one-shot scripts, throwaway prototypes, or projects small enough to paste into a prompt.
- Requirements
- Runs as a local process via npm (stifler-memex-mcp) or PyPI (memex-mcp, uvx); Node.js or Python with uv/pip. Needs a Neo4j 5 server you already run, configured with NEO4J_URI, NEO4J_USER and NEO4J_PASSWORD, plus a GEMINI_API_KEY for entity extraction. Desktop only; a first start may download Python dependencies and exceed the client's connect timeout.
Installation
In SourceWeft
- Open Memex in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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."
Source: README.md at commit 62d1f88
Tools
0Version history
4- v1.0.3LatestOct 26, 2026
- v1.0.2Oct 8, 2026
- v1.0.1Oct 6, 2026
- v0.9.0Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts