Skip to main content
Glama

git-context-mcp

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.

Note
This README was generated using git-context-mcp itself, by connecting an AI assistant to the repository through the exposed MCP tools.


Problem This Project Solves

AI coding agents (Claude Code, Cursor, Codex, Gemini, etc.) are powerful, but they lack situational awareness when working with non-trivial codebases.

They often struggle to answer questions like:

  • What is the current state of this project?

  • Where are the real entry points?

  • What parts of the code are actively changing?

  • Which files are risky to touch?

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.


Related MCP server: organisation.md

What This MCP Does (and Does Not)

What it does

  • Runs locally as a standalone MCP process

  • Reads only Git metadata and repository files

  • Exposes read-only analysis tools

  • Works over STDIO (compatible with MCP Inspector and desktop coding agents)

  • Provides high-level context, not raw source dumps

What it does not do

  • Does not modify the repository

  • Does not upload code anywhere

  • Does not execute project code

  • Does not depend on external services or APIs


Overview

git-context-mcp is a local-first MCP server focused on development context extraction, not repository manipulation.

It exposes Git-based analysis tools that help AI coding agents quickly understand:

  • Repository structure and entry points

  • Current working state and sync status

  • Recent development activity and churn

  • Technical debt indicators (TODO / FIXME)

  • Files with elevated maintenance or bug risk


Typical Usage Flow

  1. project_status – understand branch, cleanliness, and sync state

  2. code_map – locate entry points and important modules

  3. recent_activity – identify active or volatile areas

  4. work_summary – understand recent work and open debt

  5. risk_scan – flag risky files before editing


Features

project_status

Snapshot of the current Git repository state.

code_map

Structured directory tree with identification of important files.

recent_activity

Analysis of Git history to surface frequently modified files.

work_summary

High-level summary of recent development and technical debt.

risk_scan

Detection of large, complex, or high-churn files.


Requirements

  • Python 3.10+

  • Git installed and available on PATH

  • A local Git repository to analyze


Installation

git clone https://github.com/TamiShaks-2/git-context-mcp.git
cd git-context-mcp

python -m venv .venv
source .venv/bin/activate   # macOS / Linux
# or
.venv\Scripts\activate    # Windows

pip install -e .

Running with MCP Inspector

Transport Type: STDIO

Command:

<path-to-venv>/python

Arguments:

src/server.py

Available MCP Tools

Tool

Purpose

project_status

Repository state awareness

code_map

Structural understanding

recent_activity

Development churn analysis

work_summary

High-level progress overview

risk_scan

Maintenance risk detection

All tools operate in read-only mode.


Project Structure

git-context-mcp/
├── src/
│   ├── tools/
│   │   ├── code_map.py
│   │   ├── git_activity.py
│   │   ├── git_ops.py
│   │   ├── project_status.py
│   │   ├── risk_scan.py
│   │   └── work_summary.py
│   └── server.py
├── tests/
├── pyproject.toml
└── README.md

Testing

pytest

License

MIT License

Available Tools

5 tools
code_mapC

Generates a file tree and identifies key architectural files.

ParametersJSON Schema
NameRequiredDescriptionDefault
topNo
repo_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully bears the burden of behavioral disclosure, but it does not mention traits like read-only, destructive, rate limits, or authorization requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, concise sentence that front-loads the core purpose with no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the description omits parameter details and usage context, making it incomplete for an agent to correctly invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds no meaning to the parameters (repo_path, top) beyond their names and types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it generates a file tree and identifies architectural files, which is specific and distinct from sibling tools like project_status or work_summary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives; it only describes what it does without any when-to-use or when-not-to-use context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

project_statusC

Returns a technical snapshot of a local git repository.

ParametersJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Only states 'returns a technical snapshot' but does not disclose any behavioral traits such as read-only nature, permission requirements, or side effects. Minimal transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise single sentence, no wasted words. However, it lacks structure like bullet points or usage hints that could improve clarity without adding length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the tool has one parameter and an output schema exists, the description is incomplete: it does not define 'technical snapshot' or specify any preconditions. An agent may not understand what the tool returns or when it is appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description does not mention the repo_path parameter at all. No additional meaning beyond the schema's required field declaration.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it returns a technical snapshot of a local git repository. Verb 'Returns' and resource are specific, and it distinguishes from sibling tools like code_map or recent_activity, though 'technical snapshot' could be more precise.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like code_map or recent_activity. Agent must infer use case without any context about typical scenarios or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

