Cortex logo

Cortex

by cdeust

Local persistent memory for Claude Code, Codex, and other MCP hosts, with retrieval, profiling, codebase analysis, and lifecycle automation.

Install Cortex

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "cdeust-cortex": {
      "command": "uvx",
      "args": [
        "--from",
        "hypermnesia-mcp[sqlite]",
        "hypermnesia-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 57 tools correctly ().

Overview

cdeust/Cortex provides local persistent memory for AI coding agents through a stdio MCP server, using SQLite by default or PostgreSQL with pgvector when configured. It stores and retrieves decisions, fixes, project context, profiles, session state, and codebase knowledge, while lifecycle hooks automate capture and context loading for Claude Code and Codex. Reach for it when agents need continuity across sessions, searchable project history, provenance checks, or guided recovery after context compaction. Its retrieval and memory-management features also support graph traversal, hierarchical exploration, consolidation, and usage feedback.

Use cases

  • Retain decisions and fixes between coding sessions
  • Restore task context after context-window compaction
  • Search project history with semantic and lexical ranking
  • Analyze a codebase and connect symbols through a memory graph
  • Audit stored memories for stale references and provenance

Key features

  • Local SQLite storage with optional PostgreSQL and pgvector
  • Persistent memory capture, recall, ranking, and feedback
  • Claude Code and Codex session profiling
  • Hierarchical, graph, causal, and unified search
  • Codebase and conversation-history ingestion
  • Checkpoint, consolidation, validation, and diagnostics tools

Tools57

What Cortex lets your agent do. Expand a tool for its parameters.

Verified live~29.3k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

35/35 checks healthy over the last 114d

What it can do

From the 57 tools this server returned when we ran it; 57 declare their own safety hints.

Can delete or modify data · 4Writes files · 2Makes changes · 31Handles credentials · 3Makes network requests · 7Read-only tools · 24
Network at startup2 connections
Files written at startup30

Observed 2026-11-30 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · hypermnesia-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars78Stargazers on the source repository.
Last commit3d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed57Callable tools this server registers over MCP.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Cortex works

What cdeust/Cortex does

cdeust/Cortex gives coding agents a persistent, local memory store that survives individual sessions. It can retain decisions, lessons, errors and fixes, project structure, session summaries, cognitive profiles, and whole-task checkpoints. Memories can be searched semantically and lexically, inspected through their graph relationships, ranked with replay and usefulness signals, and checked for stale file references or provenance.

The server supports SQLite as the zero-configuration backend and PostgreSQL with pgvector and pg_trgm when a PostgreSQL setup is selected. Claude Code and Codex can share the same store when they use the same configuration root and backend. The system also includes a per-project wiki workflow, codebase ingestion, profile analysis, and maintenance routines for aging, consolidating, and pruning stored information.

How it works

Memory writes pass through a novelty-oriented gate that considers embedding, entity, temporal, and structural signals. Accepted content can receive tags, extracted entities, relationships, and provenance information; similar content may be merged or rejected. Retrieval combines vector, full-text, trigram, heat, and recency signals, followed by reranking and additional context such as prospective triggers and related graph activity.

Cortex builds cognitive profiles by scanning Claude Code and Codex JSONL session data. detect_domain identifies the likely working domain, while query_methodology loads its cached profile and relevant hot memories. Session-end processing updates profiles incrementally, records a session summary, and can create lesson candidates and prospective triggers.

Working state can be saved before context compaction and restored afterward. For broader exploration, hierarchical recall exposes topic clusters, memory navigation follows temporal co-access links, and causal-chain queries traverse entities and typed relationships. Maintenance tools handle decay, consolidation, compression, semantic transfer, pruning, and health reporting.

Setup and configuration

For Claude Code, add the marketplace and install the hypermnesia-mcp plugin, then initialize it before the first session:

Terminal
claude plugin marketplace add cdeust/Cortex
claude plugin install hypermnesia-mcp
claude --init-only

The initialization step installs the runtime, semantic-search dependencies, and embedding model. The repository also provides a Claude Desktop MCPB bundle. Codex users can install the Python package with the SQLite extra and add the Codex marketplace plugin. Gemini CLI, Cursor, Windsurf, and VS Code can launch the same stdio server as other MCP hosts.

A fresh installation normally creates a local store beneath ~/.claude/methodology/. On supported macOS and Linux systems, initialization can provide a managed local PostgreSQL instance; Windows uses SQLite. An explicitly configured PostgreSQL connection takes precedence. check_setup reports backend readiness, dependencies, storage access, vector search, and capture health.

Tools and capabilities

The tool set covers several distinct workflows:

  • Profile and session context: detect_domain, query_methodology, list_domains, rebuild_profiles, record_session_end, and explore_features.
  • Memory operations: remember, recall, rate_memory, forget, anchor, validate_memory, and memory_stats.
  • Context recovery: checkpoint saves and restores task state around compaction.
  • Search and exploration: unified_search, recall_hierarchical, drill_down, navigate_memory, get_causal_chain, and recall_skills.
  • Project ingestion: seed_project, codebase_analyze, import_sessions, and backfill_memories.
  • Maintenance and diagnostics: consolidate, get_telemetry, get_grooming_health, detect_gaps, and check_setup.
  • Narrative output: narrative turns stored project history into a multi-section account or a short summary.

Limitations and notes

The Claude Desktop bundle includes MCP tools but not lifecycle hooks. Automatic capture and project-context behavior therefore differs between native Claude Code or Codex plugins and a plain MCP host. PostgreSQL support depends on the platform and local setup; SQLite is the fallback in supported configurations.

Retrieval is not read-only in every case: recall, hierarchical recall, drilling, and graph navigation record replay activity and update related counters. Hard deletion through forget is irreversible, while protected or anchored memories require an explicit force option. Session transcript imports can take from seconds to minutes, and full codebase analysis can take substantially longer than the shallow project seeding pass.

The server runs locally by default, but optional integrations, remote PostgreSQL, and telemetry can use the network when configured. Its neuroscience-inspired mechanisms describe implementation choices; retrieval improvements should be evaluated against the workload being served.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Cortex

cdeust/Cortex is an MCP server that connects AI coding agents to a local persistent memory store backed by SQLite or PostgreSQL with pgvector. Its main tools record and recall project knowledge, analyze codebases, build session profiles, save checkpoints, validate provenance, and maintain memories across Claude Code, Codex, and other MCP hosts.

Install it through the Claude Code marketplace, initialize the plugin, or use the repository's MCPB bundle for Claude Desktop. Claude Code users run the marketplace and plugin commands followed by `claude --init-only`; Codex users install the SQLite package extra and the Codex plugin.

Yes, cdeust/Cortex works with Cursor through its standard stdio MCP server. Cursor can launch the same server and access its memory tools; the lifecycle hooks supplied by the native Claude Code and Codex plugins are separate from the general MCP tool interface.

It uses SQLite by default and can use PostgreSQL with pgvector and pg_trgm when configured. Supported macOS and Linux installations may receive a managed local PostgreSQL instance, while Windows uses SQLite; an explicitly configured PostgreSQL connection takes precedence.

Call `rebuild_profiles` after installation, a major workflow change, or when `query_methodology` reports a cold start. It scans Claude Code and Codex session data, rebuilds domain profiles, and updates `~/.claude/methodology/profiles.json`; normal freshness checks skip scans whose profiles are less than an hour old.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCortex AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/cdeust-cortex?style=directory)](https://allmcps.com/mcp/cdeust-cortex)
HTML Embed
<a href="https://allmcps.com/mcp/cdeust-cortex"><img src="https://allmcps.com/api/badge/cdeust-cortex?style=directory" alt="Cortex on AllMCPs" /></a>