Cortex MCP
Cortex MCP is a persistent memory, task management, and autonomous execution engine for AI coding agents — running locally with SQLite storage and a live dashboard.
Project Memory & State
Initialize projects via a 10-question onboarding, switch active projects, get compressed project context, and save session snapshots.
Task & Progress Management
Retrieve the next highest-priority task, log completed work, and run safety checks for warnings/blocks based on DB state.
Feature & File Tracking
Add/update features and track their status (pending, in-progress, done, blocked), mark files as created/done with automatic checkpoints, and rollback files to previous checkpoints.
Test & Issue Management
Register and update tests linked to features, log bugs and blockers, and resolve issues with fix descriptions.
Knowledge Base
Write dictionary entries, save code snippets, log research notes, record architectural decisions, and perform FTS5 keyword, semantic vector, or hybrid searches across all data types.
Autonomous Pipeline
Start goal-driven pipelines that plan a DAG of tasks and auto-execute them, preview plans as dry-runs, monitor progress, pause/resume/cancel execution, auto-heal broken files, and view pipeline history.
Human Interaction
Ask humans for input (blocking until answered) and confirm destructive actions via a red modal before execution.
Knowledge Graph
Add typed relationships between project entities (features, files, tests, issues, decisions), detect contradictions, and resolve conflicting data.
Agent Roles & Token Budget
Set/get agent roles (researcher, builder, reviewer, orchestrator) that control tool permissions, list connected agents, log token usage, and check remaining token budget.
Skills & Health
Load bundled or custom SKILL.md agent guides, and run health checks for DB integrity, missing tests, open issues, and broken files with optional auto-repair.
Monitoring & Access
Observe all activity via a live web dashboard with real-time updates and global search, access project data via
cortex://URIs, or use the comprehensive REST API.
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 MCPget the current project state"
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 MCP
Persistent brain, memory, loop controller, and reminder engine for AI coding agents.
What is Cortex?
Cortex is a local MCP server that gives AI coding agents persistent memory, task management, knowledge graphs, and a live dashboard. It runs on your machine, stores everything in SQLite, and never sends data to the cloud.
Agent starts → cortex_get_state → knows everything → works → cortex_save_snapshot → doneRelated MCP server: apex-memory
Features
31 MCP Tools
Core Loop — get_state, get_next_task, log_progress, check_reminders, save_snapshot
Project Setup — init (10-question onboarding), health check with auto-repair
Features & Files — track features, files, checkpoints, rollback
Tests & Issues — register tests, log bugs, resolve issues
Knowledge Base — dictionary, snippets, research, decisions, FTS5 search
Human Interaction — ask_human (pause for input), confirm_destructive (red modal)
V2 Advanced — token budget (180k), agent roles (4 levels), contradiction detection
Knowledge Graph — relationships between features, files, tests, issues
Live Dashboard
12 tabs — Overview, Pipeline, Features, FileTree, Tests, Progress, Issues, Library, Research, Dictionary, Graph, Settings
Pipeline tab — Start a goal, watch tasks execute live with progress bar, pause/resume/cancel
D3 Knowledge Graph — force-directed visualization with 27+ nodes, drag/zoom/pan
WebSocket Live Push — dashboard updates instantly when data changes
Ctrl+K Search — global search across all tables
shadcn/ui — modern React 19 + Tailwind CSS interface
MCP Resources (10 endpoints)
Read project data without tool calls via cortex:// URIs:
cortex://project, cortex://features, cortex://files, cortex://tests, cortex://issues, cortex://dictionary, cortex://progress, cortex://todos, cortex://relationships, cortex://snapshots
MCP Prompts (5 templates)
Pre-built session workflows: start-session, debug-issue, review-code, init-project, end-session
V2.4 Modules — Autonomous Pipeline
Planner — natural language goal → ordered DAG of tasks with dependency resolution
Executor — auto-executes tasks (agent/command/test/verify), retries failures up to 3×
Loop Controller — pause/resume/cancel with WebSocket live push to dashboard
Auto-Heal — detects broken files (restores from checkpoint), resets failed tests
V2.1 Modules
Audit Trail — structured logging for every tool call
Episodic Memory — timestamped events with importance scoring
Context Compilation — full project state in 2ms
Quick Start
Option 1: npx (Recommended)
Add to your opencode.json:
{
"mcp": {
"cortex": {
"type": "local",
"command": ["npx", "-y", "@neuralnexustech/cortex-mcp@latest", "start", "--project", "."],
"enabled": true,
"env": {
"CORTEX_PROJECT_PATH": "."
}
}
}
}Option 2: Local Install
npm install -g @neuralnexustech/cortex-mcp@latestThen add to opencode.json:
{
"mcp": {
"cortex": {
"type": "local",
"command": ["cortex", "start", "--project", "/path/to/your/project"],
"enabled": true,
"env": {
"CORTEX_PROJECT_PATH": "/path/to/your/project"
}
}
}
}Option 3: Clone & Run
git clone https://github.com/neuralnexustech/cortex-mcp.git
cd cortex-mcp
npm install
cd dashboard && npm install && npm run build && cd ..
node src/server.jsAutonomous Pipeline (V2.4)
Cortex Pipeline is a goal-driven autonomous execution engine. Give it a goal, and it plans, executes, tests, and heals itself — no step-by-step prompting required.
Goal → Planner → DAG Tasks → Executor → Test → Auto-Heal → Done
↕
pause / resume / cancel
(WebSocket live)How It Works
You type: "Build authentication system"
↓
Planner breaks goal into ordered DAG:
[1] Scaffold routes → [2] Create User model
→ [3] JWT middleware → [4] Login endpoint
→ [5] Register endpoint → [6] Password hashing
→ [7] Run tests → [8] Verify security
↓
Executor auto-runs each task:
✓ Scaffold routes (1.2s)
✓ Create User model (0.8s)
✗ JWT middleware → retry #1 → ✓ (2.1s)
✓ Login endpoint (0.5s)
...
↓
Auto-Heal detects broken files → restores from checkpoint
Auto-Heal resets failed tests → retries with new approach
↓
Done. Pipeline history saved. Dashboard updated via WebSocket.8 Pipeline MCP Tools
Tool | Purpose |
| Give a goal → DAG planned + executed |
| Check progress, task states, retry counts |
| Pause mid-execution |
| Resume from where it paused |
| Cancel remaining tasks |
| Preview task breakdown (dry run) |
| Fix broken files, reset failed tests |
| List all past pipeline runs |
Why This Is Different
Traditional AI Assistants | Cortex Pipeline |
Wait for your next prompt | Executes autonomously toward a goal |
You give step-by-step instructions | You give a goal, it plans the steps |
You babysit each action | Auto-retry on failure (up to 3×) |
No memory of past runs | Full pipeline history + checkpoints |
Single-threaded Q&A | Multi-task DAG with priority ordering |
You fix broken files | Auto-heal restores from checkpoints |
In short: Most AI tools are reactive — you drive. Cortex Pipeline is proactive — it drives itself, and you just set the destination.
Session Lifecycle
START
↓
cortex_get_state → project context (<200 tokens)
↓
cortex_get_next_task → highest-priority pending todo
↓
WORK → write code, create files
↓
cortex_tick_file → track each file created
↓
cortex_log_progress → log completed work
↓
cortex_check_reminders → handle warnings
↓
cortex_get_next_task → next todo (or "ALL TASKS COMPLETE")
↓
...repeat...
↓
cortex_save_snapshot → compress session to summary
↓
ENDTool Reference
Core Loop (5)
Tool | Purpose |
| Compressed project context |
| Highest-priority pending todo |
| Log completed work |
| 6 safety checks |
| Compress session summary |
Project Setup (3)
Tool | Purpose |
| Initialize project (10-question onboarding) |
| Switch between projects |
| DB integrity + auto-repair |
Features & Files (5)
Tool | Purpose |
| Register a feature |
| Update feature status |
| Track file creation (auto-checkpoints) |
| List all tracked files |
| Restore file from checkpoint |
Tests (2)
Tool | Purpose |
| Register a test |
| Mark test passed/failed |
Issues (2)
Tool | Purpose |
| Log a bug or blocker |
| Mark issue resolved with fix |
Knowledge Base (6)
Tool | Purpose |
| Document a file/feature |
| Retrieve full dictionary entry |
| Save reusable code snippet |
| Log library research notes |
| Record architectural decision |
| FTS5 + vector hybrid search |
Human Interaction (2)
Tool | Purpose |
| Pause, ask question, wait for answer |
| Red confirmation modal for dangerous ops |
V2 Advanced (5)
Tool | Purpose |
| Track token usage per action |
| Check remaining budget (180k default) |
| Set agent role |
| Get agent permissions |
| List all connected agents |
Knowledge Graph (3)
Tool | Purpose |
| Link entities |
| Find conflicting data |
| Resolve conflicts |
Skills (2)
Tool | Purpose |
| Load SKILL.md guide |
| List available skills |
Database
SQLite at .cortex/cortex.db with:
WAL mode — concurrent reads while writing
FTS5 — full-text search across all tables
15+ tables — project, features, files, tests, issues, dictionary, progress, relationships, etc.
Triggers — auto-sync FTS index on insert/update/delete
Dashboard
Live at http://localhost:3001 when the server runs.
Ctrl+K — Global search overlay
Graph tab — D3 force-directed knowledge graph
LIVE indicator — WebSocket connection status
12 tabs — Overview, Pipeline, Features, FileTree, Tests, Progress, Issues, Library, Research, Dictionary, Graph, Settings
REST API
Endpoint | Description |
| Health check |
| All project data |
| Knowledge graph (nodes + edges) |
| Search across tables |
| Audit trail entries |
| Episodic memory events |
| Compiled project state |
| WebSocket status |
| Start a pipeline from a goal |
| Get pipeline run status + tasks |
| List past pipeline runs |
| Pause active pipeline |
| Resume paused pipeline |
| Cancel active pipeline |
| Submit answer to pending question |
MCP Resources
Read project data without tool calls:
URI | Data |
| Project config, features, todos |
| All features with status |
| All tracked files |
| All tests |
| All issues |
| File documentation |
| Recent activity |
| Pending tasks |
| Knowledge graph edges |
| Session summaries |
Architecture
cortex-mcp/
├── bin/cortex.js # CLI entry point
├── src/
│ ├── server.js # MCP server (main entry)
│ ├── api/server.js # Express REST API + dashboard
│ ├── db/
│ │ ├── schema.js # Table definitions + FTS5
│ │ ├── init.js # DB connection (WAL mode)
│ │ ├── queries.js # Read/write functions
│ │ └── cortex_v2.sql # V2 migration
│ ├── pipeline/ # V2.4 Autonomous pipeline
│ │ ├── planner.js # Goal → DAG task breakdown
│ │ ├── executor.js # Auto-execute + retry
│ │ ├── loop.js # Pause/resume/cancel controller
│ │ └── index.js # 8 MCP tool registration
│ ├── tools/ # 31 MCP tools
│ │ ├── state.js # cortex_get_state
│ │ ├── tasks.js # cortex_get_next_task
│ │ ├── search.js # FTS5 + hybrid search
│ │ ├── contradictions.js # Contradiction detection
│ │ ├── tokens.js # Token budget
│ │ ├── roles.js # Agent roles
│ │ ├── relationships.js # Knowledge graph
│ │ ├── health.js # Auto-repair
│ │ └── ...
│ ├── embeddings/ # ONNX vector engine
│ ├── websocket/server.js # WebSocket live push
│ ├── audit/index.js # Audit trail
│ ├── memory/
│ │ ├── episodic.js # Episodic memory
│ │ └── compiler.js # Context compiler
│ ├── resources/project.js # MCP Resources
│ └── prompts/index.js # MCP Prompts
├── dashboard/ # React 19 + shadcn/ui
│ ├── src/
│ │ ├── App.jsx # Main app + routing
│ │ ├── components/
│ │ │ ├── tabs/ # 11 tab components
│ │ │ ├── ui/ # shadcn/ui components
│ │ │ ├── Graph.jsx # D3 knowledge graph
│ │ │ └── GlobalSearch.jsx
│ │ └── styles/globals.css # Tailwind + shadcn vars
│ └── dist/ # Built dashboard
├── skills/ # Agent skill files
├── docs/ # Documentation
└── AGENTS.md # Agent guideEnvironment Variables
Variable | Default | Description |
|
| Project root directory |
|
| REST API port |
|
| Dashboard port |
|
| Enable cloud sync |
Requirements
Node.js ≥ 18.0.0
Works on Windows, macOS, Linux
Links
Platform | URL |
Website | |
GitHub | |
npm |
License
MIT © neuralnexustech
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
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/neuralnexustech/cortex-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server