Skip to content

Code Context Engine

Save 94% on AI coding tokens. Index your codebase, agents search instead of reading files. Works with Claude Code, Codex, Copilot, Cursor, Gemini CLI. Local MCP server, free…

Install: pip install code-context-engine

Works with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot · 452 GitHub stars

Install

$pip install code-context-engine

Install command taken from the project's README or registry entry. Always review code before running it.

Code Context Engine

Index your codebase. AI searches instead of re-reading files.94% token savings, reproducibly benchmarked.

Website · Docs · Why CCE? · Benchmark · GitHub

Python 3.11+ · macOS · Linux · Windows

             

One command. Auto-detects your editor. Zero cloud, zero config.

Talk: We Cut 94% of Our AI Coding Tokens — AI Engineer World's Fair 2026


Use cases

Use case How CCE helps
💰 Reduce Claude Code costs 94% fewer input tokens per session
🔒 Keep code private Everything local, no cloud indexing
🔄 Multi-editor teams One index across Claude Code, Cursor, VS Code, Gemini CLI
🧠 Cross-session memory Decisions and context survive restarts
⚡ Faster responses Less context = faster Claude replies
📊 Track actual savings Dollar amounts, not estimates

Quick start

One command. 30 seconds.

uvx --from "code-context-engine[local]" cce init    # install + index + configure, one shot

Or if you prefer a persistent install:

uv tool install "code-context-engine[local]"    # or: pipx install "code-context-engine[local]"
cd /path/to/your/project
cce init

Restart your editor. Done. Every question now hits the index instead of re-reading files.

Agent Plugin support: Run cce init --plugin to generate a portable Agent Plugin directory that works with VS Code, Cursor, Copilot, Codex, ChatGPT, and Kiro. The plugin uses uvx to launch CCE on demand, so users don't need to pre-install the Python package. See Agent Plugin below.

Already have Ollama? Skip [local] and use uv tool install code-context-engine instead. CCE auto-detects Ollama at localhost:11434 and uses nomic-embed-text.

System requirements

Python 3.11+ and a C compiler (for tree-sitter grammars).

Platform Setup
macOS xcode-select --install
Ubuntu/Debian sudo apt install build-essential cmake
Fedora/RHEL sudo dnf install gcc gcc-c++ cmake
Windows Visual Studio Build Tools (C++ workload) + CMake

Tested on macOS, Linux, Windows with Python 3.11/3.12/3.13.

cce init auto-detects your editor and writes the right config. To target a specific agent, use --agent claude, --agent codex, --agent copilot, --agent pi, or --agent all.

Editor Config written Instructions
Claude Code .mcp.json CLAUDE.md
VS Code / Copilot .vscode/mcp.json .github/copilot-instructions.md
Cursor .cursor/mcp.json .cursorrules
Gemini CLI .gemini/settings.json GEMINI.md
OpenAI Codex ~/.codex/config.toml (user-global, per-project section) AGENTS.md
OpenCode opencode.json
Tabnine .tabnine/agent/settings.json TABNINE.md
Pi .mcp.json AGENTS.md

Multiple editors in the same project? All get configured in one command.

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Explore related