Skip to main content
MCP server CX Codex

diffctx — Claude Code MCP server: what it does, how to install

Selects related callers, tests, and interfaces outside a git diff. It bundles the context needed for code review within a token limit.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add diffctx -- uvx diffctx
Open on GitHub

What diffctx does

diffctx examines git revisions and pulls in relevant code outside the raw patch. It locates upstream callers, connected tests, and crossed contracts without querying external AI APIs or maintaining a persistent code index.

Caller detection relies on static analysis tailored per language. When relationships cannot be resolved cleanly, the tool reports that directly rather than returning an empty count. You can pass git ranges, staged files, or time windows such as 24h and restrict payload size with --budget.

Running the MCP server requires the Python package, meaning native binaries from cargo, npm, or release archives are not enough on their own. It feeds the agent only the source files necessary to understand the diff.

What it helps with

  • extract callers and tests affected by a git change
  • fit diff review context into an exact token budget
  • inspect contract impact for uncommitted code
  • trace code dependencies across revisions without a background index

Example prompts for the agent

  • Review the changes in main...feature capped at 12000 tokens using diffctx
  • Find all callers and tests outside the diff for HEAD~1
  • Inspect uncommitted files in impact mode to see touched contracts

How to install diffctx

Platform CLI

claude mcp add diffctx -- uvx diffctx

uvx runs the command named after the package; if the README names another one, use uvx --from diffctx <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about diffctx

How do I install diffctx in Claude Code?

Run claude mcp add diffctx -- uvx diffctx in your terminal. This registers the server using uvx.

What does diffctx do?

It inspects your git modifications to find external code that touches the change, including callers and test suites. It then packs that context under a defined token limit for code review.

Can I run the MCP server with the native binary alone?

No, native builds from crates.io, npm, or Docker only support the --diff and --symbol commands. The MCP server mode requires the Python package installation.

Similar MCP servers

All MCP servers for Code review and refactoring →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor