Cortex Memory MCP for Openclaw

A powerful persistent memory enhancement for AI agents that enables long-term context retention and semantic retrieval across multiple sessions.

sopaco
v2.7.0
Mar 31, 2026
0
625
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install cortex-mem-mcp

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install cortex-mem-mcp using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Cortex Memory MCP?

cortex-mem-mcp provides a robust framework for adding long-term memory to your AI workflows. By integrating this skill with your agent, you can store user preferences, project context, and past interactions that persist beyond single chat sessions. It utilizes semantic search and a tiered data structure to ensure that the AI recalls the most relevant information without overwhelming its context window.

This implementation of Openclaw Skills bridges the gap between ephemeral chat interactions and truly personalized AI assistance. It transforms standard agents into context-aware assistants that grow more useful the more you interact with them, leveraging a vector database for high-performance retrieval.

Cortex Memory MCP Use Cases

  • Storing and recalling specific user preferences and settings across different projects and sessions.
  • Maintaining project-specific knowledge bases that automatically expand as the conversation progresses.
  • Persisting deep conversation context for long-running software development or research tasks.
  • Tracking historical user-agent interactions to improve personalization and reduce repetitive instructions.
  • Performing semantic searches across historical data using natural language queries to find forgotten details.

How Cortex Memory MCP Works

  1. The AI agent captures relevant information during a session and uses the store tool to place it in the memory pipeline.
  2. Upon reaching a message threshold or receiving a manual command, the commit tool triggers memory extraction.
  3. The system generates tiered layers (L0 Abstract, L1 Overview, and L2 Full Content) to balance detail with token efficiency.
  4. Information is transformed into vector embeddings and indexed in a Qdrant database for semantic retrieval.
  5. When context is needed later, the agent uses search or recall tools to fetch the most relevant memory layers based on the current prompt.

Cortex Memory MCP Setup

First, verify if the binary is available or install it via cargo:

cargo install cortex-mem-mcp

You must have a vector database running. The easiest way is using Docker:

docker run -d -p 6333:6333 qdrant/qdrant

Create a config.toml specifying your LLM API keys and database URL. Finally, add the server to your MCP client (such as Claude Desktop or Cursor). Integrating this into your Openclaw Skills workflow requires pointing the client to your config path using the --config flag.

Cortex Memory MCP Data Schema & Taxonomy

The skill organizes data using a structured URI scheme and a tiered content model to optimize retrieval speed and context window usage:

URI Pattern Purpose
cortex://session/{id}/conversation.md Session-specific history and logs
cortex://user/{id}/preferences/{topic}.md User-specific settings and style guides
cortex://user/{id}/memories/{id}.md General persistent knowledge snippets

Memory Layers:

  • L0 (Abstract): ~100 tokens. Used for quick relevance checking.
  • L1 (Overview): ~2000 tokens. Provides a condensed understanding of the core information.
  • L2 (Content): Full original content. The complete source document.

Cortex Memory MCP Advanced Features

  • Tiered access model (L0/L1/L2) allowing the agent to preview relevance before loading full documents.
  • Automatic memory processing triggered by message count thresholds or periods of inactivity.
  • Multi-tenant support enabling complete memory isolation between different users or projects via tenant IDs.
  • Smart exploration tools that combine hierarchical URI browsing with semantic search capabilities.
  • High-performance vector indexing using Qdrant for millisecond retrieval across thousands of memory entries.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*