{
  "markdown": "# MCP Git Enhanced\n\n[![CI](https://github.com/davidweb3-ctrl/mcp-git-enhanced/actions/workflows/ci.yml/badge.svg)](https://github.com/davidweb3-ctrl/mcp-git-enhanced/actions/workflows/ci.yml)\n[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n[![MCP](https://img.shields.io/badge/MCP-Git%20maintenance-6f42c1)](https://modelcontextprotocol.io/)\n\nMCP Git Enhanced is a Model Context Protocol server that helps AI coding assistants inspect repository state for day-to-day open-source maintenance.\n\nIt gives maintainers structured Git context for code review, commit analysis, branch comparison, and release preparation without asking the assistant to run broad shell commands.\n\n## Why Maintainers Use It\n\nOpen-source maintainers spend a lot of time answering the same repository questions before they can review or merge work:\n\n- What changed in this branch?\n- Which commits matter for the release notes?\n- Is this branch behind the base branch?\n- What is staged, unstaged, or untracked?\n- Which merged or stale branches need cleanup?\n\nThis server exposes those workflows as focused MCP tools so assistants can help with PR review, issue triage, release management, and repository hygiene.\n\n## Available Tools\n\n| Tool | Purpose |\n| --- | --- |\n| `git_diff` | Analyze working tree, staged, branch, commit, or path-specific diffs. |\n| `git_log` | Review commit history with filters for author, date range, branch, path, and stats. |\n| `git_branch` | List branches, compare a branch to its base, or suggest cleanup candidates. |\n| `git_status` | Summarize staged, unstaged, and untracked repository state. |\n| `git_commit_analyze` | Inspect one commit with metadata, changed files, statistics, and diff output. |\n\n## Installation\n\n### From Source\n\n```bash\ngit clone https://github.com/davidweb3-ctrl/mcp-git-enhanced.git\ncd mcp-git-enhanced\nnpm install\nnpm run build\n```\n\n### Claude Code Configuration\n\nUse the built server from this repository:\n\n```json\n{\n  \"mcpServers\": {\n    \"git-enhanced\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/mcp-git-enhanced/dist/index.js\"]\n    }\n  }\n}\n```\n\n### Future npm Install\n\nThe package is published as `@davidweb3-ctrl/mcp-git-enhanced`:\n\n```bash\nnpm install -g @davidweb3-ctrl/mcp-git-enhanced\n```\n\nAfter publication, clients can use:\n\n```json\n{\n  \"mcpServers\": {\n    \"git-enhanced\": {\n      \"command\": \"npx\",\n      \"args\": [\"@davidweb3-ctrl/mcp-git-enhanced\"]\n    }\n  }\n}\n```\n\n## Example Workflows\n\n### PR Review\n\n```text\nUse git_diff to compare this branch with master and summarize the risky files.\nUse git_log to list commits since the last release.\nUse git_commit_analyze on the largest commit before I review it.\n```\n\n### Issue Triage\n\n```text\nUse git_log to find recent commits touching src/tools.ts.\nUse git_status to check whether the local reproduction has uncommitted changes.\n```\n\n### Release Management\n\n```text\nUse git_branch compare against master to prepare release notes.\nUse git_log with --stat style output to identify user-visible changes.\nUse git_branch suggest_cleanup after the release branch is merged.\n```\n\n## Tool Examples\n\n### `git_diff`\n\n```json\n{\n  \"repoPath\": \"/absolute/path/to/repo\",\n  \"target\": \"HEAD~5\",\n  \"source\": \"HEAD~10\",\n  \"filePath\": \"src/\",\n  \"staged\": false\n}\n```\n\n### `git_log`\n\n```json\n{\n  \"repoPath\": \"/absolute/path/to/repo\",\n  \"maxCount\": 20,\n  \"author\": \"Maintainer Name\",\n  \"since\": \"1 week ago\",\n  \"stat\": true\n}\n```\n\n### `git_branch`\n\n```json\n{\n  \"repoPath\": \"/absolute/path/to/repo\",\n  \"action\": \"list\",\n  \"includeRemote\": true\n}\n```\n\n```json\n{\n  \"repoPath\": \"/absolute/path/to/repo\",\n  \"action\": \"compare\",\n  \"branchName\": \"feature/pr-review-summary\",\n  \"baseBranch\": \"master\"\n}\n```\n\n### `git_status`\n\n```json\n{\n  \"repoPath\": \"/absolute/path/to/repo\",\n  \"short\": false\n}\n```\n\n### `git_commit_analyze`\n\n```json\n{\n  \"repoPath\": \"/absolute/path/to/repo\",\n  \"commitHash\": \"abc123\"\n}\n```\n\n## Security Model\n\nMCP Git Enhanced is designed as a read-oriented repository inspection server.\n\n- It runs fixed `git` subcommands through `spawnSync` without shell interpolation.\n- It does not expose destructive branch deletion, reset, checkout, rebase, push, or force-push tools.\n- It validates that `repoPath` points to a Git repository before executing tool handlers.\n- It is intended for local repositories controlled by the user or maintainer.\n\nSee [SECURITY.md](SECURITY.md) for reporting and supported-version details.\n\n## Development\n\n```bash\nnpm install\nnpm run build\nnpm test\nnpm run lint\nnpm run format:check\n```\n\n## Project Files\n\n- [CONTRIBUTING.md](CONTRIBUTING.md): development setup and contribution process.\n- [SECURITY.md](SECURITY.md): vulnerability reporting and trust boundaries.\n- [ROADMAP.md](ROADMAP.md): planned maintainer workflows and release direction.\n- [CHANGELOG.md](CHANGELOG.md): release notes.\n- [docs/CODEX_FOR_OSS.md](docs/CODEX_FOR_OSS.md): Codex for Open Source maintenance plan.\n\n## Requirements\n\n- Node.js >= 18.0.0\n- Git installed and available in `PATH`\n\n## License\n\nMIT\n",
  "bytes": 5023,
  "sha": "884b54010c118f5d8377419366837909c5923418d66553c19f1b34bf7045b205",
  "repo_slug": "davidweb3-ctrl/mcp-git-enhanced",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_davidweb3_ctrl_git_enhanced_db489d39/readme"
}