claude-cortex
Auto-capture + structured semantic recall for AI coding agents. The memory system Claude Code should have had.
Install / Use
claude mcp add codebloodedai -- npx -y github:codebloodedai/claude-cortexIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of claude-cortex
claude-cortex scores 71/100 on our quality scale, 546th of 590 Data & Analytics skills we index.
Its MCP Server is 5.4 KB long, well organised into 20 sections with 5 code examples: a solid amount of guidance for an agent.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 6 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-09-06 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 90/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
claude-cortex compared with similar skills
All 4 of these similar skills score higher than claude-cortex; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| claude-cortex (this skill)by codebloodedai | 71 | 3 | 6mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 91.6k | 20d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.4k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.2k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 85.8k | today | MCP Server |
Frequently asked questions
- How do I install claude-cortex?
- Run
claude mcp add codebloodedai -- npx -y github:codebloodedai/claude-cortex. The install tabs above show the steps for each supported agent. - Which AI agents does claude-cortex work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is claude-cortex safe to use?
- It is MIT-licensed and scores 90/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is claude-cortex still maintained?
- The repository was last updated about 6 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubclaude-cortex
Auto-capture + structured semantic recall for AI coding agents.
The memory system Claude Code should have had. One install. Zero config. Your AI remembers everything.
What it does
- Captures — hooks into Claude Code's session lifecycle and records every conversation, tool use, and decision automatically
- Indexes — pipes captured content into a local ChromaDB vector store in real-time, classified by topic
- Recalls — provides semantic search + temporal knowledge graph via MCP tools, so your AI finds relevant context instantly
No cloud. No API keys. No subscriptions. Everything runs on your machine.
Install
pip install claude-cortex
cortex init
cortex install
That's it. Restart Claude Code and you have persistent memory.
What cortex install does
- Registers as a Claude Code plugin — hooks into SessionStart, PostToolUse, SessionEnd, and PreCompact
- Registers an MCP server — exposes 10 tools (search, KG, status) to your AI agent
From source (development)
git clone https://github.com/codebloodedai/claude-cortex.git
cd claude-cortex
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
cortex init
cortex install
Quick start
# Mine existing files into the cortex
cortex mine ~/my-project --region myproject
# Search your memory
cortex search "authentication flow"
# Check what's stored
cortex status
# Knowledge graph
cortex kg stats
cortex kg query "Rudy"
cortex kg timeline "project-x"
How it works
The Cortex Structure
| Concept | What it is | Example |
|---------|-----------|---------|
| Region | Top-level domain | myproject, health, trading |
| Cluster | Topic within a region | auth, database, api-design |
| Trace | One chunk of stored memory | A paragraph from a conversation |
| Synapse | Cross-region connection | Links auth in project A to auth in project B |
Memory Stack
| Layer | Size | When | |-------|------|------| | L0 — Identity | ~50 tokens | Every session | | L1 — Critical facts | ~120 tokens | Every session | | L2 — Topic recall | On demand | When topic mentioned | | L3 — Deep search | On demand | When explicitly needed |
Your AI wakes up with ~170 tokens of context. Not 10,000. Just enough to know who you are and what matters.
Auto-Capture Pipeline (Claude Code Hooks)
Four hooks fire automatically during every Claude Code session:
SessionStart
→ session-start.py fires
→ Loads L0 + L1 from cortex → injected as system message
→ AI starts with relevant context, zero manual effort
PostToolUse (Write | Edit | Bash)
→ post-tool-use.py fires
→ Captures operation to ~/.cortex/captures/{session}.jsonl
→ Fast: local file write only, no ChromaDB during session
PreCompact
→ pre-compact.py fires
→ Injects cortex context before context window compression
→ Critical state survives compaction
SessionEnd
→ session-end.py fires
→ Reads all captured observations
→ Classifies each by topic (keyword matching against clusters)
→ Vectorizes and stores as traces in ChromaDB
→ Builds session summary trace
→ Update knowledge graph
→ Ready for next session
MCP Tools
When connected to Claude Code, these tools are available:
| Tool | Description |
|------|-------------|
| cortex_status | Cortex overview — traces, regions, clusters |
| cortex_search | Semantic search with optional filters |
| cortex_add_trace | Store content into region/cluster |
| cortex_delete_trace | Remove a trace by ID |
| cortex_kg_query | Query entity relationships |
| cortex_kg_add | Add temporal fact |
| cortex_kg_invalidate | Mark fact as no longer true |
| cortex_kg_timeline | Chronological entity history |
| cortex_kg_stats | Knowledge graph overview |
| cortex_reconnect | Force reconnect |
Configuration
# ~/.cortex/config.yaml
region: default
store_path: ~/.cortex/store
clusters:
- name: code
description: Code changes, architecture, debugging
keywords: [function, class, bug, fix, refactor, api]
- name: decisions
description: Architecture choices, strategy
keywords: [decided, chose, strategy, plan, design]
- name: general
description: Everything else
keywords: []
vs. existing tools
| | claude-cortex | claude-mem | MemPalace | |---|---|---|---| | Auto-capture | Yes | Yes | No | | Structured recall | Yes | Basic | Yes | | Knowledge graph | Yes | No | Yes | | Real-time indexing | Yes | No | No | | MCP tools | 10+ | 3-4 | 29 | | One install | Yes | Yes | Yes | | License | MIT | AGPL | MIT |
claude-cortex combines the best of both: automatic capture from session hooks + structured semantic recall with a knowledge graph. One tool, not two.
Credits
Storage engine inspired by MemPalace (MIT). Auto-capture architecture inspired by claude-mem. Built from scratch by CodeBloodedAI.
License
MIT — do whatever you want with it.
Related Skills
Agent-Reach
91.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
74.4kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.2kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
85.8k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
