Give AI coding agents the right context from your repository.
Cortex builds a local map of your code, symbols, relationships, and project rules. Coding agents query that map through the CLI instead of guessing or reading the whole repository.
Your code stays on your machine. MCP is not required.
Requires Node.js 20.9+ and Git.
npm install --global @danielblomma/cortex-mcp
cd your-project
cortex init --bootstrap
This indexes the repository, adds Cortex instructions to AGENTS.md
, installs Git hooks, and starts the background watcher.
Check the setup:
cortex doctor
cortex search "where is authentication handled?" --json
cortex related <entity-id> --json
cortex impact "authentication" --json
cortex rules --json
cortex pattern-evidence src/auth.ts --json
Agents can run these commands directly. cortex init
adds instructions that tell them to search before answering and check impact before refactoring.
Git hooks and the watcher normally update Cortex automatically.
cortex status
cortex watch status
cortex update
Run cortex update
manually after a large change or when results look stale.
Make lexical and graph search available first while semantic indexing continues in the background:
cortex bootstrap --background --profile interactive
cortex indexing status --json
This mode supports macOS, Linux, and WSL. Native Windows should use normal foreground bootstrap.
npm install --global @danielblomma/cortex-mcp@latest
cortex init --force
cortex bootstrap
cortex update
Project configuration and rules are preserved. See CHANGELOG.md for version-specific notes.
The normal Cortex workflow uses the CLI. If a client explicitly requires MCP,
run cortex connect
.
MIT