git-intel-mcp
Git Intelligence MCP 서버
Git 히스토리를 실행 가능한 저장소 인사이트로 전환하는 경량 Model Context Protocol(MCP) 서버입니다.
개요
Git Intelligence MCP는 AI 어시스턴트가 자연어 요청을 통해 Git 저장소 히스토리를 분석할 수 있게 해주는 로컬 MCP 서버입니다.
Git 명령어를 수동으로 실행하고 커밋 히스토리를 해석하는 대신, MCP 호환 클라이언트는 전용 도구를 호출하여 다음을 파악할 수 있습니다:
자주 변경되는 파일
기여자 소유권 패턴
시간에 따른 코드 변경량(코드 차인)
이 프로젝트는 의도적으로 가볍게 설계되었으며, 공식 MCP Python SDK와 GitPython을 사용하여 단일 Python 파일로 구현되었습니다.
Related MCP server: GitIntel
왜 Git Intelligence인가?
Git 히스토리에는 유용한 엔지니어링 신호가 포함되어 있지만, 이를 수동으로 추출하는 것은 반복적인 작업이 될 수 있습니다.
Git Intelligence를 사용하면 다음과 같은 질문을 할 수 있습니다:
"어떤 파일이 가장 많이 변경되었나요?"
"
server.py에는 몇 명의 개발자가 작업했나요?"
"2026년 1월 이후로 얼마나 많은 코드가 변경되었나요?"
MCP 서버는 이러한 자연어 요청을 구조화된 도구 호출로 변환하고 저장소의 Git 히스토리를 분석합니다.
Natural Language
│
▼
MCP Client
│
▼
Git Intelligence MCP
│
┌───┼────────┐
▼ ▼ ▼
Hotspots Bus Factor Churn
│ │ │
└───┼────────┘
▼
Git Repository
│
▼
Repository Insights기능
기능 | 설명 |
핫스팟 분석 | 가장 자주 변경된 파일을 찾습니다 |
버스 팩터 분석 | 파일에 기여한 고유 기여자 수를 계산합니다 |
코드 차인 분석 | 특정 날짜 이후 추가 및 제거된 라인 수를 계산합니다 |
자연어 접근 | AI 클라이언트가 Git 분석 도구를 호출할 수 있게 합니다 |
로컬 저장소 지원 | 복제된 Git 저장소에서 직접 작동합니다 |
경량 아키텍처 | 데이터베이스나 외부 서비스가 필요 없습니다 |
MCP Inspector 지원 | 간편한 로컬 도구 테스트 및 디버깅 |
VS Code 지원 | MCP 클라이언트로 VS Code에 직접 연결 가능 |
사용 가능한 MCP 도구
1. hotspots
저장소의 커밋 히스토리 전체에서 가장 자주 변경된 파일을 식별합니다.
인수
인수 | 유형 | 기본값 | 설명 |
|
| 필수 | 로컬 Git 저장소 경로 |
|
|
| 반환할 파일 수 |
예시 프롬프트
Use Git Intelligence to find the top 5 hotspot files in this repository.예시 도구 호출
hotspots(
repo_path="E:/projects/my-repo",
top_n=5
)예시 결과
42 commits — server.py
27 commits — README.md
18 commits — config.py
12 commits — utils.py
9 commits — tests/test_server.py자주 수정되는 파일은 추가 검토나 테스트가 필요할 수 있는 영역을 식별하는 유용한 신호가 될 수 있습니다.
2. bus_factor
특정 파일을 수정한 고유 기여자 수를 확인합니다.
인수
인수 | 유형 | 설명 |
|
| 로컬 Git 저장소 경로 |
|
| 분석할 파일 |
예시 프롬프트
Use Git Intelligence to find how many developers have modified server.py.예시 도구 호출
bus_factor(
repo_path="E:/projects/my-repo",
file_path="server.py"
)예시 결과
server.py: 3 distinct author(s) — Alice, Bob, Charlie기여자 수가 적다는 것은 특정 파일에 대한 지식 집중 가능성을 나타낼 수 있습니다.
3. churn_since
지정된 날짜 이후 추가 및 제거된 총 라인 수를 계산합니다.
인수
인수 | 유형 | 설명 |
|
| 로컬 Git 저장소 경로 |
|
|
|
예시 프롬프트
Use Git Intelligence to calculate the code churn since 2026-01-01.예시 도구 호출
churn_since(
repo_path="E:/projects/my-repo",
since_date="2026-01-01"
)예시 결과
Since 2026-01-01: +842 / -391 lines이는 주어진 기간 동안 추가되고 제거된 코드의 양을 간단히 보여줍니다.
예시 워크플로우
MCP 호환 클라이언트에 연결되면 자연어로 저장소와 상호 작용할 수 있습니다.
저장소 핫스팟 찾기
Use Git Intelligence to find the top 5 most frequently changed files.↓
hotspots()↓
Repository history↓
Top 5 hotspot files파일 소유권 조사
How many different developers have worked on server.py?↓
bus_factor()↓
Distinct contributors개발 활동 분석
How many lines have been added and removed since 2026-06-01?↓
churn_since()↓
Code churn statisticsMCP 클라이언트 호환성
이 서버는 stdio 전송을 사용하므로 로컬 MCP 호환 클라이언트에 적합합니다.
다음 환경에서 테스트되었습니다:
MCP Inspector — 로컬 개발 및 도구 테스트
VS Code — MCP 클라이언트 통합
아키텍처는 단순하게 유지됩니다:
┌───────────────────┐
│ MCP Client │
│ │
│ MCP Inspector │
│ VS Code │
└─────────┬─────────┘
│
stdio
│
▼
┌───────────────────┐
│ Git Intelligence │
│ MCP Server │
├───────────────────┤
│ hotspots() │
│ bus_factor() │
│ churn_since() │
└─────────┬─────────┘
│
▼
┌───────────────────┐
│ Local Git Repo │
└───────────────────┘기술 스택
Python 3.10+
MCP Python SDK
FastMCP
GitPython
Git
stdio 전송
이 서버는 데코레이터 기반 FastMCP API를 사용하여 Python 함수를 MCP 도구로 노출합니다.
프로젝트 구조
이 프로젝트는 의도적으로 구현을 최소화합니다:
git-intel-mcp/
│
├── .vscode/
│ └── mcp.json
│
├── assets/
│
├── server.py
├── requirements.txt
├── README.md
└── .gitignore왜 단일 server.py인가?
이 프로젝트는 대규모 프로덕션 애플리케이션이 아닌 MCP 학습 구현에 초점을 맞추고 설계되었습니다.
핵심 구현을 단일 파일로 유지하면 MCP 아키텍처를 이해하기 쉽습니다:
Define Tool
↓
@mcp.tool()
↓
MCP Tool Schema
↓
MCP Client
↓
Tool Call
↓
GitPython
↓
Git Repository
↓
Result기능이 성장함에 따라 도구는 전용 모듈로 분리할 수 있습니다.
설치
1. 저장소 복제
git clone https://github.com/s-zaid-13/git-intel-mcp.git
cd git-intel-mcp2. 가상 환경 생성
Windows
python -m venv venv
venv\Scripts\activatemacOS / Linux
python -m venv venv
source venv/bin/activate3. 의존성 설치
pip install -r requirements.txt요구 사항
mcp[cli]<2.0.0
gitpython로컬 실행
다음 명령으로 MCP 서버를 시작합니다:
python server.py이 서버는 stdio 전송을 사용하므로 기존의 웹 서버를 시작하지 않습니다.
MCP 호환 클라이언트의 연결을 기다립니다.
MCP Inspector로 테스트
MCP Inspector는 MCP 서버를 로컬에서 테스트할 수 있는 대화형 환경을 제공합니다.
실행:
mcp dev server.py그런 다음:
서버에 연결
사용 가능한 도구 확인
생성된 스키마 검토
인수 제공
도구 실행
반환된 결과 확인
다음 도구를 사용할 수 있어야 합니다:
hotspots
bus_factor
churn_sinceVS Code에 연결
MCP 서버는 VS Code에 직접 연결할 수도 있습니다.
생성:
.vscode/mcp.jsonWindows용 예시 구성:
{
"servers": {
"gitIntelligence": {
"type": "stdio",
"command": "E:\\Spiral Lab\\git-intel-mcp\\venv\\Scripts\\python.exe",
"args": [
"E:\\Spiral Lab\\git-intel-mcp\\server.py"
],
"cwd": "E:\\Spiral Lab\\git-intel-mcp"
}
}
}연결 후 다음 MCP 도구를 VS Code에서 검색할 수 있어야 합니다:
gitIntelligence
├── hotspots
├── bus_factor
└── churn_since예시 요청:
Use Git Intelligence to find the top 5 hotspot files in this repository.작동 방식
이 서버는 FastMCP를 사용하여 구축되었습니다.
도구는 MCP SDK 데코레이터를 사용하여 노출됩니다:
@mcp.tool()
def hotspots(repo_path: str, top_n: int = 10) -> str:
...FastMCP는 함수 시그니처와 문서화를 사용하여 MCP 클라이언트가 검색할 수 있는 도구 정의를 생성합니다.
전체 흐름은 다음과 같습니다:
Python Function
│
▼
@mcp.tool()
│
▼
MCP Tool Definition
│
▼
MCP Client
│
▼
Tool Call
│
▼
GitPython
│
▼
Git History
│
▼
Analysis Result시연되는 MCP 개념
도구
이 서버는 세 가지 호출 가능한 MCP 도구를 노출합니다:
hotspots
bus_factor
churn_since이를 통해 AI 클라이언트는 저장소 분석을 수행할 수 있습니다.
클라이언트-서버 아키텍처
MCP 클라이언트는 Git 분석이 내부적으로 어떻게 구현되는지 알 필요가 없습니다.
다음만 알면 됩니다:
사용 가능한 도구
허용되는 인수
반환되는 결과
MCP Client
│
│ MCP
▼
MCP Server
│
▼
Git Repositorystdio 전송
로컬 서버는 stdio를 사용하여 통신하며, 이는 로컬에서 실행되는 MCP 서버 및 개발 클라이언트에 적합합니다.
제한 사항
이 구현은 의도적으로 범위를 작게 유지합니다.
로컬 Git 저장소만 지원됩니다.
대규모 저장소는 추가 처리 시간이 필요할 수 있습니다.
차인은 변경의 양을 측정하지 코드 품질을 측정하지 않습니다.
이러한 제한은 완전한 저장소 분석 플랫폼을 구축하는 대신 MCP 이해에 프로젝트의 초점을 맞추기 위함입니다.
학습 성과
이 프로젝트는 Python으로 MCP 서버를 구축하는 기본 사항을 보여줍니다:
공식 Python SDK로 MCP 서버 생성
FastMCP로 도구 정의MCP 도구 스키마 이해
stdio 전송 사용
MCP 서버를 MCP 클라이언트에 연결
MCP Inspector로 도구 테스트
사용자 지정 MCP를 VS Code에 통합
공개 공유를 위한 MCP 프로젝트 준비
핵심 요점은 간단합니다:
MCP는 AI 애플리케이션이 외부 도구와 기능을 검색하고 상호 작용할 수 있는 표준화된 방법을 제공합니다.
작성자
Samama Zaid
Python으로 Model Context Protocol을 학습하고 구현하기 위한 실습 프로젝트로 제작되었습니다.
This server cannot be installed
Maintenance
Related MCP Servers
- FlicenseAqualityCmaintenanceAn MCP server that transforms repositories into queryable knowledge by combining static code analysis with git history tracking. It allows users to investigate codebase structure, identify fragile files based on churn, and receive risk assessments through natural language queries.7
- AlicenseAqualityBmaintenanceA local Git intelligence MCP server that provides deep repository analytics including hotspots, temporal coupling, knowledge maps, churn analysis, and risk scoring for AI agents.1212MIT
- AlicenseAqualityCmaintenanceA local Git intelligence MCP server that provides deep repository analytics including hotspots, churn, knowledge maps, and risk scoring, all computed from commit history without data leaving your machine.12MIT
- AlicenseNot gradedqualityCmaintenanceA production-grade MCP server for local git repositories that provides tools for code search, git history analysis, complexity metrics, test discovery, and dependency management.MIT
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server for static security analysis of Android source code
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/s-zaid-13/git-intel-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server