Cortex logo

Cortex

Indexes a local repository for semantic search, code relationships, impact analysis, and repository rules through CLI or optional MCP.

Install Cortex

Run the project’s own setup commands, in order.

Setup steps from the project

cortex installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    npm install --global @danielblomma/cortex-mcp
    
  2. 2. Configure
    cortex init --bootstrap
    
  3. 3. Install
    npm install --global @danielblomma/cortex-mcp@latest
    

Overview

The cortex MCP server maps a local repository into searchable entities, relationships, and project rules. It exposes ranked search, relationship lookup, impact traversal, rule retrieval, and RyuGraph reload operations over MCP, while the primary workflow uses the Cortex CLI. Reach for it when a coding agent needs repository-specific context before changing code. Node.js 20.9+, Git, and a local initialization step are required.

Use cases

  • Search a repository for the code handling a feature
  • Trace relationships before refactoring a symbol
  • Estimate the impact of a configuration or SQL change
  • Inspect active repository rules before implementation
  • Review local changes against nearby repository patterns

Key features

  • Ranked semantic context search
  • Graph relationship traversal
  • Configuration, code, and SQL impact analysis
  • Indexed repository rule lookup
  • Automatic refresh through Git hooks and a watcher
  • Optional MCP connection for MCP-required clients

Tools5

What Cortex lets your agent do. Expand a tool for its parameters.

Self-reported~93 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/16 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars19Stargazers on the source repository.
Last commit2mo agoMost recent push to the default branch.
Tools exposed5Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Cortex works

What the cortex MCP server does

The cortex MCP server builds a local map of repository code, symbols, relationships, and project rules. It is designed for coding assistants that need more context than filename or text search provides. The index supports semantic and lexical retrieval, symbol relationships, caller and dependency traversal, impact analysis, active rules, and source-of-truth signals.

Its MCP surface includes five context operations. context.search returns ranked results across indexed entities. context.get_related retrieves graph relationships for an entity. context.impact follows likely impact paths through configuration, code, and SQL from an entity ID or query. context.get_rules lists indexed rules and can include inactive rules. context.reload reloads the RyuGraph connection after maintenance or updates.

The repository also provides CLI commands for pattern evidence, convention profiles, pre-coding guidance, diff review, status checks, diagnostics, and index updates. These commands are separate from the five listed MCP tools and are part of the normal local workflow.

How it works

Cortex stores repository context locally and exposes it through its CLI or, when needed, an MCP connection. Initialization indexes the project, adds Cortex instructions to AGENTS.md, installs Git hooks, and starts a background watcher. The hooks and watcher normally keep the index current, while cortex update can refresh it manually after substantial changes or when results appear stale.

For larger repositories, background bootstrapping makes lexical and graph search available while semantic indexing continues. The project supports this mode on macOS, Linux, and WSL; native Windows should use foreground bootstrapping.

The cortex MCP server is optional for the standard workflow. Agents can run Cortex CLI commands directly, and cortex init adds instructions telling them to search before answering and check impact before refactoring. Use cortex connect only when an MCP-capable client explicitly requires the connection.

Setup and configuration

Install the package globally with Node.js 20.9 or newer and Git available:

Terminal
npm install --global @danielblomma/cortex-mcp
cd your-project
cortex init --bootstrap
cortex doctor

cortex doctor checks the local setup. Useful maintenance commands include cortex status, cortex watch status, and cortex update. Large projects can use cortex bootstrap --background --profile interactive, followed by cortex indexing status --json.

Before implementing a change, use search, related-entity lookup, impact analysis, rules, or the bounded guidance command as appropriate. After coding, cortex review --diff examines staged, unstaged, and non-ignored untracked changes against HEAD. Convention profiles, guidance, and diff review are inspection-oriented local features; guidance is additive context rather than policy authority, so explicit active rules and conflicts still need checking.

The project also documents a DeepSeek Harness V1 integration with four agent-scoped tools and five behavior skills. The separately distributed npm bundle is not currently available, and the planned V2 proactive retrieval is not included in the stated release. Cortex is licensed under MIT.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Cortex

cortex is an MCP server that connects coding agents to a local repository index containing code, symbols, relationships, and project rules. Its main tools search indexed context, fetch related entities, trace likely impact paths across config, code, and SQL, list rules, and reload the RyuGraph connection.

Install it globally with Node.js 20.9 or newer and Git, then run `cortex init --bootstrap` from the repository. The initialization indexes the project, updates `AGENTS.md`, installs Git hooks, and starts the background watcher; `cortex doctor` checks the setup.

Yes, Cortex normally works through its CLI without an MCP connection. Agents can run commands such as `cortex search`, `cortex related`, `cortex impact`, and `cortex rules` directly. Run `cortex connect` only when a client explicitly requires MCP.

Run `cortex update` to refresh changed context manually. Git hooks and the background watcher normally update the index automatically, while `cortex status` and `cortex watch status` show synchronization state.

Yes, large repositories can use background bootstrapping with `cortex bootstrap --background --profile interactive`. Lexical and graph search become available while semantic indexing continues; this mode supports macOS, Linux, and WSL, while native Windows should use foreground bootstrapping.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCortex AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/cortex?style=directory)](https://allmcps.com/mcp/cortex)
HTML Embed
<a href="https://allmcps.com/mcp/cortex"><img src="https://allmcps.com/api/badge/cortex?style=directory" alt="Cortex on AllMCPs" /></a>