# Cortex Memory Engine

Cortex gives an agent memory that carries across sessions, so it can retrieve earlier project details and preferences when you need them.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 35
- Author: gambletan
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/gambletan/cortex
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/cortex-memory-engine

## What it does

Cortex connects to an agent over MCP and organizes stored information into four tiers: working, episodic, semantic, and procedural. It also builds links between people and revises beliefs as new evidence arrives.

The memory system supports retrieval across sessions and channels, with automatic conversation compression. The Claude Code setup runs a Docker command, so Docker needs to be available in the environment. Its `--rm` flag removes the container when it stops.

This MCP server is added under the name `cortex-memory-engine`. It gives Claude Code a separate memory connection rather than invoking a built-in command.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add cortex-memory-engine -- docker run -i --rm ghcr.io/gambletan/cortex:v1.8.0
```

### Codex

**Platform CLI**
```bash
codex mcp add cortex-memory-engine -- docker run -i --rm ghcr.io/gambletan/cortex:v1.8.0
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "cortex-memory-engine": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/gambletan/cortex:v1.8.0"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "cortex-memory-engine": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/gambletan/cortex:v1.8.0"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add cortex-memory-engine docker run -i --rm ghcr.io/gambletan/cortex:v1.8.0
```

## When to use it
- carry project preferences across agent sessions
- retrieve an earlier decision about a project
- sort stored details into memory tiers
- connect references to the same person across channels
- revise a stored belief when new evidence appears

## Example prompts
- Remember that I run tests before sending changes.
- What did we decide earlier about this project's structure?
- What preferences have you saved about how I work on this project?

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