recent_activityC

Analyzes recent git history to find 'hot' files.

ParametersJSON Schema
NameRequiredDescriptionDefault
nNo
repo_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fails to disclose behavioral traits such as whether the tool is safe (read-only) or destructive, any authentication needs, or side effects. It only describes the basic operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded and concise with no wasted words. However, it could be more informative without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (not shown) and 2 parameters with no annotations, the description is too brief. It does not explain the meaning of 'hot' files, result limits, or any constraints, making it incomplete for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, and the description does not add meaning to the parameters 'repo_path' and 'n'. The purpose is implied but not explicitly linked to parameter roles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool analyzes recent git history to find 'hot' files, which gives a specific action and resource. However, it does not clarify what 'hot' means (e.g., frequently changed, recently modified), leaving some ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus siblings like code_map or work_summary. The description implies a use case for identifying active files but lacks explicit context or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

risk_scanC

Identifies risky areas (hotspots) in the codebase.

ParametersJSON Schema
NameRequiredDescriptionDefault
repo_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must convey behavioral traits, but it only says 'identifies risky areas' without mentioning whether it requires authentication, modifies state, or what the output looks like. The existence of an output schema is not leveraged.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, but it lacks structure and important details. While not verbose, it sacrifices completeness for brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one parameter, no annotations, and an output schema, the description fails to provide sufficient context about behavior, return format, or usage scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds no detail about the repo_path parameter beyond implying it refers to a codebase. It does not explain format, valid values, or usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool identifies risky areas (hotspots) in the codebase, which is specific, but 'risky areas' is vague and doesn't clearly differentiate from siblings like code_map or project_status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus its siblings (code_map, project_status, etc.), nor are exclusions or prerequisites mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

work_summaryC

Summarizes development progress and technical debt.

ParametersJSON Schema
NameRequiredDescriptionDefault
sinceNo7d
repo_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavioral traits. It only mentions 'summarizes' without explaining auth needs, side effects, input constraints (e.g., that repo_path is required), or output characteristics. Key behavioral information is missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no waste, which is concise. However, it is overly brief and lacks structure such as bullet points or additional context that would make it more useful for an agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has two parameters (one required) and an output schema, the description is incomplete. It does not specify the time range ('since' parameter defaults to '7d' but is not mentioned), the required repo_path, or the nature of the output. Critical context for correct tool invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage for parameters, and the tool description adds no meaning beyond the schema. It does not explain what 'repo_path' or 'since' represent, or how they affect the summary. The description fails to compensate for the missing schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'summarizes development progress and technical debt,' which is a clear verb+resource. While it does not explicitly differentiate from siblings like code_map or recent_activity, the purpose is specific enough for an agent to understand its high-level summarization role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus its alternatives (e.g., code_map, recent_activity). The description lacks any context about prerequisites, appropriate scenarios, or comparisons to sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.0
    • First observedcode_map
    • First observedproject_status
    • First observedrecent_activity
    • First observedrisk_scan
    • First observedwork_summary

TDQS

B3/5.0
Disambiguation4/5

Each tool describes a distinct analysis aspect: code map, project status, recent activity, risk scan, and work summary. There is slight overlap between 'recent_activity' and 'risk_scan' both mentioning 'hot' files, but the descriptions are clear enough to differentiate.

Naming Consistency5/5

All tool names follow a consistent pattern: two words in snake_case with a noun or adjective followed by a noun (e.g., code_map, project_status). No mixing of styles.

Tool Count5/5

With 5 tools, the set is well-scoped for a git analysis server. Each tool serves a distinct purpose without being too few or too many.

Completeness3/5

The tools cover high-level analyses like structure, status, recent changes, risk, and progress, but lack lower-level git operations (e.g., commit details, branch info, diffs). This is a minor gap for a comprehensive git context server.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

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/TamiShaks-2/git-context-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server