MCP Branch Render Document
자동 PR 브랜치 컨텍스트 렌더러 (Branch Render Context MCP)
Branch Render Context는 기본(base) 또는 체크아웃 브랜치를 기준으로 전체 Git Pull Request / 대상(Target) 브랜치 컨텍스트를 자동으로 분석하고 렌더링하도록 설계된 특수 목적의 Model Context Protocol (MCP) 서버 및 CLI 도구입니다. 브랜치 전환 없이, 작업 트리 격리, 자동 .gitignore 관리, 유연한 스토리지 정리 옵션을 통해 캐시된 증분 Markdown 및 JSON 문서를 AI 에이전트에 직접 전달합니다.
🎯 주요 특징 및 아키텍처
브랜치 전환 없는 대상 브랜치 해석:
작업 트리가 현재
main또는develop에 있고feature/user-auth와 같은 대상 브랜치를 지정하면 도구가 자동으로 다음을 결정합니다:baseBranch:main(현재 체크아웃 또는 구성된 기본값에서)targetBranch:feature/user-auth비교:
main..feature/user-auth
작업 트리 무중단:
개발자의 작업 트리는 완전히 건드리지 않습니다.
git checkout또는git switch와 같은 명령은 절대 실행되지 않습니다.
독립적인 커밋 및 Ref 해석:
대상 브랜치 커밋은 현재 HEAD에 의존하지 않고 로컬 ref 또는 원격 추적 ref(
origin/<branch>)에서 직접 해석됩니다.
깨끗한 작업 트리 격리:
현재 체크아웃 브랜치의 커밋되지 않은 더티 변경 사항은 대상 브랜치의 렌더링된 PR 컨텍스트를 절대 오염시키지 않습니다.
Git 유사 계층형 스토리지 및 자동
.gitignore:문서를 구조화된 경로에 저장합니다:
.branch-render-context/repositories/<repo-id>/branches/<branch-path>/document.json.다른 사용자 규칙을 변경하지 않고
.branch-render-context/를.gitignore에 자동으로 멱등적으로 추가합니다.
내장 시크릿 마스킹 및 토큰 최적화:
자격 증명,
.env파일,.pem인증서 및 API 토큰을 감지하고 마스킹합니다.LLM 컨텍스트 창에 최적화된 간결하고 토큰 효율적인 Markdown 요약을 생성합니다.
세분화된 정리 및 동시성 잠금:
안전한 다중 프로세스 잠금(
.storage.lock및.branch.lock).3가지 별개의 정리 범위 지원: 단일 브랜치, 리포지토리 전체, 전체 스토리지 삭제.
Related MCP server: organisation.md
🛠️ CLI 가이드
1. 대상 브랜치 컨텍스트 렌더링 / 새로고침
# Analyze target branch relative to the currently checked-out base branch
npm run branch-render:refresh -- --branch feature/user-auth
# Specify explicit base branch and force a full rebuild
npm run branch-render:refresh -- --branch feature/user-auth --base develop --force출력 예시:
=================================================================
Target branch: feature/user-auth
Checkout branch: main
Base branch: main
Comparison: main..feature/user-auth
Target commit: 8f3b2a1c
Base commit: 1e4d9c7b
Strategy: full
─────────────────────────────────────────────────────────────────
Metrics:
- Commits: 3
- Changed files: 4
- Insertions: +142
- Deletions: -18
- Worktree dirty: ignored (clean isolation)
─────────────────────────────────────────────────────────────────
Document path:
.branch-render-context/repositories/r_9a2b4c1d/branches/feature/user-auth/document.json
=================================================================2. 대화형 터미널 마법사
npm run branch-render:start마법사는 현재 체크아웃 브랜치를 감지하고, 기존 렌더링된 컨텍스트를 표시하며, 렌더링 또는 정리 옵션을 안내합니다.
3. 최신 상태 확인
npm run branch-render:status -- --branch feature/user-auth4. 등록된 컨텍스트 목록
npm run branch-render:list5. 컨텍스트 및 스토리지 정리
# Scope 1: Clear context for a specific branch
npm run branch-render:clear -- --branch feature/user-auth
# Scope 2: Clear all branch contexts in the current repository
npm run branch-render:clear -- --all
# Scope 3: Completely clear ENTIRE storage (all repositories, catalog, config, indexes)
npm run branch-render:clear -- --all-storage --yes🤖 MCP 서버 통합
AI 편집기 또는 클라이언트(Claude Desktop, Cursor, Cline, Roo Code)에서 MCP 서버를 구성합니다:
{
"mcpServers": {
"branch-render-context": {
"command": "node",
"args": ["<path-to-mcp-branch-render-document>/dist/index.js"]
}
}
}사용 가능한 MCP 도구
도구 이름 | 매개변수 | 설명 |
|
| 세션을 초기화하고, 리포지토리를 탐색하며, 브랜치 상태를 검사합니다. |
|
| 등록된 모든 리포지토리와 캐시된 브랜치 문서를 나열합니다. |
|
| 렌더링 없이 대상 ref와 기본 ref 간의 Git 최신 상태를 평가합니다. |
|
| 지정된 최신 상태 정책( |
|
| 결정적 증분 업데이트 또는 전체 재빌드를 트리거합니다. |
|
| 리포지토리에서 단일 브랜치 또는 모든 브랜치의 렌더링된 컨텍스트를 지웁니다. |
|
| 모든 리포지토리의 전체 스토리지를 삭제합니다( |
📄 렌더링된 문서 구조
각 렌더링된 브랜치 문서에는 구조화된 JSON 객체(document.json)와 AI 친화적인 Markdown 표현(document.md)이 모두 포함됩니다:
리포지토리 및 브랜치 메타데이터: 고유 ID, 원격 URL, 비교 ref 및 커밋 해시.
커밋 기록: 작성자, 날짜, 제목 및 커밋 본문(시크릿 필터링 적용)이 포함된 전체 커밋 목록.
파일 변경 및 Diff 통계: 변경 상태(
added,modified,deleted,renamed), 패치 청크, 삽입 및 삭제 수가 포함된 상세 파일 목록.최신 상태 및 체크포인트 상태: 초고속 증분 재평가에 사용되는 저장된 커밋 SHA 및 타임스탬프.
🧪 개발 및 테스트
# Run Vitest test suite
npm test
# Build TypeScript output
npm run build📜 라이선스
MIT 라이선스. AI 에이전트 워크플로우 및 자동화된 코딩 어시스턴트를 위해 설계되었습니다.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceProvides AI coding agents with structured Git repository context including project state, code structure, activity, and risk analysis without modifying or uploading code.53
- AlicenseAqualityBmaintenanceTurns any GitHub repository into your organisation's persistent context layer, enabling AI agents to read, search, and propose updates via pull requests.125MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI agents with persistent, branch-aware context memory by storing summaries per Git branch and automatically enriching them with recent commits and divergence from main. Enables agents to maintain coherent state across sessions without mixing contexts from different branches.12MIT
- AlicenseNot gradedqualityBmaintenanceAutomatically captures project state on git commits, detects context drift, and delivers structured token-budgeted briefings to AI agents, ensuring project continuity without manual effort.1452MIT
Related MCP Connectors
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Git-backed platform for skills, tools, and context for AI agents
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ninh-Duong/mcp-branch-render-document'
If you have feedback or need assistance with the MCP directory API, please join our Discord server