MCP Git Enhanced
Enables comprehensive Git repository operations including code diff analysis between commits or branches, commit history analysis with filtering, branch management with cleanup suggestions, repository status overview, and detailed commit inspection.
Click on "Deploy 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., "@MCP Git Enhanced show me the diff between main and the feature branch"
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.
MCP Git Enhanced
MCP Git Enhanced is a Model Context Protocol server that helps AI coding assistants inspect repository state for day-to-day open-source maintenance.
It gives maintainers structured Git context for code review, commit analysis, branch comparison, and release preparation without asking the assistant to run broad shell commands.
Why Maintainers Use It
Open-source maintainers spend a lot of time answering the same repository questions before they can review or merge work:
What changed in this branch?
Which commits matter for the release notes?
Is this branch behind the base branch?
What is staged, unstaged, or untracked?
Which merged or stale branches need cleanup?
This server exposes those workflows as focused MCP tools so assistants can help with PR review, issue triage, release management, and repository hygiene.
Related MCP server: pr-mcp-server
Available Tools
Tool | Purpose |
| Analyze working tree, staged, branch, commit, or path-specific diffs. |
| Review commit history with filters for author, date range, branch, path, and stats. |
| List branches, compare a branch to its base, or suggest cleanup candidates. |
| Summarize staged, unstaged, and untracked repository state. |
| Inspect one commit with metadata, changed files, statistics, and diff output. |
Installation
From Source
git clone https://github.com/davidweb3-ctrl/mcp-git-enhanced.git
cd mcp-git-enhanced
npm install
npm run buildClaude Code Configuration
Use the built server from this repository:
{
"mcpServers": {
"git-enhanced": {
"command": "node",
"args": ["/absolute/path/to/mcp-git-enhanced/dist/index.js"]
}
}
}Future npm Install
The package is published as @davidweb3-ctrl/mcp-git-enhanced:
npm install -g @davidweb3-ctrl/mcp-git-enhancedAfter publication, clients can use:
{
"mcpServers": {
"git-enhanced": {
"command": "npx",
"args": ["@davidweb3-ctrl/mcp-git-enhanced"]
}
}
}Example Workflows
PR Review
Use git_diff to compare this branch with master and summarize the risky files.
Use git_log to list commits since the last release.
Use git_commit_analyze on the largest commit before I review it.Issue Triage
Use git_log to find recent commits touching src/tools.ts.
Use git_status to check whether the local reproduction has uncommitted changes.Release Management
Use git_branch compare against master to prepare release notes.
Use git_log with --stat style output to identify user-visible changes.
Use git_branch suggest_cleanup after the release branch is merged.Tool Examples
git_diff
{
"repoPath": "/absolute/path/to/repo",
"target": "HEAD~5",
"source": "HEAD~10",
"filePath": "src/",
"staged": false
}git_log
{
"repoPath": "/absolute/path/to/repo",
"maxCount": 20,
"author": "Maintainer Name",
"since": "1 week ago",
"stat": true
}git_branch
{
"repoPath": "/absolute/path/to/repo",
"action": "list",
"includeRemote": true
}{
"repoPath": "/absolute/path/to/repo",
"action": "compare",
"branchName": "feature/pr-review-summary",
"baseBranch": "master"
}git_status
{
"repoPath": "/absolute/path/to/repo",
"short": false
}git_commit_analyze
{
"repoPath": "/absolute/path/to/repo",
"commitHash": "abc123"
}Security Model
MCP Git Enhanced is designed as a read-oriented repository inspection server.
It runs fixed
gitsubcommands throughspawnSyncwithout shell interpolation.It does not expose destructive branch deletion, reset, checkout, rebase, push, or force-push tools.
It validates that
repoPathpoints to a Git repository before executing tool handlers.It is intended for local repositories controlled by the user or maintainer.
See SECURITY.md for reporting and supported-version details.
Development
npm install
npm run build
npm test
npm run lint
npm run format:checkProject Files
CONTRIBUTING.md: development setup and contribution process.
SECURITY.md: vulnerability reporting and trust boundaries.
ROADMAP.md: planned maintainer workflows and release direction.
CHANGELOG.md: release notes.
docs/CODEX_FOR_OSS.md: Codex for Open Source maintenance plan.
Requirements
Node.js >= 18.0.0
Git installed and available in
PATH
License
MIT
Available Tools
5 toolsgit_branchB
Manage and analyze git branches. Provides branch listing, comparison, and management suggestions.
Inputs: repoPath (required), action (required), branchName, baseBranch, +1 more.
git_commit_analyzeB
Analyze a specific commit in detail including changed files, statistics, and impact.
Inputs: repoPath (required), commitHash.
git_diffB
Analyze code changes between commits, branches, or working directory. Provides detailed diff analysis with statistics and file categorization.
Inputs: repoPath (required), target, source, filePath, +1 more.
git_logC
Analyze commit history with filtering and statistics. Provides insights into commit patterns, contributors, and code evolution.
Inputs: repoPath (required), maxCount, author, since, +5 more.
git_statusC
Get comprehensive repository status including staged, unstaged, and untracked files.
Inputs: repoPath (required), short.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct aspect of git: branches, commits, diffs, log history, and repository status. No functional overlap exists.
All tools follow 'git_' prefix with descriptive nouns, but 'git_commit_analyze' deviates slightly from the single-noun pattern of the others.
Five tools cover essential analysis operations without being excessive or insufficient for the server's stated analytical focus.
Tools provide broad analysis coverage but lack creation or modification operations (e.g., no commit creation, branch creation beyond suggestions), leaving notable gaps for full git workflows.
Maintenance
Related MCP Connectors
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
A MCP server built for developers enabling Git based project management with project and personal…
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- FlicenseBqualityDmaintenanceThe Git MCP Server allows AI assistants to perform enhanced Git operations via the Model Context Protocol, supporting core Git functions, branch and tag management, GitHub integration, and more.216-
- AlicenseAqualityDmaintenanceMCP server to automate Pull Request creation with AI. Analyzes Git branches, generates descriptions, titles, suggests reviewers, and performs code reviews.84MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides tools for interacting with Git repositories, enabling AI assistants to manage repositories, branches, commits, and files through a standardized interface.1Apache 2.0
- AlicenseDqualityDmaintenanceMCP server for managing Git reference repositories, enabling AI assistants to add, load, and sync reference code from any Git repository.128 npmMIT