cortex-memory
Provides a local LLM provider option using Ollama for offline memory extraction.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cortex-memorysearch memory for auth middleware decisions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cortex - Project Memory for AI Coding Assistants
Your AI forgets everything between sessions. Cortex gives it a brain.
Every time you start a new AI coding session, you waste 15-30 minutes re-explaining your project. Architecture, past decisions, known bugs, conventions — all gone.
Cortex captures everything automatically and injects it into your next session before you type a single character.
Works with Claude Code | Cursor | Cline | Copilot | Any MCP client
Why Cortex?
Without Cortex | With Cortex |
"Here's my project structure again..." | AI already knows your architecture |
"We decided to use Redis because..." | Decision auto-captured with full context |
"The bug was in the auth middleware..." | Bug pattern recorded, never repeated |
"Don't touch that file, it's..." | Convention remembered across sessions |
15-30 min context loading per session | 0 min. Full context injected automatically |
How It Works
You code with AI --> Cortex watches silently --> Memory builds automatically
|
Next session starts <-- Context injected into CLAUDE.md <-- Best context selectedInstall. Code. That's it. Zero configuration needed.
Features
Real-Time Memory Capture
Cortex monitors your AI sessions live — not just at the end:
Every 1 second — Watches for new messages
Every 15 seconds — Fast local extraction (no API call)
Every 20 messages — Deep LLM extraction in background
On decisions/bugs detected — Immediate capture
Status bar shows
Cortex: Liveduring active sessions
3-Layer Memory Architecture
Inspired by how human memory works:
Layer 1: Working Memory (hot) — Always injected (~800 tokens)
Last session summary, recent decisions, open problems
Auto-injected into
CLAUDE.mdbefore every sessionYour AI reads this automatically
Layer 2: Episodic Memory (warm) — Session histories
One file per session with full context
Auto-generated Architectural Decision Records (ADRs)
Searchable via CLI and MCP
Layer 3: Semantic Memory (cold) — Knowledge graph
Full-text search across all layers
Vector embeddings (coming in v0.2)
Auto-Generated Decision Logs
Every architectural decision captured with:
What was decided and why
Alternatives considered
Files affected
Full session context
VSCode Sidebar
Memory Layers tree view (Working, Episodes, Decisions)
Memory Health dashboard (0-100 score)
Token budget tracking
Live updates during sessions
CLAUDE.md Auto-Injection
<!-- CORTEX:START -->
## Project Memory (auto-managed by Cortex)
### Last Session
Fixed authentication bug in session middleware...
### Recent Decisions
- **Use Redis for sessions**: Latency requirements...
### Open Problems
- Rate limiting not implemented yet
_Last updated: 2026-03-26T10:30:00Z | Tokens: 227/800_
<!-- CORTEX:END -->Claude Code, Cursor, and Cline read CLAUDE.md natively.
Quick Start
1. Install
Search "Cortex Memory" in VS Code Extensions, or:
ext install cortex-dev.cortex-memory2. (Optional) Add a free API key for smarter extraction
Get a free Gemini key at aistudio.google.com/apikey
Run
Ctrl+Shift+P→ Cortex: Set API Key → paste key
3. Code
Start coding with your AI assistant. Cortex runs silently in the background.
Works without an API key too — basic pattern-matching extraction runs locally.
What Gets Captured
Signal | Example | Where It's Stored |
Decisions | "Let's go with Redis for sessions" |
|
Bug patterns | "Root cause was a race condition" | Episode + working memory |
Architecture | "Refactor auth into its own module" | Episode + decision log |
File changes | Every file read, edited, created | Tracked per episode |
Session context | What you worked on, what's next | Working memory |
Open problems | Unresolved bugs, TODOs | Working memory |
LLM Providers
Provider | Cost | Setup |
Gemini (default) | Free (500 req/day) | Get key at aistudio.google.com/apikey |
Anthropic | ~$0.01/session | Set |
Ollama | Free (local) | Install Ollama, set provider to |
No API key | Free | Works with basic pattern matching |
CLI Tool
npm install -g cortex-memory
cortex status # Memory health score
cortex query "auth flow" # Search across all layers
cortex export # Export as single markdownMCP Server (Cursor, Cline, Zed)
{
"cortex": {
"command": "node",
"args": ["path/to/cortex/dist/mcp/index.js"]
}
}Tools: cortex_get_context | cortex_search | cortex_save_memory | cortex_get_decisions | cortex_status
Settings
Setting | Default | Description |
|
| Provider: |
| — | API key for Gemini or Anthropic |
|
| Token budget for working memory |
|
| Auto-inject into CLAUDE.md |
Commands
Command | Description |
Cortex: Set API Key | Configure your LLM API key |
Cortex: Show Memory Status | Health score, token usage, stats |
Cortex: Search Memories | Full-text search |
Cortex: Refresh Memory View | Force refresh sidebar |
Cortex: Initialize Project Memory | Manual init (usually automatic) |
Privacy
100% local — All data in
.cortex/on your machineNo telemetry — Zero data collection, zero tracking
No cloud — Only external call is to your chosen LLM
Your data — Delete
.cortex/to erase everythingGit-safe — Auto-added to
.gitignore
Supported AI Assistants
Assistant | Integration | How |
Claude Code | Native | CLAUDE.md injection + session watching |
Cursor | MCP | Via MCP server |
Cline | MCP | Via MCP server |
Copilot | Passive | Reads CLAUDE.md if present |
Zed | MCP | Via MCP server |
Continue | MCP | Via MCP server |
FAQ
Does this slow down my editor? No. <200KB bundle. All processing in background.
Does it work without an API key? Yes. Basic extraction works out of the box. API key enables deeper LLM-powered extraction.
How much does Gemini cost? $0. Free tier = 500 requests/day. More than enough.
Can my team share memories?
Team sync via git planned for v0.2. You can commit .cortex/ to share now.
Contributing
See CONTRIBUTING.md. PRs welcome.
License
MIT
Stop explaining your codebase to AI. Let Cortex remember it for you.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SKULLFIRE07/cortex-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server