# Cortex

A cross-platform persistent memory MCP server for Codex, Gemini CLI, Claude Code and other local MCP hosts, storing decisions and project context locally in SQLite or PostgreSQL with hybrid retrieval and decay-based consolidation.

Cortex is a persistent memory MCP server that keeps decisions, fixes and project context between AI coding agent sessions, so an agent can recall what was already decided rather than starting cold each time. Everything runs locally by default, a SQLite file, or PostgreSQL with pgvector if preferred, with no LLM in the retrieval loop and nothing leaving localhost unless an integration is explicitly configured.

Claude Code and Codex share the same memory tools and eleven lifecycle hook modules for automatic capture, recall and project context; the same stdio MCP server also supplies memory tools to Claude Desktop, Claude Cowork and other local MCP hosts. Its retrieval draws on a documented set of 36 cited neuroscience mechanisms, offering 57 memory tools in total, and includes a self-curating per-project wiki.

It installs as a Claude Code or Codex plugin, or as a standalone Python package, and is released under the MIT license.

Website: https://ai-architect.tools
