A local Model Context Protocol (MCP) server that provides structured, high-signal insight into a Git repository, enabling AI coding agents to understand project state, structure, activity, and risk — without uploading or modifying the codebase. AI coding agents (Claude Code, Cursor, Codex, Gemini, etc.) are powerful, but they lack situational awareness when working with non-trivial codebases. They
Add this skill
npx mdskills install TamiShaks-2/git-context-mcpWell-documented MCP server providing Git repository analysis tools for AI coding agents
1# git-context-mcp23A **local Model Context Protocol (MCP) server** that provides structured, high-signal insight into a Git repository, enabling AI coding agents to understand **project state, structure, activity, and risk** — without uploading or modifying the codebase.45> **Note**6> This README was generated using `git-context-mcp` itself, by connecting an AI assistant to the repository through the exposed MCP tools.78---910## Problem This Project Solves1112AI coding agents (Claude Code, Cursor, Codex, Gemini, etc.) are powerful, but they lack **situational awareness** when working with non-trivial codebases.1314They often struggle to answer questions like:15- What is the current state of this project?16- Where are the real entry points?17- What parts of the code are actively changing?18- Which files are risky to touch?1920`git-context-mcp` solves this by turning **Git history and repository structure** into **explicit, machine-readable context** that AI agents can consume before writing or reviewing code.2122---2324## What This MCP Does (and Does Not)2526### What it does27- Runs locally as a standalone MCP process28- Reads only Git metadata and repository files29- Exposes read-only analysis tools30- Works over STDIO (compatible with MCP Inspector and desktop coding agents)31- Provides high-level context, not raw source dumps3233### What it does not do34- Does not modify the repository35- Does not upload code anywhere36- Does not execute project code37- Does not depend on external services or APIs3839---4041## Overview4243`git-context-mcp` is a **local-first MCP server** focused on **development context extraction**, not repository manipulation.4445It exposes Git-based analysis tools that help AI coding agents quickly understand:46- Repository structure and entry points47- Current working state and sync status48- Recent development activity and churn49- Technical debt indicators (TODO / FIXME)50- Files with elevated maintenance or bug risk5152---5354## Typical Usage Flow55561. **project_status** – understand branch, cleanliness, and sync state572. **code_map** – locate entry points and important modules583. **recent_activity** – identify active or volatile areas594. **work_summary** – understand recent work and open debt605. **risk_scan** – flag risky files before editing6162---6364## Features6566### project_status67Snapshot of the current Git repository state.6869### code_map70Structured directory tree with identification of important files.7172### recent_activity73Analysis of Git history to surface frequently modified files.7475### work_summary76High-level summary of recent development and technical debt.7778### risk_scan79Detection of large, complex, or high-churn files.8081---8283## Requirements8485- Python 3.10+86- Git installed and available on PATH87- A local Git repository to analyze8889---9091## Installation9293```bash94git clone https://github.com/TamiShaks-2/git-context-mcp.git95cd git-context-mcp9697python -m venv .venv98source .venv/bin/activate # macOS / Linux99# or100.venv\Scripts\activate # Windows101102pip install -e .103```104105---106107## Running with MCP Inspector108109Transport Type: STDIO110111Command:112```113<path-to-venv>/python114```115116Arguments:117```118src/server.py119```120121---122123## Available MCP Tools124125| Tool | Purpose |126|------|---------|127| project_status | Repository state awareness |128| code_map | Structural understanding |129| recent_activity | Development churn analysis |130| work_summary | High-level progress overview |131| risk_scan | Maintenance risk detection |132133All tools operate in read-only mode.134135---136137## Project Structure138139```140git-context-mcp/141├── src/142│ ├── tools/143│ │ ├── code_map.py144│ │ ├── git_activity.py145│ │ ├── git_ops.py146│ │ ├── project_status.py147│ │ ├── risk_scan.py148│ │ └── work_summary.py149│ └── server.py150├── tests/151├── pyproject.toml152└── README.md153```154155---156157## Testing158159```bash160pytest161```162163---164165## License166167MIT License168
Full transparency — inspect the skill content before installing.