diffctx

nikolay-e/diffctx
★ 2 stars Rust AI/LLM Updated today
Smart git diff context for LLMs and AI agents — selects the minimal code fragments needed to understand a change, under a token budget. Deterministic, local, MCP server included. Also exports a full codebase to YAML/JSON/MD.
View on GitHub → 🔍 Audit Wallet Slippage →

Quick Install

Copy the config for your editor. Some servers may need additional setup — check the README.

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "diffctx": {
      "command": "cargo",
      "args": [
        "run",
        "--",
        "diffctx"
      ]
    }
  }
}

README Excerpt

**diffctx selects the minimum code an LLM needs to review a git diff.** Instead of pasting whole files, it walks the dependency graph outward from the changed lines and stops once more context stops paying for itself. > Formerly published as `treemapper` — every command, flag, and API call works unchanged.

Tools (2)

egopack

Topics

ai-agentsanthropicclaudeclicode-contextcode-reviewcode-to-promptcontext-engineeringcontext-windowdeveloper-toolsdiff-contextgit-diffllmllm-contextmcp