Skip to main content
MCP server CX Codex

Code Context Engine — Claude Code MCP server: index your repo

A local index of your codebase so the agent searches it instead of re-reading files. Cuts input tokens on long sessions.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add code-context-engine -- uvx code-context-engine
Open on GitHub

What Code Context Engine does

Code Context Engine indexes your project and lets the agent query that index rather than pulling whole files into context. Everything runs locally — no cloud indexing. The claimed saving is 94% of input tokens, and it comes from a benchmark rather than a guess.

Setup is one command: uvx --from "code-context-engine[local]" cce init installs, indexes and configures in one shot. cce init detects your editor and writes the right config — .mcp.json plus CLAUDE.md for Claude, .cursor/mcp.json plus .cursorrules for Cursor. Several editors in one project all get configured in a single run. You need Python 3.11+ and a C compiler for the tree-sitter grammars: xcode-select --install on macOS, build-essential and cmake on Ubuntu. Without the compiler the install fails.

Already running Ollama? Skip the [local] extra and use uv tool install code-context-engine; the server finds Ollama at localhost:11434 and uses nomic-embed-text. There is also cce init --plugin, which generates a portable Agent Plugin directory for VS Code, Cursor, Copilot, Codex, ChatGPT and Claude, launching CCE through uvx on demand.

What it helps with

  • stop paying to re-read the same files every session
  • keep a project index on your machine instead of a cloud service
  • configure one index for Claude, Cursor and VS Code at once
  • carry decisions and context across agent restarts
  • measure token spend in dollars instead of estimating it

Example prompts for the agent

  • Search the index for where auth is handled and show me those files
  • What did we decide about the cache schema last session?
  • Index this project and set up the MCP server for Claude

How to install Code Context Engine

Platform CLI

claude mcp add code-context-engine -- uvx code-context-engine

uvx runs the command named after the package; if the README names another one, use uvx --from code-context-engine <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Code Context Engine

How do I install Code Context Engine in Claude Code?

Run claude mcp add code-context-engine -- uvx code-context-engine, then restart your editor. For indexing and config writing, cce init does both.

What does Code Context Engine do?

It builds a local index of your codebase so the agent searches it instead of re-reading files. The authors report 94% savings on input tokens.

What do I need before installing?

Python 3.11+ and a C compiler for the tree-sitter grammars. If Ollama is already running, you can skip the local extra — CCE finds it at localhost:11434.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor