Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Transports: stdio vs HTTP
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI โ†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE โ†— (opens in a new tab)
  • llms.txt โ†— (opens in a new tab)
  • Catalog JSON โ†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub โ†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
ยฉ 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. ๐Ÿ”„ Version Control
  3. Diffctx
Diffctx logo
Health: ActiveRecent health check succeeded.Last checked 9/21/2026, 2:32:57 AM

Diffctx

User RatingsBe the first to rate and review this MCP server!
View Repository4 GitHub StarsTotal stargazers on GitHub for the source repository (4 stars).Visit Website
version-controlcode-reviewdiffcontext-selectionmcp

Selects minimal code context for an LLM to review a git diff using graph-based fragment selection under a token budget.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
We couldnโ€™t automatically confirm this listing starts correctly

We ran the install command below but it didn't respond within our test window โ€” this can mean a slow first-time install rather than a real problem.

uvx diffctx

No response to initialize.

This is an experimental automated check and can have false negatives โ€” missing environment variables, a slow cold install, etc. It doesnโ€™t necessarily mean somethingโ€™s wrong. Last checked 4d ago.

Manual Client & Custom JSON ConfigExpand JSON โ–พ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "nikolay-e-diffctx": {
      "command": "uvx",
      "args": [
        "diffctx"
      ]
    }
  }
}

๐Ÿ’ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Directory Badge Claim listing Alternatives๐Ÿ”„ More in Version Control

Overview

This server provides a deterministic, local method to extract the minimal relevant code fragments an LLM needs to understand a git diff. It builds a code dependency graph from changed lines and expands outward until a token budget or relevance threshold is met, supporting over 30 languages. Use it when you want to optimize context size for AI-assisted code review without indexing or external model calls.

Use cases

โ€ขGenerate minimal code context for LLM-based code review
โ€ขExtract relevant code fragments around git diffs under token limits
โ€ขAnalyze impact of uncommitted or recent changes for AI tools
โ€ขExplore code dependency graphs related to changes
โ€ขProduce Markdown or JSON summaries of diff context

Key features

โ€ขGraph-based fragment selection seeded on git diffs
โ€ขSupports 30+ programming languages and file types
โ€ขConfigurable token budget and relevance thresholds
โ€ขMultiple scoring methods including ego, PPR, BM25, and RRF
โ€ขOutputs in formats like Markdown, JSON, and raw unified diff
โ€ขIncludes an MCP server mode for AI assistant integration

Capabilities & Tool Schemas

Inspect callable tools, capabilities, and parameters exposed to AI agents by Diffctx.

Extracted Tool Capabilities
Graph-based fragment selection seeded on git diffs
Supports 30+ programming languages and file types
Configurable token budget and relevance thresholds
Multiple scoring methods including ego, PPR, BM25, and RRF
Outputs in formats like Markdown, JSON, and raw unified diff
Includes an MCP server mode for AI assistant integration

Documentation Overview

diffctx โ€” smart diff context for LLM code review

CI PyPI crates.io npm License

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.

How it compares

Whole-repo packers (repomix and friends) seed on the repository and export everything; persistent code-graph servers answer structural queries against a maintained index. diffctx is diff-seeded: the input is a change, the output is the fragments needed to understand it, packed under a hard token budget โ€” local, deterministic, no index, no model calls. Measured results and when the other two families fit better: COMPARISON.md.

Install

bash
uvx diffctx . --diff HEAD~1             # zero-install, run once via uv
pipx install diffctx                    # recommended: isolated CLI, no venv needed
pip install diffctx                     # or: into an active environment
pipx install 'diffctx[mcp]'             # + MCP server for AI assistants

Without Python:

bash
cargo install diffctx                   # native CLI from crates.io
npx diffctx . --diff HEAD~1             # npm wrapper over the native binary
docker run --rm -v "$PWD:/repo" ghcr.io/nikolay-e/diffctx . --diff HEAD~1

On Windows, via Scoop (this repository is the bucket):

powershell
scoop bucket add diffctx https://github.com/nikolay-e/diffctx
scoop install diffctx/diffctx

Prebuilt binaries for Linux (x86_64/aarch64), macOS (arm64/x86_64) and Windows (x64/arm64) are attached to every release. On Windows on ARM, diffctx[mcp] builds cryptography from source, which needs OpenSSL: that project publishes no wheel for the platform. The native binary and Docker image cover diff mode with YAML/JSON output and write to stdout (redirect to capture); tree mode, Markdown output, the graph subcommand and the MCP server live in the Python package.

