@modelcontextprotocol/server-git
Anthropic's official reference MCP server for Git repository operations. Gives agents the ability to read git history, diffs, branches, and file contents directly from local repositories.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Local file access only — no external network calls for read operations. Repository scope limited to configured path. History may contain secrets in old commits — agents can read them.
⚡ Reliability
Best When
Your agent needs to reason about local git repository history and changes. Pairs naturally with mcp-server-filesystem for read-then-diff workflows.
Avoid When
You need to interact with GitHub's platform features (PRs, issues, CI/CD) — the GitHub MCP server is better for that.
Use Cases
- • Agents reading git log and commit history to understand code evolution
- • Code review assistance — agent reads git diff before providing feedback
- • Tracking which files changed in recent commits for focused analysis
- • Comparing branches to identify divergences before merge decisions
- • Searching git history for when a specific change was introduced
Not For
- • GitHub-specific operations (PRs, issues, Actions) — use github-mcp-official for those
- • Pushing changes to remote — this is a read-focused implementation
- • Non-git version control systems (SVN, Mercurial, etc.)
Interface
Authentication
No authentication for local git operations. For remote operations (fetch, pull), uses the git credential manager configured on the host system.
Pricing
MIT licensed, free. Requires Python runtime and git installed on the host.
Agent Metadata
Known Gotchas
- ⚠ Repository path must be configured at startup — agents cannot change working directory
- ⚠ Large diffs (thousands of lines) returned in full — can exceed context window
- ⚠ Binary files in diffs shown as 'Binary file changed' — no content available
- ⚠ Merge commits show combined diff by default — may confuse agents expecting linear history
- ⚠ Submodules not automatically traversed — agent sees submodule commit hash, not contents
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for @modelcontextprotocol/server-git.
Scores are editorial opinions as of 2026-03-06.