memex
MCP server by STiFLeR7 Community
Adds current repository context to Claude Code and Codex through a Neo4j knowledge graph. It checks edits against the current code and holds those whose supporting evidence has changed. Built for teams running coding agents on a codebase.
Install memex
Built from the published package, never by AI.
claude mcp add memex -e NEO4J_URI=YOUR_NEO4J_URI -e NEO4J_USER=YOUR_NEO4J_USER -e NEO4J_PASSWORD=YOUR_NEO4J_PASSWORD -e GEMINI_API_KEY=YOUR_GEMINI_API_KEY -- npx -y stifler-memex-mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"memex": {
"env": {
"NEO4J_URI": "YOUR_NEO4J_URI",
"NEO4J_USER": "YOUR_NEO4J_USER",
"GEMINI_API_KEY": "YOUR_GEMINI_API_KEY",
"NEO4J_PASSWORD": "YOUR_NEO4J_PASSWORD"
},
"args": [
"-y",
"stifler-memex-mcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"memex": {
"env": {
"NEO4J_URI": "YOUR_NEO4J_URI",
"NEO4J_USER": "YOUR_NEO4J_USER",
"GEMINI_API_KEY": "YOUR_GEMINI_API_KEY",
"NEO4J_PASSWORD": "YOUR_NEO4J_PASSWORD"
},
"args": [
"-y",
"stifler-memex-mcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"memex": {
"env": {
"NEO4J_URI": "YOUR_NEO4J_URI",
"NEO4J_USER": "YOUR_NEO4J_USER",
"GEMINI_API_KEY": "YOUR_GEMINI_API_KEY",
"NEO4J_PASSWORD": "YOUR_NEO4J_PASSWORD"
},
"args": [
"-y",
"stifler-memex-mcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add memex --env NEO4J_URI=YOUR_NEO4J_URI --env NEO4J_USER=YOUR_NEO4J_USER --env NEO4J_PASSWORD=YOUR_NEO4J_PASSWORD --env GEMINI_API_KEY=YOUR_GEMINI_API_KEY -- npx -y stifler-memex-mcp{
"mcpServers": {
"memex": {
"env": {
"NEO4J_URI": "YOUR_NEO4J_URI",
"NEO4J_USER": "YOUR_NEO4J_USER",
"GEMINI_API_KEY": "YOUR_GEMINI_API_KEY",
"NEO4J_PASSWORD": "YOUR_NEO4J_PASSWORD"
},
"args": [
"-y",
"stifler-memex-mcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add memex npx -y stifler-memex-mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the memex block.
About
memex is an open-source MCP server and hook service that keeps Claude Code and Codex engineering context current as the code changes. A daemon turns commits and file changes into a bitemporal knowledge graph of modules, symbols, decisions, problems and evidence, stored in Neo4j. Each session starts with a bounded working set, and each edit is checked against the current code before it is applied.
The agent can also call 14 MCP tools to read and write context. memex computes confidence at query time, so stale knowledge can be surfaced. It fails open, so agent execution continues if memex is unavailable. It is aimed at engineering teams using coding agents on a repository, and it does not store personal memory or raw session state.
Written from the project's README and checked against it.
Tools it gives your assistant
get_project_contextReturns a cluster-level briefing under 1500 tokens at session start.get_symbol_contextReturns callers, callees and linked decisions before editing a function or class.get_recent_decisionsLists architectural decisions from the last N days, optionally scoped to a module.get_open_problemsLists active bugs and tech debt, sorted by severity.search_contextRuns hybrid search combining semantic, keyword and graph traversal results.get_stale_contextLists edges whose composite confidence dropped below the threshold.explain_changeExplains a commit SHA by cross-referencing linked Decision and Problem nodes.predict_impactRanks modules likely affected by a change to a given file path.record_decisionStores a technical choice, with corroborates and supersedes options.record_problemStores a newly found bug or piece of tech debt.
What you need
- Neo4j 5 server
- Gemini API key
- Python with uv or pip
- Node.js for npx
| Setting | Needed | What it is |
|---|---|---|
NEO4J_Environment variable | Required | Bolt URI of your Neo4j instance |
NEO4J_Environment variable | Required | Neo4j username |
NEO4J_Environment variable, secret | Required | Neo4j password |
GEMINI_Environment variable, secret | Required | Google Gemini API key for entity extraction |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Get the project context before we start working on this repository.
- Check which decisions are linked to the function I am about to edit.
- Which open problems in this repo have the highest severity?
Good to know
- Hooks fail open, so agent execution continues if memex is unavailable.
- The first start after install or upgrade can take about 40 seconds and may hit the MCP connect timeout once.
- The Hermes integration is read-only.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to memex
All alternatives →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
Compare with GitDiagram, mockserver or XcodeBuildMCP
memex: common questions
Does memex store personal memory or chat history?
No. The source says memex does not act as a source of personal memory or raw session state. It does not ingest Hermes state.db, transcripts, prompts or tool results.
What happens if memex is down or unreachable?
memex fails open, so agent execution continues without it. If a tool reports that memex cannot reach Neo4j, the tools recover once Neo4j is started again.
Does memex need Docker?
The source says memex needs a Neo4j 5 server you already run and that Docker is not required for it. A manual setup example does use docker compose to start Neo4j.
How do I install memex?
In Claude Code run claude mcp add memex -e NEO4J_URI=YOUR_NEO4J_URI -e NEO4J_USER=YOUR_NEO4J_USER -e NEO4J_PASSWORD=YOUR_NEO4J_PASSWORD -e GEMINI_API_KEY=YOUR_GEMINI_API_KEY -- npx -y stifler-memex-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is memex the official server?
memex is a community project by STiFLeR7, not verified by a company domain.
Is memex free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is memex safe to use?
It scores 71 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to memex?
Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.
Does memex work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
