Enhanced Git MCP Server - Code review, commit analysis, and branch management
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.
Open-source maintainers spend a lot of time answering the same repository questions before they can review or merge work:
This server exposes those workflows as focused MCP tools so assistants can help with PR review, issue triage, release management, and repository hygiene.
| Tool | Purpose |
|---|---|
git_diff | Analyze working tree, staged, branch, commit, or path-specific diffs. |
git_log | Review commit history with filters for author, date range, branch, path, and stats. |
git_branch | List branches, compare a branch to its base, or suggest cleanup candidates. |
git_status | Summarize staged, unstaged, and untracked repository state. |
git_commit_analyze | Inspect one commit with metadata, changed files, statistics, and diff output. |
git clone https://github.com/davidweb3-ctrl/mcp-git-enhanced.git
cd mcp-git-enhanced
npm install
npm run build
Use the built server from this repository:
{
"mcpServers": {
"git-enhanced": {
"command": "node",
"args": ["/absolute/path/to/mcp-git-enhanced/dist/index.js"]
}
}
}
The package is published as @davidweb3-ctrl/mcp-git-enhanced:
npm install -g @davidweb3-ctrl/mcp-git-enhanced
After publication, clients can use:
{
"mcpServers": {
"git-enhanced": {
"command": "npx",
"args": ["@davidweb3-ctrl/mcp-git-enhanced"]
}
}
}
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.
Use git_log to find recent commits touching src/tools.ts.
Use git_status to check whether the local reproduction has uncommitted changes.
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.
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"
}
MCP Git Enhanced is designed as a read-oriented repository inspection server.
git subcommands through spawnSync without shell interpolation.repoPath points to a Git repository before executing tool handlers.See SECURITY.md for reporting and supported-version details.
npm install
npm run build
npm test
npm run lint
npm run format:check
PATHMIT
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @davidweb3-ctrl/mcp-git-enhancedMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-davidweb3-ctrl-mcp-git-enhanced": {
"command": "npx",
"args": [
"-y",
"@davidweb3-ctrl/mcp-git-enhanced"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup reference@davidweb3-ctrl/mcp-git-enhancednpmio.github.davidweb3-ctrl/mcp-git-enhanced works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.