Quick start

server.ts
diffctx . --diff HEAD~1       # smart context for last commit โ†’ paste into Claude/ChatGPT
diffctx . -f md -c            # full codebase export โ†’ clipboard in Markdown

diffctx demo

diffctx . --diff HEAD~1 selects only the fragments an LLM needs to review the last commit, instead of dumping every changed file in full.

Diff context mode

Finds the minimal set of fragments needed to understand a change โ€” imports, callers, type definitions, config dependencies โ€” across 50+ file types. It builds a code graph (imports, co-changes, type refs), propagates relevance outward from the changed lines, and stops when relevance drops below --tau or the --budget token cap is hit.

--diff takes a git range (HEAD~1..HEAD, main..feature) or a duration window ending now โ€” 24h, 8d, 90min, 1h30m, 2w (units s, m/min, h, d, w, composable). A window diffs the working tree against the last commit before it, so it covers the commits made inside the window plus the uncommitted and untracked work on top โ€” diffctx . --diff 24h is "everything I touched today". A ref that happens to look like a duration (a branch 24h) keeps its git meaning.

FlagDefaultDescription
--scoringegoego = bounded expansion around changed nodes (fast, predictable radius); ppr = Personalized PageRank (global, smoother decay, slower); bm25 = lexical retrieval against the diff hunks (baseline for sparse graphs); rrf = reciprocal-rank fusion of ego and bm25 (widest recall, no scale calibration between the two signals); pit = the same fusion on score percentiles
--budgetautoCap in o200k_base tokens on the whole rendered artifact (see Token counting): every changed file gets one witness first, relevance fills the rest, and the renderer drops context from the tail until the document fits. A budget smaller than the summary yields the summary alone. N = fixed cap, -1 disables it, 0 is a strict-zero floor (no fragments; use --full for changed files only)
--alpha0.60PPR continuation probability: higher = relevance travels further from the change, lower = tighter around it (--scoring ppr only)
--tau0.05Relevance threshold for full fragment content; lower-scoring fragments are stubbed or dropped (lower = more context)
--fullfalseOnly the changed files, every fragment, no related-code context
--timeout300Wall-clock deadline in seconds; on expiry the run stops cooperatively and emits a partial artifact whose coverage block names the limit (exit 0). 124 is the watchdog behind it, 30 s later, for a phase that could not stop
--with-raw-difffalseAlso embed git's raw unified diff ahead of the selected fragments โ€” additive (selection unchanged), not charged to --budget, lock/ignored/secret-like sections omitted. Python CLI only
--modepacklocate emits the same ranked selection as compact diffctx.locate.v1 JSON โ€” path, lines, score, provenance reasons, a blast-radius summary and per-item impact group (test/type/config), NO source bodies. Adds a coverage block naming what the run could not see (unparsed_files, zero_edge_files, ppr_truncated, next_up, a heuristic confidence) and an overflow ranking of what the budget left behind โ€” omitted entirely when there is nothing to disclose. diffctx . --diff --mode locate = impact of your uncommitted change. The MCP tool takes it as mode="locate"

Every JSON/YAML artifact opens with schema: diffctx.context.v1 and validates against schemas/diffctx.context.v1.json, generated from the engine's own type; it closes with a provenance block (engine version, input object ids, the effective configuration and its hash, the selection parameters, the tokenizer) and, when a limit stopped the run short, a coverage block naming it.

graph subcommand

Explore the underlying dependency graph directly, without a diff:

bash
diffctx graph .                                  # Mermaid graph of directory deps (default)
diffctx graph . --summary                        # cycles, hotspots, coupling metrics
diffctx graph . --level fragment -f json         # fragment-level graph as JSON
diffctx graph . --level file -f graphml -o g.xml # file-level graph as GraphML

Usage

bash
# full codebase export:
diffctx .                                 # Markdown to stdout + token count
diffctx . -f md -c                        # Markdown โ†’ clipboard
diffctx . -f json -o tree.json            # JSON โ†’ file
diffctx . --no-content                    # structure only, no file contents
diffctx . --max-depth 3                   # limit depth
diffctx . -i custom.ignore                # custom ignore patterns

# diff context mode (requires git repo):
diffctx . --diff                          # uncommitted changes (working tree vs HEAD)
diffctx . --diff HEAD~1                   # context for last commit
diffctx . --diff main..feature            # context for feature branch
diffctx . --diff 24h                      # everything changed in the last 24 hours
diffctx . --diff 8d                       # same over 8 days (also 90s, 10min, 1h30m, 2w)
diffctx . --diff HEAD~1 --budget 30000    # limit to ~30k tokens
diffctx . --diff HEAD~1 -c                # diff context to clipboard
diffctx . --diff HEAD~1 --with-raw-diff   # raw patch + selected context
diffctx . --diff HEAD~1 --mode locate     # ranked navigation JSON, no source

