Cortex provides verifiable cross-session memory for AI coding agents, used to save decisions, fixes, and project context, and lets users see what was retrieved. It runs fully locally by default: no account, API key, or self-managed server required, using a local SQLite file by default, and can also be configured with PostgreSQL + pgvector. The retrieval step does not call an LLM, and data does not leave localhost unless an integration that connects to the network is explicitly configured.
Main capabilities: 36 neuroscience mechanisms, 57 memory tools, 11 lifecycle hooks, and a self-organizing wiki by project. On write, it goes through a local novelty check (called the predictive coding gate in the implementation): novel content is written, near-duplicates are merged into existing memories; proactive writes are not rejected, while unattended automatic capture is rejected. Each memory is rated locally at write time to determine whether its references can be resolved on this machine, divided into verified and unverifiable; the rating does not mean the claim has been independently confirmed. Corrections use supersession rather than overwriting, old memories are downranked in recall, and the chain remains readable. predict writes falsifiable predictions, resolve_prediction judges based on observations provided by the caller, and calibration scores the judged set (brier is the mean squared distance between confidence and outcome, where 0.25 is equivalent to a constant 0.5 prediction). Memories have heat, decay if not reproduced, and episodic memories can consolidate into semantic memories.
How to use: Claude Code by adding the marketplace and installing the plugin; Claude Desktop by downloading hypermnesia-mcp.mcpb from Releases and opening it, or by using Settings → Extensions (this package has only tools, no hooks); Codex after installing the native plugin requires reviewing and trusting the Cortex hooks in /hooks, then starting a new session; other stdio MCP hosts (Gemini CLI, Cursor, Windsurf, VS Code) get the same tools by starting the same server. The first session installs the runtime into the plugin data directory (about one minute on a cold machine), first use creates local SQLite storage under ~/.claude/methodology/, and the model is downloaded on first use and then runs offline.
Use cases: preserving project decisions and fix experience across sessions, recalling old solutions when similar problems recur,providing project and role context for subagents, and preserving session state through compaction checkpoints. Claude Code and Codex can share memory when using the same storage and project association.
Limitations: automatic lifecycle behavior is provided only with the native Claude Code or Codex plugin; the Claude Desktop package has no hooks; the ChatGPT web version requires remote deployment, and this repository only provides a local stdio server. Three hook enhancements are supported only by PostgreSQL and silently degrade on SQLite. Retrieval benchmarks measure only retrieval, not the correctness of LLM answers; some benchmark results and threshold details are subject to the repository documentation. The project was renamed to hypermnesia-mcp in v4.15.0, and the visualization companion was renamed to hypermnesia-mcp-viz; during migration, the composite tool names must also be updated.