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 "Deploy 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 MCP get 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: Xanther memory Engine
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
Available Tools
42 toolscortex_add_decisionB
Log an architectural decision
Inputs: title (required), reason (required), alternatives.
cortex_add_featureC
Add a new feature
Inputs: name (required), description, priority.
cortex_add_relationshipC
Create a relationship between two entities (feature, file, test, issue, decision).
Inputs: source_type (required), source_id (required), target_type (required), target_id (required), +1 more.
cortex_add_researchC
Save library research notes
Inputs: notes (required), library_name, library, version, +2 more.
cortex_add_snippetC
Save a code snippet to library
Inputs: title (required), code (required), language, tags.
cortex_add_testB
Add a test linked to a feature
Inputs: name (required), feature_id.
cortex_ask_humanA
Force pause, queue a question for human, block until answered via POST /api/human-answer
Inputs: question (required), agent.
cortex_auto_healA
Auto-detect and fix broken files, failed tests, and other issues. Returns list of healed items.
Inputs: auto_fix.
cortex_check_contradictionsA
Find conflicting data in the dictionary. If key provided, checks only that entry. If no key, scans recent entries.
Inputs: key.
cortex_check_remindersB
Run all 6 reminder checks — returns list of warnings/blocks based on real DB state
Inputs: no named parameters.
cortex_confirm_destructiveA
Block dangerous actions until human confirms. Shows red modal in dashboard. Falls back to terminal if no dashboard.
Inputs: action (required), target.
cortex_get_detailC
Get full dictionary entry for a file or feature
Inputs: key (required).
cortex_get_next_taskA
Get next pending todo - agent always calls this, never decides own next step
Inputs: no named parameters.
cortex_get_roleB
Get the role and permissions for an agent.
Inputs: agent_name (required).
cortex_get_skillA
Get the full content of a Cortex skill file. Call this at the start of any session to load the complete agent guide. Works with Claude Code, Gemini, Codex, Cursor, OpenCode, and any MCP client. Defaults to the main "cortex" skill (SKILL.md) if no name is given.
Inputs: name.
cortex_get_stateA
Get compressed project state (under 200 tokens) — call before every action. Includes token budget warning if >50% used.
Inputs: session_id.
cortex_get_token_budgetB
Get token budget status for the current session.
Inputs: session_id (required), budget.
cortex_healthA
Check DB integrity, missing tests, open issues, broken files. Auto-repairs common problems.
Inputs: auto_repair.
cortex_initA
Initialize Cortex project. You MUST ask the human ALL 10 onboarding questions FIRST using cortex_ask_human. Do NOT call this tool until you have all answers. The 10 mandatory questions are: 1) Project name, 2) Goal, 3) Tech stack, 4) UI style, 5) Preferred libs, 6) Forbidden libs, 7) File structure, 8) Existing codebase, 9) Core features, 10) Complexity level.
Inputs: project_name (required), goal (required), stack (required), core_features (required), +6 more.
cortex_list_agentsA
List all connected agents and their roles.
Inputs: no named parameters.
cortex_list_skillsA
List all available Cortex skills — bundled with the package (always available) plus any user-added skills. Returns name, source ("bundled" or "user"), and description for each.
Inputs: no named parameters.
cortex_log_issueC
Log a bug or blocker
Inputs: title (required), description, file_path.
cortex_log_progressC
Log a completed step
Inputs: task (required), file_path, file, notes, +1 more.
cortex_log_tokensA
Log token usage for the current action. Call after every tool call.
Inputs: session_id (required), input_tokens (required), output_tokens (required).
cortex_pipeline_cancelA
Cancel a running or paused pipeline.
Inputs: pipeline_id.
cortex_pipeline_historyB
View recent pipeline runs and their results.
Inputs: limit.
cortex_pipeline_pauseC
Pause the currently running pipeline.
Inputs: pipeline_id.
cortex_pipeline_planA
Preview what tasks a pipeline would create for a goal without starting it.
Inputs: goal (required).
cortex_pipeline_resumeB
Resume a paused pipeline.
Inputs: pipeline_id.
cortex_pipeline_startA
Start an autonomous pipeline from a goal. Breaks goal into tasks, executes them, auto-retries failures.
Inputs: goal (required), max_retries, pause_on_human, session_id, +1 more.
cortex_pipeline_statusB
Get the status of a running or completed pipeline.
Inputs: pipeline_id.
cortex_resolve_contradictionB
Resolve a contradiction by choosing which version to keep.
Inputs: id (required), keep_version (required), corrected_value.
cortex_resolve_issueB
Mark issue resolved with fix description
Inputs: id (required), fix (required).
cortex_rollbackB
Restore file to checkpoint
Inputs: file_path (required), checkpoint_id.
cortex_save_snapshotA
Compress current session to summary, save to DB and .cortex/snapshots/ on disk
Inputs: summary (required), session_id, agent.
cortex_searchA
Search across dictionary, issues, snippets, research, and progress. Supports keyword (FTS5), semantic (vector), and hybrid (RRF fusion) modes. Returns ranked results with source table, id, and matched snippet.
Inputs: query (required), mode, tables.
cortex_set_active_projectA
Switch active project (loads different .cortex DB). Blocked when process was started with --project (locked to single project).
Inputs: project_path (required).
cortex_set_roleA
Set the role for an agent. Roles control which tools the agent can call.
Inputs: agent_name (required), role (required).
cortex_tick_fileA
Mark a file as created/done in file tree. Saves checkpoint if file exists on disk.
Inputs: file_path (required), status, feature_id, test_id, +1 more.
cortex_update_featureC
Update feature status
Inputs: id (required), status (required).
cortex_update_testC
Pass or fail a test
Inputs: id (required), status (required), error_output.
cortex_write_dictionaryC
Write or update a dictionary entry
Inputs: key (required), short_summary, short, full_description, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 42 tools
Most tools have clearly distinct purposes: pipeline_* tools manage pipelines, role/agent tools manage permissions, add/update tools handle feature and test tracking. The main confusion is between cortex_health and cortex_auto_heal, which both check integrity and repair broken items, and cortex_check_reminders overlaps somewhat with both. The cortex_get_state vs cortex_get_detail distinction is clear.
The set follows a consistent cortex_ prefix with verb_noun structure (add_feature, get_state, resolve_issue, pipeline_start). A few deviations exist: cortex_health is a bare noun instead of a verb_noun form, and cortex_tick_file uses the unusual 'tick' verb, but these are minor and decodable. Overall the pattern is predictable.
42 tools is well beyond the 25+ threshold for 'too many' and requires a large surface area for an agent to internalize. The scope is broad (project state, features, tests, issues, knowledge base, skills, roles, pipelines, tokens, health), but much of it could be consolidated — e.g., pipeline alone takes 7 tools, and health/auto_heal/check_reminders could be unified. The count makes misselection more likely.
The core workflow is well covered: init → get_next_task → log_progress → tick_file → add/update tests → log/resolve issues, plus pipeline lifecycle has full start/pause/resume/cancel/plan/history coverage. However, there are notable gaps: no delete operations anywhere (no delete_feature, delete_test, delete_snippet, delete_issue), and no list/get_all tools — retrieval depends almost entirely on cortex_search or the compressed state. Read and removal paths are weak for a system that stores this much data.
Maintenance
Related MCP Connectors
The project brain for AI coding agents — memory, decisions, sprints, knowledge base via MCP.
Persistent engineering memory designed to follow developers across coding agents.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides persistent project memory for AI coding agents, enabling context retention across sessions via event logging, briefing generation, and querying.MIT

Xanther memory Engineofficial
AlicenseNot gradedqualityCmaintenancePersistent memory for AI coding assistants.3MIT- AlicenseNot gradedqualityBmaintenanceProvides persistent cognitive memory for AI coding agents, enabling them to recall architecture decisions, coding preferences, and project facts across sessions.68MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to read and write persistent, local-first memory across sessions and projects, with semantic search, global guidelines, and optional autonomous task execution.-