← Back to directory
C

Code Context Engine

Community
Index your codebase so AI can search relevant code.
Category
Dev Tools #316 of 751
Stars
★ 472 Popular
Transport
stdio (local process)
Runtime
Python 3.11+
Credentials
No credential needed
License
MIT
Last commit
Tools
11
52FMRS · D

The source describes a local code-indexing and search MCP server with 11 tools, session memory, and configuration for multiple clients. Its reported 94% retrieval-token savings uses full-file reads as the baseline, and the README says real-world savings against ordinary agent exploration will be lower.

Strongest · Setup experience 12/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
10/20
Maintenance
10/20
Documentation
12/20
Setup experience
12/20
Why each score
Reliability 8/20
The README describes 11 MCP tools, stdio transport, indexing and retrieval flows, input validation, several fallbacks, and benchmark methods and results, giving the happy path some detail. Deductions: only the README and manifest were provided, with no server source, CI workflow, or committed tests to verify startup, initialization handshake, tool listing, or agreement between declared and actual behavior; error handling and dependency controls also cannot be checked. The static calibration caps this score at 12.
Security and permissions 10/20
The README claims local processing by default, exclusion of some sensitive files, credential scanning, scrubbing of memory writes, MCP path validation, and configurable remote Ollama use. Deductions: these claims cannot be verified from source, and reviewable implementation details for data boundaries, network behavior, credential storage, tool side effects, and confirmations for dangerous actions are absent. The supplied material contains no explicit evidence of a red-line issue.
Maintenance 10/20
The materials identify an MIT license, named maintainers, package version 0.4.26, a GitHub repository, and an unarchived status; the prompt also reports 22 open issues. Deductions: there is no evidence of commit or release history, issue response, dependency updates, or a security response channel, so maintenance continuity and governance cannot be established. Stars do not affect the score.
Documentation 12/20
The README covers quick installation, client configuration, tool purposes, language support, configuration options, benchmark methods, some limitations, and common commands. It also acknowledges that the 94% benchmark uses full-file reads as its baseline and that real-world savings will be lower. Deductions: per-tool parameter and error documentation, systematic troubleshooting, and verifiable implementation evidence are absent; security and performance claims are primarily README assertions.
Setup experience 12/20
The materials specify Python 3.11+, build dependencies for multiple platforms, uvx/pipx installation commands, and automatic configuration for several common clients; the manifest declares a PyPI package and stdio transport. Deductions: client configuration and auto-discovery are not backed by execution evidence, setup still requires compiler tools and an editor restart, and no verified end-to-end connection evidence is provided. The static calibration caps this score at 15.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesConnects to a database

Best for

  • AI coding users who want a local code index searchable through MCP.
  • Teams using a README-listed editor or agent and able to install Python 3.11+ and the required build tools.
  • Projects that benefit from cross-session decision records and index freshness checks.

Not for

  • Users who need a hosted cloud index or a remotely shared team index; the material describes local indexing.
  • Users who do not want to install a local runtime, build tools, or an embedding model.
  • Users who require a guarantee of exactly 94% token savings in their workflow; that figure uses full-file reads as its baseline, and the README says savings against normal Claude Code exploration will be lower.

Required permissions

  • Needs access to read project files selected for indexing. The README says files such as .env, *.pem, and credentials.json are not indexed and describes credential scanning.
  • Initialization writes MCP configuration and instruction files for the selected client or project; Codex configuration is written to the user-level ~/.codex/config.toml.
  • Stores the index, session memory, and token-savings records locally; the material describes SQLite storage.
  • The local embedding option downloads a model and runs it on CPU; the material also describes using local Ollama.

Risks and side effects

  • The local index and memory contain project context. The material describes filtering selected secrets and scrubbing personal information from memory, but does not establish that every sensitive value will be detected.
  • The 94% retrieval-savings figure is measured against reading all relevant full files, not ordinary agent exploration.
  • Recall@10 varies by benchmark project; README examples range from 0.07 to 1.00.
  • Installing the local extra uses disk space; the README estimates about 189 MB for that install plus an approximately 60 MB embedding-model download.

