변경 사항에 영향을 받는 호출자, 테스트, 컨트랙트를 식별하여 LLM이 git diff를 리뷰하는 데 필요한 최소한의 코드를 선택합니다.
다른 이름 nikolay-e/diffctx
- 스타
- 6
- Tools
- —
- 다운로드, 30일
- 3,869
- 최신 버전
- 1.20.0
- 마지막 커밋
- 2026년 11월 14일
- 라이선스
- Apache-2.0
diffctx MCP란?
diffctx은(는) MCP server입니다. 변경 사항에 영향을 받는 호출자, 테스트, 컨트랙트를 식별하여 LLM이 git diff를 리뷰하는 데 필요한 최소한의 코드를 선택합니다.
프로젝트 README에서 생성된 요약
diffctx MCP server 정보
diffctx는 git diff 외부의 관련 컨텍스트를 식별하여 개발자와 AI agent가 코드 변경의 광범위한 영향을 이해할 수 있도록 돕습니다. 저장소 전체를 제공하는 대신, 수정 사항의 영향을 받는 특정 호출자, 테스트 및 컨트랙트를 선택합니다. 이 도구는 특정 토큰 예산 내에서 작동하도록 설계되어, 컨텍스트 창 제한이 중요한 LLM 기반 코드 리뷰에 유용합니다.
이 서버는 로컬에서 실행되며, 유지 관리되는 인덱스나 외부 모델 호출 없이 결정론적으로 작동합니다. Claude Desktop, Cursor 또는 Zed와 같은 다양한 MCP 클라이언트에 통합할 수 있습니다. 사용자는 분석 범위를 정의하기 위해 git range, staged changes 또는 24h와 같은 시간 범위를 지정할 수 있습니다. 영향 분석 또는 변경 사항 위치 찾기와 같은 다양한 모드를 지원하며, --budget 플래그를 사용하여 사용자 정의 토큰 예산을 설정할 수 있습니다.
활용 사례
- 1코드 변경 영향 분석특정 git diff의 영향을 받는 호출자와 테스트를 식별하여 변경 범위를 파악합니다.
- 2LLM 리뷰 컨텍스트 최적화토큰 제한을 준수하면서 AI agent가 브랜치를 리뷰하는 데 필요한 최소한의 코드를 제공합니다.
- 3최근 작업 위치 찾기특정 시간 범위 내에 이루어진 코드 변경 사항을 순위가 매겨진 JSON 리스트로 가져옵니다.
- 4특정 심볼 리뷰코드 변경 없이도 특정 함수나 이름에 대한 영향과 주변 컨텍스트를 찾습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
diffctx MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 diffctx MCP 설치
$ claude mcp add diffctx -- uvx diffctxCursor에 diffctx MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"diffctx": {
"command": "uvx",
"args": [
"diffctx"
]
}
}
}VS Code에 diffctx MCP 설치
.vscode/mcp.json
{
"servers": {
"diffctx": {
"type": "stdio",
"command": "uvx",
"args": [
"diffctx"
]
}
}
}VS Code CLI에 diffctx MCP 설치
$ code --add-mcp '{"name":"diffctx","type":"stdio","command":"uvx","args":["diffctx"]}'Claude Desktop에 diffctx MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"diffctx": {
"command": "uvx",
"args": [
"diffctx"
]
}
}
}Codex에 diffctx MCP 설치
$ codex mcp add diffctx -- uvx diffctxCodex config.toml에 diffctx MCP 설치
~/.codex/config.toml
[mcp_servers.diffctx] command = "uvx" args = ["diffctx"]
Gemini CLI에 diffctx MCP 설치
$ gemini mcp add -s user diffctx uvx -- diffctxGemini settings.json에 diffctx MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"diffctx": {
"command": "uvx",
"args": [
"diffctx"
]
}
}
}자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능nikolay-e/diffctx is public and reachablegithub.com/nikolay-e/diffctx ↗통과
- 패키지가 이 저장소를 소스로 명시diffctx names nikolay-e/diffctx as sourcepypi.org/project/diffctx/ ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for diffctxpypi.org/project/diffctx/ ↗통과
- 오픈 소스 라이선스 (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-12github.com/nikolay-e/diffctx ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from diffctx통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음2 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기diffctx — what a git change reaches, and the code to review it
diffctx tells an agent or a reviewer what a change reaches outside its diff — the callers, the tests that reach them, the contracts it crosses — and selects the code needed to understand it under a token budget. Local, deterministic, no index, no model calls. Caller resolution is static and per language; where it cannot resolve, the answer says so instead of printing a zero.
Formerly published as
treemapper— every command, flag, and API call works unchanged.
Install
diffctx is a command-line tool; the MCP server, the Claude Code plugin and the GitHub Action run the same engine.
CLI
uvx diffctx . --diff HEAD~1 # zero-install, run once via uv
pipx install diffctx # isolated CLI
pip install diffctx # into an active environment
cargo install diffctx # native binary from crates.io, no Python
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
scoop bucket add diffctx https://github.com/nikolay-e/diffctx # Windows
scoop install diffctx/diffctx
The native binary — cargo, npm, Docker, Scoop and the
release archives for
Linux, macOS and Windows on x64 and ARM — answers --diff and --symbol in
every mode; whole-tree export, Markdown packs, diffctx graph and the MCP
server need the Python package.
Any MCP client
Registered as io.github.nikolay-e/diffctx.
claude mcp add diffctx -- uvx --from 'diffctx[mcp]' diffctx-mcp
codex mcp add diffctx -- uvx --from 'diffctx[mcp]' diffctx-mcp
gemini mcp add diffctx uvx -- --from 'diffctx[mcp]' diffctx-mcp
Cursor, VS Code, Claude Desktop, Windsurf, Zed, Continue and the Python API: integrations.
Claude Code plugin
The MCP server plus /diffctx:impact and hooks that run it on each commit and
push.
claude plugin marketplace add nikolay-e/diffctx
claude plugin install diffctx@diffctx
CI
The GitHub Action hands a pull request's diff context to any review step.
Usage
diffctx . --diff --mode impact # uncommitted work: callers outside the diff, their tests, contracts
diffctx . --symbol parse_config # the same for a name, no change needed
diffctx . --diff main...feature # the code to review a branch, packed under the auto budget
diffctx . --diff HEAD~1 --budget 12000 # the last commit, capped at 12k o200k tokens
diffctx . --diff 24h --mode locate # today's work as ranked JSON, no source bodies
diffctx . # whole-tree export, Markdown
--diff takes a git range, staged, or a duration window ending now (24h,
90min, 2w). Every flag, default and exit code:
command-line reference.

How it compares
Whole-repo packers export everything; code-graph servers answer queries against a maintained index. diffctx is diff-seeded: the input is a change, the output is what it touches and what explains it. Measured results, and when the other two fit better: COMPARISON.md.
More
- Documentation site — the pipeline end to end
- Command-line reference — rendered from
diffctx --help - Integrations — install, MCP clients, Python API
- FAQ — heuristic or oracle, ignore rules, monorepos, secrets
- Token counting —
--budgetfor non-GPT models - Benchmarks and the paper
- Changelog · Security
- Parameter strategy
Apache 2.0
diffctx MCP 질문
diffctx MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add diffctx -- uvx diffctx를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
diffctx MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
diffctx는 전체 저장소 패커(whole-repo packers)나 코드 그래프 서버와 어떻게 다른가요?
모든 것을 내보내는 전체 저장소 패커나 유지 관리되는 인덱스를 사용하는 코드 그래프 서버와 달리, diffctx는 diff-seeded 방식입니다. 즉, 특정 변경 사항을 입력하면 해당 변경 사항이 영향을 미치는 부분을 출력합니다.
diffctx를 사용하려면 인덱스나 모델 호출이 필요한가요?
아니요, 인덱스나 외부 모델 호출 없이 로컬에서 결정론적으로 작동합니다.
LLM에 전송되는 코드 양을 제한할 수 있나요?
네, --budget 플래그를 사용하여 출력 토큰 수를 특정 제한값으로 설정할 수 있습니다.