git
Officialby modelcontextprotocol·★ 85,748·Score 75
A comprehensive MCP server for Git operations with status viewing, diffing, commits, and branch management.
Overview
This MCP server provides extensive Git repository interaction tools through the Model Context Protocol. It offers a complete set of operations including checking repository status, viewing unstaged and staged changes, comparing branches or commits, creating commits, staging files, resetting changes, browsing commit logs, creating and checking out branches, and examining commit contents. The server supports both local repository paths and Docker configurations, making it flexible for different development environments.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this server when you need comprehensive Git operations through an MCP interface, particularly if you're already using TypeScript or prefer a tool with extensive documentation and multiple installation options.
When NOT to choose this
Don't choose this if you need advanced Git features like remote repository management or submodule operations that aren't covered by the current tool set.
Tools this server exposes
12 tools extracted from the READMEgit_statusrepo_path: stringShows the working tree status
git_diff_unstagedrepo_path: string, context_lines?: numberShows changes in working directory not yet staged
git_diff_stagedrepo_path: string, context_lines?: numberShows changes that are staged for commit
git_diffrepo_path: string, target: string, context_lines?: numberShows differences between branches or commits
git_commitrepo_path: string, message: stringRecords changes to the repository
git_addrepo_path: string, files: string[]Adds file contents to the staging area
git_resetrepo_path: stringUnstages all staged changes
git_logrepo_path: string, max_count?: number, start_timestamp?: string, end_timestamp?: stringShows the commit logs with optional date filtering
git_create_branchrepo_path: string, branch_name: string, base_branch?: stringCreates a new branch
git_checkoutrepo_path: string, branch_name: stringSwitches branches
git_showrepo_path: string, revision: stringShows the contents of a commit
git_branchrepo_path: string, branch_type: string, contains?: string, not_contains?: stringList Git branches
Comparable tools
Installation
Using uv (recommended)
When using [uv](https://docs.astral.sh/uv/) no specific installation is needed. Use [uvx](https://docs.astral.sh/uv/guides/tools/) to directly run the server:
uvx mcp-server-git --repository path/to/git/repoUsing PIP
Alternatively you can install mcp-server-git via pip:
pip install mcp-server-gitAfter installation, run it as:
python -m mcp_server_gitClaude Desktop Configuration
Add to your claude_desktop_config.json:
"mcpServers": {
"git": {
"command": "uvx",
"args": ["mcp-server-git", "--repository", "path/to/git/repo"]
}
}FAQ
- Can I use this server with remote repositories?
- Currently, the server is designed to work with local Git repositories. You would need to clone the repository locally first.
- Does it support authentication for private repositories?
- The server itself doesn't handle authentication. You would need to ensure your local Git environment is properly configured with credentials for private repositories.
On Hacker News
Recent discussion from the developer community.
- Story by vinnyglennon · 2025-03-20
Compare git with
Last updated · Auto-generated from public README + GitHub signals.