CodeCortex logo

CodeCortex

by rushikeshmore

Precomputes codebase structure, dependencies, symbols, coupling, and risks for AI coding agents through MCP.

Install CodeCortex

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

Setup steps from the project

rushikeshmore/CodeCortex 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 -g codecortex-ai --legacy-peer-deps
    
  2. 2. Configure
    codecortex init
    
  3. 3. Add to Claude Code
    claude mcp add codecortex -- codecortex serve
    

Overview

rushikeshmore/CodeCortex MCP server precomputes codebase knowledge and exposes architecture, dependencies, symbols, coupling, and edit-risk context through MCP. It uses tree-sitter for structural extraction and Git history for temporal analysis, then stores results in `.codecortex/` files and can inject context into agent configuration files. Reach for it when an agent needs project orientation, symbol lookup, dependency analysis, or warnings about files that change together before editing. It runs as a Node-based stdio server and is documented for Claude Code, Cursor, Codex, and other MCP clients.

Use cases

  • Inspect project architecture before starting a coding task
  • Trace imports and exports for a module or file
  • Find symbols by kind and path
  • Review hidden coupling before editing files
  • Refresh codebase knowledge after commits

Key features

  • Tree-sitter-based symbol and dependency extraction
  • Git co-change and hotspot analysis
  • Five MCP tools for codebase navigation and edit risk
  • Inline context injection into agent configuration files
  • MCP resources and prompts for project knowledge
  • Size-adaptive responses capped at 10,000 characters

Tools5

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

Self-reported~98 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.

13/17 checks healthy over the last 112d

Adoption & maintenance

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

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

How CodeCortex works

What rushikeshmore/CodeCortex MCP server does

rushikeshmore/CodeCortex builds a persistent knowledge layer for a local codebase before an AI coding session begins. Its generated data covers project structure, modules, entry points, symbols, imports, calls, Git-based co-change patterns, hotspots, bug history, architectural decisions, coding patterns, and session changes.

The project stores this information in .codecortex/ as files such as graph.json, symbols.json, temporal.json, module documentation, and risk summaries. It can also write an inline knowledge section to files such as CLAUDE.md, .cursorrules, and .windsurfrules, when those files are present.

How it works

Structural extraction uses native tree-sitter parsing, while semantic analysis uses the host LLM. Git history supplies temporal information such as files that repeatedly change together despite having no direct imports.

Run codecortex init to discover the project, extract symbols, and analyze history. codecortex update refreshes changed files and affected modules. Git hooks can run updates automatically after commits. The server adapts response detail to project size and caps each MCP tool response at 10,000 characters.

Tools and capabilities

The MCP interface provides five tools:

  • get_project_overview returns architecture, modules, and a risk map.
  • get_dependency_graph returns import and export relationships, with module or file filters.
  • lookup_symbol searches the symbol index with kind and file path filters.
  • get_change_coupling identifies files that commonly change together and flags hidden dependencies.
  • get_edit_briefing summarizes co-change warnings, hidden dependencies, and bug history before an edit.

Three MCP resources expose project overview, hotspots, and module documentation. Two prompts, start_session and before_editing, provide session context and file-specific editing risk information.

Setup and configuration

rushikeshmore/CodeCortex requires Node 20 or Node 22; Node 24 is not supported because of tree-sitter native binding compatibility. Install the package globally with npm install -g codecortex-ai --legacy-peer-deps, move into the target project, and run codecortex init.

Start the stdio MCP server with codecortex serve. Claude Code can register it with claude mcp add codecortex -- codecortex serve. Cursor uses a .cursor/mcp.json entry with command set to codecortex, args set to ["serve"], and cwd set to the project directory. Run codecortex inject to regenerate inline context.

Limitations and notes

The server depends on a local prebuilt knowledge store, so projects must be initialized before the MCP tools can provide project-specific results. Node 24 is explicitly unsupported. The README identifies the transport as stdio and does not describe environment variables or remote deployment configuration. The current README documents five MCP tools, despite broader listing text referring to a larger tool count.

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 CodeCortex

rushikeshmore/CodeCortex is an MCP server that connects AI coding agents to a precomputed local codebase knowledge store. Its main tools provide project overviews, dependency graphs, symbol lookup, change-coupling analysis, and pre-edit briefings. It uses tree-sitter extraction and Git history to expose architecture and risk context.

Install it globally with `npm install -g codecortex-ai --legacy-peer-deps` using Node 20 or 22. Then enter the target project, run `codecortex init`, and start the MCP server with `codecortex serve`.

Yes, rushikeshmore/CodeCortex works with Cursor through `.cursor/mcp.json`. Configure the server with `command` set to `codecortex`, `args` set to `["serve"]`, and `cwd` set to the project directory.

Run `codecortex update` to re-extract changed files and update affected modules. You can also install a Git hook so updates run automatically on commits, and use `codecortex status` to inspect freshness.

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 PreviewCodeCortex AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/rushikeshmore-codecortex?style=directory)](https://allmcps.com/mcp/rushikeshmore-codecortex)
HTML Embed
<a href="https://allmcps.com/mcp/rushikeshmore-codecortex"><img src="https://allmcps.com/api/badge/rushikeshmore-codecortex?style=directory" alt="CodeCortex on AllMCPs" /></a>