SuperAPI AI Directory

git-context-mcp

Structured Git repository analysis: project status, recent activity, code map and risk hotspots.

Open website

About this tool

git-context-mcp is a local Model Context Protocol (MCP) server designed to provide AI programming agents with structured, high-signal insights into Git repositories, enabling agents to understand project status, structure, activity, and risk without uploading or modifying the codebase. The project addresses the lack of situational awareness that AI programming agents often face when working with non-trivial codebases by transforming Git history and repository structure into explicit, machine-readable context. Agents often struggle to answer questions such as what the current state of the project is, where the real entry points are, which parts of the code are actively changing, and which files are high-risk to modify.

Key capabilities:

  • Analyze Git metadata and repository files in read-only mode, without modifying the repository, uploading code, executing project code, or relying on external services or APIs.
  • Work over STDIO transport, compatible with MCP Inspector and desktop programming agents (such as Claude Code, Cursor, Codex, Gemini, etc.).
  • Provide high-level context rather than raw source code dumps.

Exposed MCP tools (all read-only):

  • project_status: Snapshot the current Git repository status, including branch, cleanliness, and sync status.
  • code_map: Generate a structured directory tree and identify important files, entry points, and important modules.
  • recent_activity: Analyze Git history to find frequently modified files and identify active or volatile areas.
  • work_summary: Provide a high-level summary of recent development activity and technical debt (such as TODO / FIXME).
  • risk_scan: Detect large, complex, or high-churn files and flag risky files before editing.

Typical usage flow:

  1. Use project_status to understand the branch, cleanliness, and sync status.
  2. Use code_map to locate entry points and important modules.
  3. Use recent_activity to identify active or volatile areas.
  4. Use work_summary to understand recent work and unresolved debt.
  5. Use risk_scan to flag risky files before editing.

Usage:

  • Requires Git to be installed locally and accessible in PATH.
  • Requires a local Git repository as the analysis target.
  • Can run independently as a local MCP process, over STDIO transportConnect to a compatible MCP client (such as MCP Inspector or a desktop programming agent).
  • This README itself was generated by connecting an AI assistant to the repository and using the exposed MCP tools.

Applicable scenarios:

  • An AI programming agent needs to quickly understand the codebase structure, status, activity hotspots, and risky files before writing or reviewing code.
  • Developers collaborating with AI agents want to provide machine-readable repository context without uploading code.

Limitations:

  • Provides only high-level analysis at the Git and repository structure level, not raw source code dumps.
  • Does not modify the repository, upload code, execute project code, or rely on external services.
  • The specific installation commands and detailed configuration steps are not yet provided in the supplied materials.