git-enhanced MCP server
✓ VerifiedProvides AI assistants with structured Git context for code reviews, commit analysis, branch management, and repository hygiene.
Also known as davidweb3-ctrl/mcp-git-enhanced, mcp-git-enhanced, @davidweb3-ctrl/mcp-git-enhanced
- Stars
- 1
- Tools
- 5
- Downloads, 30 days
- 224
- Latest version
- 1.0.1
- Last commit
- Jun 2, 2026
- License
- MIT
What is git-enhanced MCP?
git-enhanced provides AI assistants with structured Git context for code reviews, commit analysis, branch management, and repository hygiene. It exposes 5 tools, such as git_diff, git_log, git_branch.
Summary generated from the project's README
About git-enhanced MCP server
Helping open-source maintainers manage repositories is the primary function of git-enhanced. It provides AI coding assistants with structured Git context to perform tasks like code reviews, commit analysis, and branch management without requiring the assistant to execute broad shell commands. This server is designed for local repositories and runs as a read-oriented inspection tool that avoids destructive actions like pushing or rebasing.
Developers can set up the server locally using Node.js by pointing their MCP client, such as Claude Code, to the compiled index file. The toolset includes specific commands like git_diff for analyzing changes, git_log for reviewing history with filters for authors or dates, and git_status to check staged or untracked files. It also features git_branch for comparing branches and git_commit_analyze to inspect specific commit metadata and statistics.
By using these focused tools, maintainers can automate repository hygiene and release preparation. The server ensures security by running fixed subcommands through spawnSync and validating that the provided repository path is a valid Git repository before execution.
What you can do with it
- 1Conducting Pull Request reviewsAsk the assistant to compare a branch against master and identify risky files using diffs.
- 2Preparing release notesIdentify user-visible changes by reviewing the commit history with statistical output.
- 3Maintaining repository hygieneFind and suggest branches that are candidates for cleanup after a release.
- 4Investigating recent code changesLocate recent commits that have modified specific files in the source directory.
Written from the project's README. Every use case is checked against a quote from it.
How to install git-enhanced MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall git-enhanced MCP in Claude Code
$ claude mcp add --env 'YOUR_API_KEY=<YOUR_YOUR_API_KEY>' mcp-git-enhanced -- npx -y @davidweb3-ctrl/mcp-git-enhancedInstall git-enhanced MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp-git-enhanced": {
"command": "npx",
"args": [
"-y",
"@davidweb3-ctrl/mcp-git-enhanced"
],
"env": {
"YOUR_API_KEY": "<YOUR_YOUR_API_KEY>"
}
}
}
}Install git-enhanced MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp-git-enhanced": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@davidweb3-ctrl/mcp-git-enhanced"
],
"env": {
"YOUR_API_KEY": "<YOUR_YOUR_API_KEY>"
}
}
}
}Install git-enhanced MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp-git-enhanced","type":"stdio","command":"npx","args":["-y","@davidweb3-ctrl/mcp-git-enhanced"],"env":{"YOUR_API_KEY":"<YOUR_YOUR_API_KEY>"}}'Install git-enhanced MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp-git-enhanced": {
"command": "npx",
"args": [
"-y",
"@davidweb3-ctrl/mcp-git-enhanced"
],
"env": {
"YOUR_API_KEY": "<YOUR_YOUR_API_KEY>"
}
}
}
}Install git-enhanced MCP in Codex
$ codex mcp add mcp-git-enhanced --env 'YOUR_API_KEY=<YOUR_YOUR_API_KEY>' -- npx -y @davidweb3-ctrl/mcp-git-enhancedInstall git-enhanced MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp-git-enhanced] command = "npx" args = ["-y", "@davidweb3-ctrl/mcp-git-enhanced"] [mcp_servers.mcp-git-enhanced.env] YOUR_API_KEY = "<YOUR_YOUR_API_KEY>"
Install git-enhanced MCP in Gemini CLI
$ gemini mcp add -s user -e 'YOUR_API_KEY=<YOUR_YOUR_API_KEY>' mcp-git-enhanced npx -- -y @davidweb3-ctrl/mcp-git-enhancedInstall git-enhanced MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp-git-enhanced": {
"command": "npx",
"args": [
"-y",
"@davidweb3-ctrl/mcp-git-enhanced"
],
"env": {
"YOUR_API_KEY": "<YOUR_YOUR_API_KEY>"
}
}
}
}git-enhanced MCP tools 5
Detected from the READMEgit_diffgit_loggit_branchgit_statusgit_commit_analyze
| git_diff | — | |
| git_log | — | |
| git_branch | — | |
| git_status | — | |
| git_commit_analyze | — |
Configuration
YOUR_API_KEYRequiredSecretYour API key for the service
| Name | Description | |
|---|---|---|
| YOUR_API_KEY | Your API key for the service | RequiredSecret |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachabledavidweb3-ctrl/mcp-git-enhanced is public and reachablegithub.com/davidweb3-ctrl/mcp-git-enhanced ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-06-02github.com/davidweb3-ctrl/mcp-git-enhanced ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @davidweb3-ctrl/mcp-git-enhancedPass
- No critical advisory in the package or its dependencies99 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model5 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubMCP 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.
Available Tools
| 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. |
Installation
From Source
git clone https://github.com/davidweb3-ctrl/mcp-git-enhanced.git
cd mcp-git-enhanced
npm install
npm run build
Claude 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-enhanced
After 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:check
Project 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
git-enhanced MCP questions
How do I add git-enhanced MCP to Claude Code?
Run claude mcp add --env 'YOUR_API_KEY=<YOUR_YOUR_API_KEY>' mcp-git-enhanced -- npx -y @davidweb3-ctrl/mcp-git-enhanced in your terminal. Add --scope user to make it available in every project.
How do I add git-enhanced MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does git-enhanced MCP provide?
It exposes 5 tools, including git_diff, git_log, git_branch, git_status, git_commit_analyze.
What can this server do for code reviews?
It allows assistants to analyze diffs, review commit history, and inspect specific commits with metadata and statistics to help summarize changes.
Is it safe to use for destructive operations?
No, the server is designed as a read-oriented inspection tool and does not expose tools for destructive actions like branch deletion, reset, or pushing.
What are the system requirements?
You need Node.js version 18.0.0 or higher and Git must be installed and available in your PATH.