Every run reports token count and size on stderr โ€” 12,847 tokens (o200k_base), 52.3 KB. Counts are exact only for the GPT-4o family; Claude, Gemini and others tokenize differently, so treat --budget as an upper bound and leave headroom (details). Unreadable files become placeholders like <binary file: N bytes>.

Python API

server.ts
from pathlib import Path
from diffctx import build_diff_context, map_directory, to_json, to_markdown, to_text, to_yaml

ctx = build_diff_context(
    Path("."),
    "HEAD~1..HEAD",
    budget_tokens=None,       # None = auto; 0 = no fragments; -1 = uncapped; N = cap on the whole artifact
    alpha=0.6,
    tau=0.05,
    full=False,
    scoring_mode="ego",
    timeout=300,
    with_raw_diff=False,      # True also embeds the raw unified diff (not charged to budget)
)
print(to_markdown(ctx))

tree = map_directory(
    ".",
    max_depth=None,
    no_content=False,
    max_file_bytes=None,
    ignore_file=None,
    no_default_ignores=False,
    whitelist_file=None,
)
print(to_yaml(tree))

MCP server

MCP Registry diffctx MCP server

Read the full README โ†’View source on GitHub โ†’

Related MCP Servers

View all in Version Control View all alternatives
  • Github MCP Server logoGithub MCP Server
    Verified

    Official GitHub server for integration with repository management, PRs, issues, and more.

    ๐Ÿ”„ Version Control6 views
    Compare vs Github MCP Server โ†’
  • Atlassian MCP Server logoAtlassian MCP Server
    Verified

    Official remote MCP server for Atlassian. Securely connect Jira, Confluence, Jira Service Management, Bitbucket, and Compass to Claude, ChatGPT, Cursor, VS Code, and other AI tools using OAuth 2.1 or API tokens.

    ๐Ÿ”„ Version Control3 views
    Compare vs Atlassian MCP Server โ†’
  • Git MCP logoGit MCP

    gitmcp.io is a generic remote MCP server to connect to ANY GitHub repository or project for documentation

    ๐Ÿ”„ Version Control5 views
    Compare vs Git MCP โ†’
  • MCP Server Bitbucket logoMCP Server Bitbucket

    Bitbucket MCP server with 58 tools for repository management, PRs, pipelines, branches, commits, deployments, webhooks, tags, branch restrictions, and source browsing.

    ๐Ÿ”„ Version Control2 views
    Compare vs MCP Server Bitbucket โ†’

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks โ€” not a rating.

GitHub stars
4
Stargazers on the source repository.
Last commit
1mo ago
Most recent push to the default branch.
Install check
Inconclusive
Didn't respond in our test window โ€” often a slow first install.
Directory activity
2 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet โ€” be the first to share how this listing worked for you.

Frequently Asked Questions about Diffctx

It requires a git diff range or a time duration window to identify changed lines as seeds for context selection.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDiffctx AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/nikolay-e-diffctx?style=directory)](https://allmcps.com/mcp/nikolay-e-diffctx)
HTML Embed
<a href="https://allmcps.com/mcp/nikolay-e-diffctx"><img src="https://allmcps.com/api/badge/nikolay-e-diffctx?style=directory" alt="Diffctx on AllMCPs" /></a>

Technical Specs & Signals

Category๐Ÿ”„Version Control
PricingFree
More technical detailsExpand โ–พ
TransportSTDIO
RuntimePython
AuthNo auth required
LicenseMIT
Last updatedAug 9, 2026
Views2
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars4
GitHub Star CountTotal stargazers on GitHub representing community popularity (4 stars).
Last commit1mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Aug 9, 2026
51Quality signal: Good ยท 51/100How this signal is calculated โ–พ
Server availabilityNot measured

Not scored for repo-hosted servers โ€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools24/30
Adoption & activity4/15
Community engagement0/10

A guidance signal from public completeness & health data โ€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 22h ago via OSV.dev ยท diffctx (PyPI)

โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge โ€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it โ€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in ๐Ÿ”„ Version Control โ†’Best MCP servers for Git & Version Control โ†’Alternatives to Diffctx โ†’Install in Claude DesktopInstall in CursorInstall in VS Code