The Git MCP Server is an official Model Context Protocol server developed to provide AI engineering agents with programmatic access to local Git repositories. Rather than guessing repository state through manual terminal commands, AI assistants connect via structured MCP tools to inspect commit histories, examine staged diffs, create clean commits, and branch code with surgical precision.
Core Git Operations & Tools
git_status: Returns structured status of working directory, modified files, untracked assets, and staged changes.git_diff: Generates unified git diffs between working trees, staged files, or specific commit hashes.git_log: Retrieves chronological commit histories, author metadata, commit hashes, and detailed commit messages.git_commit: Creates atomic commits with structured commit messages adhering to Conventional Commits standards.git_show: Inspects full details, author timestamps, and file diffs for a specific commit hash.
Configuration & Setup
Add the Git MCP Server to your claude_desktop_config.json:
{
"mcpServers": {
"git": {
"command": "uvx",
"args": ["mcp-server-git", "--repository", "/path/to/git/repo"]
}
}
}
Frequently Asked Questions
Does Git MCP Server perform push or remote repository writes?
No. The core server focuses strictly on local repository operations (status, diff, log, commit). Remote pushes remain under explicit human developer control.
Can Git MCP Server read commit diffs across specific branches?
Yes. The git_diff tool allows specifying branch names or commit SHA ranges to compute exact code deltas.
Which AI clients support the Git MCP Server?
Any MCP-compliant host application, including Claude Desktop, Cursor, Roo Code, Cline, and Windsurf.