Skip to content
MCP server

CodeCortex Context Engine

Open-source context engine that maps a repository for AI coding agents

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted, Linux
Runs
Locally
Version
0.1.0a10
Listing updated
1 day ago

About CodeCortex Context Engine

CodeCortex Context Engine is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

CodeCortex indexes a repository and answers an agent's questions with ranked evidence instead of raw files. It covers symbols and references, dependencies, call relationships, Git and PR history, ownership and architecture, and trims results to a context budget with provenance.

Before an edit, an agent can check reverse dependencies and affected tests. Edits go through guarded semantic and structural rewrite flows that preview before applying. Project and team memory persists across chats, and workspaces can span several repositories.

Install the PyPI package (Python 3.11 to 3.13), run cortex init, index and doctor, then start the MCP server with cortex mcp. A configurator writes merge-safe settings for Claude Code, Codex, Cursor, Gemini CLI and OpenCode while leaving user-owned entries alone. The README cites committed hardening figures, such as 711 passing tests, and calls them measurements rather than performance promises.

Install

Run in a terminal

claude mcp add codecortex-context-engine -- uvx codecortex-context-engine

Add to claude_desktop_config.json

{
  "mcpServers": {
    "codecortex-context-engine": {
      "command": "uvx",
      "args": [
        "codecortex-context-engine"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "codecortex-context-engine": {
      "command": "uvx",
      "args": [
        "codecortex-context-engine"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "codecortex-context-engine": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "codecortex-context-engine"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "codecortex-context-engine": {
      "command": "uvx",
      "args": [
        "codecortex-context-engine"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "codecortex-context-engine": {
      "command": "uvx",
      "args": [
        "codecortex-context-engine"
      ]
    }
  }
}

What it does

Repository map
Symbols, definitions, references and call relationships.
Hybrid retrieval
Lexical, semantic, structural, graph, Git and memory signals ranked together.
Impact analysis
Reverse dependencies, affected tests and ownership before an edit.
Guarded edits
Semantic edits and structural rewrite previews with review steps.
Persistent memory
Project and team memory plus multi-repo workspace search.
Agent configurator
Merge-safe setup for five coding agents.

Good for

  • Check what an edit to a class could break
  • Give an agent a task-specific slice of a large repo
  • Search code by meaning, such as authentication flows
  • Keep project knowledge between agent sessions

Pricing

Open source

Open source; install from PyPI

Prices change. Check behnamjalalico.github.io before you buy.

CodeCortex Context Engine FAQ

What Python versions work?

Python 3.11 to 3.13.

Which agents can it configure?

Claude Code, Codex, Cursor, Gemini CLI and OpenCode.

Is it open source?

Yes, the project describes itself as open source and publishes a license file.

How do I start the MCP server?

Run cortex mcp --path . after initialising and indexing.

Is CodeCortex Context Engine free?

Yes. CodeCortex Context Engine is open source, so you can use and self-host it for free.

How do I add CodeCortex Context Engine to Claude Code?

Run this command in your terminal: claude mcp add codecortex-context-engine -- uvx codecortex-context-engine

What are the best alternatives to CodeCortex Context Engine?

The closest alternatives to CodeCortex Context Engine are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to CodeCortex Context Engine

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools