# STiFLeR7/memex [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/STiFLeR7/memex  
**GitHub Stars:** 12  
**npm Downloads (last month):** 552  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/stifler7-memex

## Description
Developer context continuity system. Watches your git repos and builds a temporal knowledge graph of modules, symbols, decisions, and open problems via Graphiti + Neo4j, then serves it to any AI coding agent over MCP. Every edge carries a validity window and a confidence score that decays over time. 12 tools across read and write. Install via npx -y stifler-memex-mcp. MIT licensed.

## Tools
Capabilities this server exposes over MCP:

- **get_project_context** — Session start. Returns a cluster-level briefing under 1500 tokens regardless of repo size
- **get_symbol_context** — Before editing a function or class. Returns callers, callees, linked decisions
- **get_recent_decisions** — Last N days of architectural decisions, optionally module-scoped
- **get_open_problems** — Active bugs and tech debt, sorted by severity
- **search_context** — Hybrid search: semantic × keyword × graph traversal × RRF merge
- **get_stale_context** — Edges whose composite confidence dropped below threshold
- **explain_change** — Given a commit SHA, cross-references the diff with linked Decision/Problem nodes and asks Gemini Pro for a grounded explanation
- **predict_impact** — Given a file path, returns a ranked list of modules likely affected based on graph coupling (no LLM call)
- **record_decision** — After making a technical choice. Supports `corroborates` (reinforce) and `supersedes` (replace)
- **record_problem** — When discovering a bug or piece of tech debt
- **resolve_problem** — When a tracked problem is fixed
- **invalidate_edge** — When a stored fact is no longer true

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "memex": {
    "command": "npx",
    "args": ["-y","stifler-memex-mcp"],
    "env": {
      "NEO4J_URI": "",
      "NEO4J_USER": "",
      "NEO4J_PASSWORD": "",
      "GEMINI_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD`, `GEMINI_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What STiFLeR7/memex does

STiFLeR7/memex gives AI coding agents a structured view of repository knowledge. It tracks modules, symbols, architectural decisions, bugs, technical debt, evidence, and code evolution instead of treating the repository as a collection of files only. The resulting knowledge graph is stored in Neo4j through Graphiti.

The system is designed for engineering context, not personal memory or raw session history. Its responses are bounded and ranked, so a large repository can produce a concise project briefing. Stored relationships include creation and optional expiration times, while confidence is calculated during retrieval and decreases as information becomes less current.

## How it works

Initialize the repository with the command-line package, then run the watcher and MCP server. The watcher observes Git commits and file changes, uses tree-sitter to extract code structure, and processes changes into graph records. Gemini Flash is used to distill commits into decision information, while Gemini Pro is used by `explain_change` for grounded change explanations.

Graph data is queried by a context-selection layer that combines repository structure, search results, graph relationships, provenance, and freshness. `search_context` uses semantic search, keyword matching, graph traversal, and reciprocal-rank fusion. `predict_impact` ranks potentially affected modules from graph coupling without making an LLM call.

A scheduler performs confidence decay and can mark outdated relationships as expired. Agents can also update the graph explicitly by recording decisions or problems, resolving problems, and invalidating facts. Decision writes support either reinforcing an existing decision with `corroborates` or replacing one with `supersedes`.

## Setup and configuration

The documented manual setup runs Neo4j with Docker Compose and provides `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD`, and `GEMINI_API_KEY`. The server can be started through the npm package with `npx stifler-memex-mcp`, installed from PyPI as `memex-mcp`, or run from a source checkout. Typical commands initialize a repository, start watching it, and launch the MCP service.

Hermes can receive a bounded repository context packet without passing its state database, transcripts, prompts, or tool results into the repository graph. The same selector is available through the MCP `get_engineering_context` tool. A Claude Code marketplace installation is also documented.

For shared deployments, the repository provides a team Docker Compose flow with authentication enabled by default. Neo4j is kept off the host-facing ports in that setup.

## Tools and capabilities

STiFLeR7/memex provides tools for both retrieval and graph maintenance, including:

- Get a compact project briefing at session start.
- Inspect callers, callees, and linked decisions for a symbol.
- Retrieve recent decisions and active problems, including severity ordering.
- Search across semantic, lexical, and graph relationships.
- Find low-confidence or stale edges.
- Explain a commit by relating its diff to recorded decisions and problems.
- Estimate affected modules for a file path.
- Record, resolve, or invalidate engineering knowledge.

The supplied tool listing describes 12 tools, while the README refers to 14 tools and also documents `get_engineering_context`; consult the repository version in use when exact tool counts matter.

## Limitations and notes

The server depends on Neo4j and, for commit synthesis or grounded explanations, Gemini credentials. Retrieval is designed to fail open, allowing agent execution to continue when memex is unavailable. Context is bounded rather than a complete dump of the repository.

Freshness is not absolute: confidence uses different decay behavior for validated and unvalidated information, and stale relationships may be archived with an expiration timestamp. Hermes support is read-only in the documented v0.9 integration. The project is MIT licensed.

_Full upstream README: https://allmcps.com/mcp/stifler7-memex/readme_