Setup

Before you start

Runtime:Python 3.11+

Other optional settings (1)
CCE_OLLAMA_URL optional Optional: set this to the URL of an Ollama service, such as `http://nas.local:11434`; you can also set `compression.ollama_url` in `~/.cce/config.yaml`.

The README quick-start command installs and initializes the server with uvx --from "code-context-engine[local]" cce init. For a persistent install, run uv tool install "code-context-engine[local]", enter the project directory, and run cce init. Initialization detects the editor and writes its configuration. Restart the editor to use it. The manifest lists the PyPI package code-context-engine, launched with uvx over stdio.

.mcp.json
{"mcpServers":{"code-context-engine":{"command":"uvx","args":["--from","code-context-engine[local]","cce","serve"]}}}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "code-context-engine": {
      "command": "uvx",
      "args": [
        "--from",
        "code-context-engine[local]",
        "cce",
        "serve"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.code-context-engine]
command = "uvx"
args = ["--from", "code-context-engine[local]", "cce", "serve"]

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add code-context-engine -- uvx --from 'code-context-engine[local]' cce serve

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Confirm that `context_search` and `index_status` appear in your client's MCP tool list. Then ask the client to search for a known function in the codebase and check that it returns relevant code.

Troubleshooting

  1. Check that Python 3.11 or newer is installed and that the required C compiler and CMake are available for your operating system.
  2. Restart the editor after initialization and check that the generated MCP configuration matches the client you use.
  3. For Codex, check the user-level ~/.codex/config.toml; the material says Codex CLI does not read project-level configuration.
  4. For Pi, confirm an MCP adapter extension that consumes .mcp.json is installed; Pi does not support MCP natively.
  5. Check index status; if it is stale, re-index or run the `cce status` CLI command.

Things to try

Once connected, you can ask your AI assistant things like:

  • Search the codebase for code related to the payment flow.
  • Expand the code chunk from the previous search to show its full source.
  • Record the decision to use JWT for authentication.
  • Check the index status and reindex the project if it is stale.

Tools 11

context_search read-only
Searches relevant code with hybrid vector and BM25 retrieval, with optional graph expansion.
expand_chunk read-only
Returns the full source for a compressed search result.
related_context read-only
Finds related code through relationships such as calls and imports.
session_recall read-only
Recalls decisions and context recorded in previous sessions.
session_timeline read-only
Walks session turn summaries to investigate recall results.
session_event read-only
Inspects raw tool input and output for a specific event.
record_decision writes
Saves a decision for use in future sessions.
record_code_area writes
Records the code areas worked on in a session.
Show 3 more tools
index_status read-only
Checks whether the index is up to date.
reindex writes
Re-indexes a file or the full project.
set_output_compression writes
Adjusts response verbosity: off, lite, standard, or max.

Use cases

Search a large codebase for relevant functions, classes, and modules while reducing irrelevant file context sent to a model.
Use a shared project index across supported editors or coding agents.
Record session decisions and code areas for later recall.
Review tool-recorded token savings and cost estimates.

Supported clients

Claude Code
VS Code / GitHub Copilot
Cursor
Gemini CLI
Codex
OpenCode
Tabnine
PiPartial support

Listed from the project's documentation, not tested by this site.

Overview

Code Context Engine (CCE) is a local MCP server that indexes a codebase so AI agents can search relevant code chunks instead of repeatedly reading whole files. It provides hybrid vector and BM25 search, code relationship expansion, cross-session memory, and index management, and tracks token savings. The project reports 94% fewer retrieval tokens than reading relevant full files in its FastAPI benchmark; actual savings depend on usage.

Similar servers

Source revision 75071156e08a Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/code-context-engine.svg)](https://followmcp.com/en/servers/code-context-engine)