# Code Context Engine [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/elara-labs/code-context-engine  
**GitHub Stars:** 472  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/code-context-engine

## Description
Index your codebase. AI searches instead of re-reading files. 94% token savings.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "code-context-engine": {
    "command": "uvx",
    "args": ["code-context-engine"]
  }
}
```

## Documentation

## What Code Context Engine MCP server does

Code Context Engine MCP server creates a searchable index of a project so an AI coding agent can request focused code context rather than repeatedly loading complete files. The project describes a 94% reduction in input tokens in its FastAPI benchmark, but actual savings depend on the repository and query pattern.

The index is intended for local development. It can help agents find functions, trace areas of a codebase, and retain decisions or context between sessions. A local savings display reports query counts, token reductions, and estimated dollar savings. Pricing estimates can account for Anthropic, OpenAI, and Google models.

## How it works

The `cce init` command combines installation, indexing, and client configuration. It detects supported editors or can target a specific agent with an `--agent` option. Configuration is written for the selected project or, for Codex, to the user-level configuration with a project-specific section.

Code Context Engine MCP server uses a local index and does not send the indexed code to a cloud indexing service. Installing the `[local]` extra provides the local embedding setup. If Ollama is already running on its default local address, the package can detect it and use the `nomic-embed-text` model instead.

After setup, an MCP-capable client can use the indexed project through `context_search`. The client then receives narrower results for questions about the codebase instead of needing to reread broad file ranges. Cross-session context and decisions are stored locally for later use.

## Setup and configuration

Python 3.11 or newer is required, along with a C compiler for the tree-sitter grammars.

A quick installation uses:

```bash
uvx --from "code-context-engine[local]" cce init
```

For a persistent installation, use `uv tool install` or `pipx install`, change to the project directory, and run `cce init`. Restart the editor after configuration. The command can write settings for Claude Code, VS Code or Copilot, Cursor, Gemini CLI, Codex, OpenCode, Tabnine, and Pi. Pi requires a separate MCP adapter because it does not support MCP natively.

Pricing settings are stored in `~/.cce/config.yaml`, including the model used for savings estimates. `cce init --plugin` can also generate a portable Agent Plugin directory that launches the package with `uvx`.

## Tools and capabilities

- Indexes a local project for code retrieval.
- Provides the `context_search` capability to query indexed code context.
- Preserves decisions and context across agent sessions.
- Reports retrieval, compression, token, and estimated cost savings.
- Supports local embedding setup and Ollama detection.
- Generates configuration for several supported coding clients.

## Limitations and notes

The tool requires local build dependencies in addition to Python. Its reported savings are estimates based on configured model pricing, while the published 94% figure comes from a specific FastAPI benchmark. Pi needs an adapter extension before it can consume the generated MCP configuration. Codex reads MCP settings from `~/.codex/config.toml`, so its project entries are managed there rather than in a project-local file.

The repository is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/code-context-engine/readme_

