PluginBench
MCP Server
Active

io.github.codeledgerECF/codeledger MCP Server

io.github.codeledgerECF/codeledger

Deterministic context selection for AI coding agents with local memory across sessions.

What is the io.github.codeledgerECF/codeledger MCP server?

CodeLedger is a local-first context control system for AI coding agents that scans repositories, selects task-relevant files, and generates evidence-backed context bundles before agents begin work. It works with Claude Code, Cursor, GitHub Copilot, and other CLI or MCP-compatible coding agents to improve task focus and reduce token usage.

CodeLedger helps AI coding agents work more efficiently by providing them with the right repository context upfront. It scans your codebase, ranks files by relevance to a specific task, and creates a bounded context bundle that agents read first. This reduces iterations, token usage, and files changed while improving test pass rates. The system runs locally by default with no telemetry, and includes verification tools to track what changed and whether the selected context was useful.

How to install io.github.codeledgerECF/codeledger

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "codeledger": {
      "command": "npx",
      "args": [
        "-y",
        "@codeledger/cli",
        "mcp",
        "start"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • codeledger ready — Initializes repo and creates a task-specific context bundle at .codeledger/active-bundle.md for the agent to read
  • codeledger activate — Activates a task within an initialized repo with optional task description
  • codeledger compare — Benchmarks CodeLedger performance against a baseline scenario with guided measurement
  • codeledger doctor — Checks local install health, hooks, config, index, and ledger status
  • codeledger mcp start/status — Starts and monitors the MCP server for supported feature tiers
  • codeledger about — Displays information about CodeLedger behavior and evidence
  • Session management — Provides session summaries, checkpoints, mid-session refinement, and handoff/recovery commands

Use cases

  • Prepare bounded, task-relevant file context before starting an AI coding task to improve agent focus and reduce token usage
  • Benchmark AI agent performance on your repository with and without CodeLedger context selection
  • Verify what files changed and whether the selected context was useful through receipts and audit exports
  • Detect and prevent multi-agent conflicts and scope drift with intent governance and loop detection
  • Integrate CodeLedger context selection into Cursor, GitHub Copilot, Claude Code, or other coding agents via MCP or markdown bundles

io.github.codeledgerECF/codeledger MCP server FAQ

What does CodeLedger do?

CodeLedger scans your repository, identifies task-relevant files using deterministic local signals (dependencies, churn, tests, keywords), and creates a bounded context bundle that AI coding agents read before starting work. This improves agent accuracy, reduces iterations, and lowers token usage.

Is CodeLedger free?

Yes. The public wrapper, CLI, repo scanner, and harness are MIT-licensed. The downloaded hardened binary is covered by the CodeLedger Core License. No account or telemetry is required for the local CLI flow.

How do I install CodeLedger in Cursor or Claude?

Install via npm: `npm install -g @codeledger/cli`. Then run `codeledger ready --task "your task"` in your project. Your agent reads the generated `.codeledger/active-bundle.md` file, or use the MCP server with `codeledger mcp start` for supported tiers.

Does CodeLedger send my source code anywhere?

No. Runtime analysis runs locally by default and makes zero source-code telemetry calls by default. Your source code is not required to leave your machine for the local CLI flow.

What agents does CodeLedger work with?

CodeLedger works with Claude Code, Cursor, GitHub Copilot, Gemini CLI, Aider, Windsurf, and other CLI or MCP-compatible coding agents. It provides context via markdown bundles or the MCP server.

How much does CodeLedger improve performance?

Example benchmark on a mid-sized Node.js service showed 16% more tests passed, 50% fewer iterations, 47% fewer files changed, 41% faster completion, and 36% lower token usage. Results vary by repository, task, and agent—measure on your own codebase.

README (reference)

Source of truth, from the repository.

CodeLedger

Give AI coding agents the right repo context before they start - then verify what changed.

CodeLedger is local-first context control for AI coding agents. It scans a repository, selects a bounded task-relevant set of files, and writes an evidence-backed context bundle before the agent begins work.

Works with Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and other CLI or MCP-compatible coding agents.

Try It

npm install -g @codeledger/cli
cd your-project
codeledger ready --task "Fix null handling in user service"

CodeLedger initializes the repo if needed, refreshes the index, and creates the task-specific bundle at .codeledger/active-bundle.md. Your agent reads that artifact first so it starts with the files most relevant to the task.

Runtime analysis is local by default. Installing or updating may fetch packages or release artifacts from npm and GitHub Releases; CodeLedger runtime analysis does not send your source code through CodeLedger telemetry by default.

CodeLedger task flow

Example Benchmark

Example result from a mid-sized Node.js service. Results vary by repository, task, agent, and scenario.

MetricWithout CodeLedgerWith CodeLedgerChange
Tests Passed78%94%+16%
Iterations42-50%
Files Changed179-47%
Time to Finish6m 12s3m 40s-41%
Token Usage28k18k-36%

Do not take the benchmark on faith - measure CodeLedger on your own repo:

codeledger compare \
  --scenario .codeledger/harness/scenarios/auth-rate-limit.json \
  --guided

If CodeLedger improves your coding-agent workflow, star the repo to follow releases and help other developers discover it.

Start Here

How It Works

  1. CodeLedger scans the repo for deterministic local signals such as dependency structure, churn, tests, contracts, and task keywords.
  2. It ranks and packs a bounded set of task-relevant files.
  3. It writes .codeledger/active-bundle.md for your coding agent.
  4. After work, verification, receipts, and session summaries help show what changed and whether the selected context was useful.

Same task plus same repo state produces the same file ranking behavior.

Core Capabilities

  • Give agents the right context: deterministic file selection, scope inference, bounded budgets, blast-radius hints, and co-change context.
  • Keep work continuous: session summaries, checkpoints, mid-session refine, and handoff/recovery commands.
  • Keep agents inside the task: scope contracts, intent governance, loop detection, and multi-agent conflict checks.
  • Prove what happened: review intelligence, receipts, provenance, audit exports, and release evidence.

For the full command surface, see the CLI Reference.

Agent Integration

Claude Code can use CodeLedger hooks after codeledger ready initializes the repo. Cursor, Codex, GitHub Copilot, Gemini CLI, Aider, Windsurf, and other agents can read CLAUDE.md plus .codeledger/active-bundle.md, or use the repo-local wrappers when available.

CodeLedger also includes an MCP server for supported tiers:

codeledger mcp start
codeledger mcp status

See MCP Server and Feature Tiers for setup and tier details.

Trust And Verification

  • Runtime source analysis runs locally by default.
  • Source code is not sent through CodeLedger telemetry by default.
  • No account is required for the local CLI flow.
  • Public releases include SHA256SUMS and release-evidence artifacts.
  • codeledger doctor checks the local install, hooks, config, index, and ledger health.
  • The public wrapper, docs, harness, and scanning surface are inspectable in this repo; the protected hardened runtime is covered by LICENSE-CORE.

Install

npm install -g @codeledger/cli
codeledger --version

Or use the release zip:

  1. Download the latest release.
  2. Extract it.
  3. Run install.sh.

The installer uses the bundled package from the zip, so the installed wrapper version matches the release. The wrapper then fetches the matching hardened binary from the GitHub release unless your environment already provides it.

Everyday Flow

cd your-project
codeledger ready
codeledger ready --task "Fix null handling in user service"

Inside an initialized repo, you can also use:

codeledger activate --task "Fix null handling in user service"
codeledger doctor

Browser, cloud, and sandboxed environments can use the repo-local runtime deployed under .codeledger/bin/ after initialization or vendoring.

Architecture

CodeLedger has an open public surface and a protected hardened runtime:

PUBLIC:    CLI wrapper, types, repo scanner, harness, reports, docs, hooks
PROTECTED: Scoring engine, selection algorithm, confidence internals

Use codeledger about, codeledger doctor, and command-specific --explain output to inspect behavior and evidence without exposing protected implementation internals.

Privacy

  • Installation may use npm and GitHub Releases.
  • Runtime analysis runs on your local machine by default.
  • Runtime analysis makes zero source-code telemetry calls by default.
  • Your source code is not required to leave your machine for the local CLI flow.
  • Uninstall at any time.

License

  • Public wrapper, types, repo scanning, harness, reports, docs, and examples: MIT
  • Downloaded hardened binary: CodeLedger Core License

GitHub may classify the combined licensing structure as "Other" because the repo includes both MIT-covered public files and separately licensed protected runtime terms. Changing the license files should be a human legal decision.

Part Of ContextECF

CodeLedger applies Intelligent Context AI's context-control architecture to software engineering. For enterprise-wide governed context across applications and agents, see ContextECF.

CodeLedger is produced by Intelligent Context AI, Inc. See codeledger.dev.

Related MCP servers

Headless Eclipse MAT MCP server for analyzing Java heap dumps with OQL queries and 56+ built-in analysis commands.

21
TypeScript
Apache-2.0
View repository →
AIAI-ERD logo

AI-ERD

Maintained

AI-ERD MCP connector for workspace, document, ERD, diagram, task, and attachment workflows.

0
TypeScript
View repository →
KIKiln logo

Kiln

Active

AI-native MCP server for designing, slicing, printing, and monitoring 3D printers end-to-end.

24
Python
AGPL-3.0
View repository →
PRProcm logo

Procm

Maintained

A Model Context Protocol (MCP) server for process management.

3
JavaScript
View repository →
COCoder logo

Coder

Active

Manage Coder workspaces, templates, and cloud development environments via MCP.

14k
Go
AGPL-3.0
View repository →

Signed, offline-verifiable contract-change authorization. Only a granted change can proceed.

0
View repository →