Skip to content

# Claude Code

Claude Code is the primary integration target for CCE. Setup creates MCP configuration, an instruction file, and optional session hooks.

## Quick setup

Section titled “Quick setup”
Terminal window

    cce init --agent claude

This creates or updates the following files in your project root.

## Files created

Section titled “Files created”

### `.mcp.json`

Section titled “.mcp.json”

Registers the CCE MCP server so Claude Code can call tools like `context_search`.

    {  "mcpServers": {    "context-engine": {      "command": "cce",      "args": ["serve"]    }  }}

### `CLAUDE.md`

Section titled “CLAUDE.md”

Contains instructions telling Claude to use `context_search` for code questions instead of reading files directly. The CCE block is wrapped in markers:

    <!-- CCE:BEGIN -->...instructions...<!-- CCE:END -->

You can add your own content above or below the markers. CCE will only update the section between them during upgrades.

## Session hooks

Section titled “Session hooks”

CCE installs a `SessionStart` hook that prints a one-line status summary at the beginning of each Claude Code session:

    CCE v0.4.20 · my-project · 1247 chunks indexed · 68% saved over 42 queriesUSE context_search MCP tool for all code questions. Do NOT use Read/Grep to explore code.

This reminds Claude to use CCE from the very first message.

## Memory hooks

Section titled “Memory hooks”

CCE can optionally install a memory hook that captures architectural decisions and important code areas discovered during a session. These are stored locally and surfaced in subsequent sessions for continuity.

The dashboard’s “Sessions” view shows all captured memories across sessions.

## Git hooks

Section titled “Git hooks”

Three git hooks are installed:

- `post-commit` runs `cce index` to keep the index fresh.
- `post-checkout` runs `cce index` after branch switches.
- `post-merge` runs `cce index` after merges.

Each hook contains a CCE marker comment so `cce uninstall` can cleanly remove them.