Codeledger MCP Server

Deterministic context selection for AI coding agents. Local memory that compounds across sessions.

Local serverstdioPython

What is the Codeledger MCP server?

Most knowledge and memory work still happens through a UI a human drives. Codeledger MCP server moves it into the conversation instead. Deterministic context selection for AI coding agents. Local memory that compounds across sessions.

The short version

CodeLedger turns every coding action into a persistent, compounding asset.

  • Append-only memory of engineering activity
  • Outcome-linked learning (what worked vs what failed)
  • Cross-agent continuity
  • Deterministic context selection

The tools it exposes

The server publishes 13 tools. What each one is for:

  • query_ledger — Search for verified patterns before coding
  • get_active_context — Get the task-specific context bundle
  • record_interaction — Report outcomes for memory compounding
  • Append — only memory of engineering activity
  • Outcome — linked learning (what worked vs what failed)
  • Cross — agent continuity
  • Remember — Verify
  • Feature — Individual (Free)
  • Hook — When
  • SessionStart — Session opens
  • PreToolUse — Before edit/write
  • PreCompact — Before compression

Getting it running

The server ships on npm as @codeledger/cli, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

How it compares

This sits in the knowledge and memory group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Codeledger's toolset — query_ledger, get_active_context, record_interaction and 10 more — is a fair guide to whether it matches your workflow. It is maintained by codeledgerECF; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 13 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Codeledger.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
query_ledgerSearch for verified patterns before coding
get_active_contextGet the task-specific context bundle
record_interactionReport outcomes for memory compounding
Appendonly memory of engineering activity
Outcomelinked learning (what worked vs what failed)
Crossagent continuity
RememberVerify
FeatureIndividual (Free)
HookWhen
SessionStartSession opens
PreToolUseBefore edit/write
PreCompactBefore compression
StopSession ends

How to install the Codeledger MCP server

{
  "mcpServers": {
    "codeledger": {
      "command": "npx",
      "args": ["-y", "@codeledger/cli"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use Codeledger to query ledger.
  • Use Codeledger to get active context.
  • Use Codeledger to record interaction.

Frequently asked questions

It connects Codeledger to MCP-compatible AI assistants such as Claude and Cursor, exposing 13 tools (query_ledger, get_active_context, record_interaction, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Codeledger directly.