cortex-mem-mcp

A persistent memory system for an AI coding agent. It saves conversations and project details so they can be searched and recalled in later sessions.

In plain words
What is it for?
Remembering user preferences, previous conversations, and project information. Searching stored memories and bringing relevant context into a new session.
Why use it?
It prevents the agent from losing useful context when a session ends. This reduces repeated explanations and helps it remember preferences and past decisions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sopaco/cortex-mem/skill
Any agent
npx skills add sopaco/cortex-mem --skill skill
Clone the repo
git clone --depth 1 https://github.com/sopaco/cortex-mem

Made for: Claude Code, Codex.

Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,911 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00072 $0.02911
Opus 5 $0.00036 $0.01456
Sonnet 5 $0.00014 $0.00582
Haiku 4.5 $0.00007 $0.00291

Measured 2d ago against content hash 2a2ae96ac8d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cortex-mem-mcp scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:6333
cortex-mem-mcp/skill/SKILL.md · 459 lines

How it starts

The opening of the file, as written. The whole thing — 459 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cortex Memory MCP Skill

This skill enables persistent memory capabilities for AI agents, allowing them to store, search, and recall information across sessions using semantic retrieval.

Prerequisites Check

Before configuring this skill, verify if cortex-mem-mcp is available in your system:

# Check if cortex-mem-mcp is in PATH
which cortex-mem-mcp || where cortex-mem-mcp  # Linux/macOS || Windows

If the command returns a path, the binary is already installed. If not, proceed to the installation section below.

Installation

Option 1: Install from crates.io (Recommended)

cargo install cortex-mem-mcp

After installation, verify:

cortex-mem-mcp --version

Option 2: Build from Source

# Clone the repository
git clone https://github.com/sopaco/cortex-mem.git
cd cortex-mem

# Build the release binary
cargo build --release --bin cortex-mem-mcp

# The binary will be at:
# ./target/release/cortex-mem-mcp (Linux/macOS)
# .\target\release\cortex-mem-mcp.exe (Windows)

Option 3: Download Pre-built Binary

Download the latest release from GitHub:

Choose the appropriate binary for your platform:

  • cortex-mem-mcp-linux-x86_64 (Linux x64)
  • cortex-mem-mcp-darwin-arm64 (macOS Apple Silicon)
  • cortex-mem-mcp-darwin-x86_64 (macOS Intel)
  • cortex-mem-mcp-windows-x86_64.exe (Windows x64)

Configuration

Step 1: Create Configuration File

Create a config.toml file (e.g., ~/.config/cortex-mem/config.toml):

[cortex]
# Data directory for storing memories
data_dir = "~/.cortex-data"

[llm]
# LLM API configuration
api_base_url = "https://api.openai.com/v1"
api_key = "your-api-key"
model_efficient = "gpt-5-mini"
temperature = 0.1
max_tokens = 65536

[embedding]
# Embedding configuration
api_base_url = "https://api.openai.com/v1"
api_key = "your-embedding-api-key"
model_name = "text-embedding-3-small"
batch_size = 10
timeout_secs = 30

[qdrant]
# Vector database configuration
url = "http://localhost:6334"
collection_name = "cortex_memories"
embedding_dim = 1536
timeout_secs = 30

Read the full file on GitHub · 459 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 459 lines · 72 tokens per session scan A 2a2ae96ac8d6

Subscribe to this mod's changes

cortex-mem-mcp is a skill published in the GitHub repository sopaco/cortex-mem (306 stars, last pushed 1mo ago), licensed MIT. It adds 72 tokens to every session and 2,911 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

quarkclouddrive

Skill "quarkclouddrive" from quark-clouddrive/quarkclouddrive_offical, covering quark drive 官方 skill, 安装, 升级 / 更新 skill(重要约定,必须遵守), 安装后欢迎语(引导绑定) and 调用方式.

quark-clouddrive/quarkclouddrive_offical · 79 tokens

anysearch

Real-time search engine supporting web search, vertical domain search, parallel batch search, and URL content extraction.

anysearch-ai/anysearch-skill · 24 tokens

officecli-academic-paper

Use this skill to build academic-style .docx output: journal / conference / thesis chapters carrying formal citation style (APA, Chicago, IEEE, MLA), numbered equations, figure & table cross-references, footnotes/endnotes, bibliography, or multi-column journal layout. Trigger on: 'research paper', 'journal paper'…

iOfficeAI/OfficeCLI · 141 tokens

officecli-word-form

Use this skill to create fillable Word forms (.docx) with real Content Controls (SDT) + legacy FormField checkboxes + MERGEFIELD mail-merge placeholders + document protection. Trigger on: 'fillable form', 'form fields', 'content controls', 'SDT', 'word form', 'fill in', 'only editable fields', 'protect document'…

iOfficeAI/OfficeCLI · 224 tokens

officecli-data-dashboard

Use this skill to build a multi-element Excel dashboard — Dashboard sheet on open, multiple formula-driven KPI cards, multiple charts, sparklines, and conditional formatting — from CSV or tabular input. Trigger on: 'dashboard', 'KPI dashboard', 'analytics dashboard', 'executive dashboard', 'metrics dashboard', 'CSV to…

iOfficeAI/OfficeCLI · 157 tokens

officecli

Create, analyze, proofread, and modify Office documents (.docx, .xlsx, .pptx) using the officecli CLI tool. Use when the user wants to create, inspect, check formatting, find issues, add charts, or modify Office documents.

iOfficeAI/OfficeCLI · 56 tokens