git-context-mcp
Analyzes local Git repositories to provide structured insights into project state, structure, recent activity, and risk.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@git-context-mcpshow me the current project status and code map"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 usinggit-context-mcpitself, 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
project_status – understand branch, cleanliness, and sync state
code_map – locate entry points and important modules
recent_activity – identify active or volatile areas
work_summary – understand recent work and open debt
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>/pythonArguments:
src/server.pyAvailable 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.mdTesting
pytestLicense
MIT License
Available Tools
5 toolscode_mapC
Generates a file tree and identifies key architectural files.
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| repo_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| repo_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | 7d | |
| repo_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
5 tool updates
v0.1.0- First observed
code_map - First observed
project_status - First observed
recent_activity - First observed
risk_scan - First observed
work_summary
TDQS
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.
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.
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.
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
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
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
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
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Related MCP Servers
- AlicenseAqualityDmaintenanceAnalyzes codebases from local directories, GitHub, and Azure DevOps, providing intelligent context to AI coding assistants through repository structure, critical files, and semantic maps.144MIT
- AlicenseAqualityBmaintenanceTurns any GitHub repository into your organisation's persistent context layer, enabling AI agents to read, search, and propose updates via pull requests.126MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to run automated daily code reviews, retrieve Markdown reports, and curate a project knowledge base across any Git repository.AGPL 3.0
- AlicenseNot gradedqualityAmaintenanceDeterministic, local-first repository context for coding agents. Maps an issue, prompt, or git diff to ranked files to read first, likely test commands, and review-risk notes—no API key required.19MIT
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/TamiShaks-2/git-context-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server