milema-gif/cortex
Local-first memory OS for AI coding agents — hybrid FTS5 + vector search, knowledge graph, lifecycle-aware filtering, MCP native
Platform-specific configuration:
{
"mcpServers": {
"cortex": {
"command": "npx",
"args": [
"-y",
"cortex"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
<div align="center">
Local-first memory OS for AI coding agents
[](https://www.typescriptlang.org/) [](https://modelcontextprotocol.io/) [](https://github.com/asg017/sqlite-vec) [](LICENSE)
</div>
---
Cortex is a Model Context Protocol (MCP) server that adds intelligent memory to Claude Code. It reads from your existing Engram database and layers on hybrid search, a knowledge graph, lifecycle management, and per-turn context briefs — all without touching your existing data or requiring a separate database.
You keep using Engram's mem_save, mem_search, and friends for writing observations. Cortex is the read-side intelligence layer: smarter retrieval, entity awareness, staleness detection, and automatic context injection.
---
| Capability | Plain Engram | Cortex | Mem0 | Zep | Letta | |---|---|---|---|---|---| | Full-text search (FTS5) | Yes | Yes | No | No | No | | Vector similarity search | No | Yes | Yes | Yes | Yes | | Hybrid FTS + vector with RRF fusion | No | Yes | Partial | Partial | No | | Knowledge graph with entity extraction | No | Yes | No | Yes | Partial | | Graph expansion (related memory traversal) | No | Yes | No | Partial | No | | Lifecycle management (active/stale/deprecated) | No | Yes | No | No | No | | Confidence scoring with age decay | No | Yes | No | No | No | | Per-turn preflight context briefs | No | Yes | No | No | No | | Local-first (SQLite, zero cloud) | Yes | Yes | No | No | No | | MCP native (stdio, C
Loading reviews...