memex · stifler7 — Claude Code MCP server: what it does, how to install
memex keeps an agent’s repository context aligned with code changes. It helps when edits, branches, or linked worktrees move in parallel.
claude mcp add memex -e NEO4J_URI=<NEO4J_URI> -e NEO4J_USER=<NEO4J_USER> -e NEO4J_PASSWORD=<NEO4J_PASSWORD> -e GEMINI_API_KEY=<GEMINI_API_KEY> -- npx -y stifler-memex-mcpWhat memex does
memex turns repository files and commits into a bitemporal knowledge graph covering modules, symbols, decisions, problems, evidence, and code evolution. A daemon watches the repository, while the MCP server sends agents context together with freshness and provenance.
In Claude Code and Codex, memex supplies a bounded context at session start, checks the assumptions behind each edit, and names files to reread after a resumed session. Linked worktrees receive separate views. The system includes a tree-sitter and Gemini watcher, a Neo4j graph, hooks, and MCP tools.
You need a running Neo4j 5 instance plus NEO4J_URI, NEO4J_USER, NEO4J_PASSWORD, and GEMINI_API_KEY. Without Neo4j, the server cannot use its graph. Hook installation touches only project configuration, and memex does not request or store client credentials.
What it helps with
- keep agent context current as repository files change
- check whether an edit still rests on current context
- name files that need rereading after a paused session
- give parallel worktrees separate repository views
- turn commits and file changes into Neo4j facts
Example prompts for the agent
- Show the current working context for this repository task.
- Check whether the context behind this edit is still current.
- The session resumed after code changes; tell me which files to reread.
How to install memex
Platform CLI
claude mcp add memex -e NEO4J_URI=<NEO4J_URI> -e NEO4J_USER=<NEO4J_USER> -e NEO4J_PASSWORD=<NEO4J_PASSWORD> -e GEMINI_API_KEY=<GEMINI_API_KEY> -- npx -y stifler-memex-mcpReplace <…> with your own values
Platform CLI
codex mcp add stifler7-memex --env NEO4J_URI=<NEO4J_URI> --env NEO4J_USER=<NEO4J_USER> --env NEO4J_PASSWORD=<NEO4J_PASSWORD> --env GEMINI_API_KEY=<GEMINI_API_KEY> -- npx -y stifler-memex-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"stifler7-memex": {
"command": "npx",
"args": [
"-y",
"stifler-memex-mcp"
],
"env": {
"NEO4J_URI": "<NEO4J_URI>",
"NEO4J_USER": "<NEO4J_USER>",
"NEO4J_PASSWORD": "<NEO4J_PASSWORD>",
"GEMINI_API_KEY": "<GEMINI_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"stifler7-memex": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"stifler-memex-mcp"
],
"env": {
"NEO4J_URI": "<NEO4J_URI>",
"NEO4J_USER": "<NEO4J_USER>",
"NEO4J_PASSWORD": "<NEO4J_PASSWORD>",
"GEMINI_API_KEY": "<GEMINI_API_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e NEO4J_URI=<NEO4J_URI> -e NEO4J_USER=<NEO4J_USER> -e NEO4J_PASSWORD=<NEO4J_PASSWORD> -e GEMINI_API_KEY=<GEMINI_API_KEY> stifler7-memex npx -y stifler-memex-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about memex
How do I install memex in Claude Code?
Run `claude mcp add memex -e NEO4J_URI=<NEO4J_URI> -e NEO4J_USER=<NEO4J_USER> -e NEO4J_PASSWORD=<NEO4J_PASSWORD> -e GEMINI_API_KEY=<GEMINI_API_KEY> -- npx -y stifler-memex-mcp`.
What does memex do?
It records repository engineering facts in a Neo4j graph and supplies agents with current context. In Claude Code and Codex, it also checks edit assumptions and reports changes after a session pause.
What does memex require?
It requires a running Neo4j 5 server and the NEO4J_URI, NEO4J_USER, NEO4J_PASSWORD, and GEMINI_API_KEY values. Neo4j does not have to run in Docker.
Similar MCP servers
All MCP servers for Agent setup: memory, context, orchestration →memex by other authors comes first.