# codeledger

Scans a repository, picks the files a task needs and writes a context bundle your agent reads before it starts.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 8
- Author: codeledgerECF
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codeledgerECF/codeledger
- Updated: 2026-10-13
- HTML: https://affpapa.org/en/nevibecode/mcp/codeledger

## What it does

CodeLedger handles context selection for coding agents, and it runs locally. It walks the repo, weighs signals such as dependency structure, churn, tests and task keywords, then ranks files and packs a bounded set into `.codeledger/active-bundle.md`. That artifact is what the agent opens first. Feed it the same task against the same repo state and you get the same ranking.

Once the work is done, receipts and session summaries show what changed and whether the chosen context helped. Checkpoints, mid-session refinement and handoff commands keep a long session from falling apart. Source analysis stays on your machine by default, and the local CLI flow needs no account. Installing or updating may pull packages from npm and artifacts from GitHub Releases.

Node.js is required, since the CLI installs globally through npm. The wrapper, scanner, reports and hooks are MIT-licensed; the hardened runtime with the scoring engine and selection algorithm ships under `LICENSE-CORE`.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add codeledger -- npx -y @codeledger/cli
```

### Codex

**Platform CLI**
```bash
codex mcp add codeledger -- npx -y @codeledger/cli
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "codeledger": {
            "command": "npx",
            "args": [
                "-y",
                "@codeledger/cli"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "codeledger": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@codeledger/cli"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add codeledger npx -y @codeledger/cli
```

## When to use it
- pick the files a task needs before the agent starts
- record what an agent changed during a session
- resume work from a checkpoint after a session drops
- check whether the selected context actually helped
- spot conflicts when several agents touch one repo

## Example prompts
- Run `codeledger ready --task "Fix null handling in user service"` and start from the bundle
- Check the install with `codeledger doctor`
- Bring up the MCP server: `codeledger mcp start`

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
