Git MCP server
MIT
Read, search and manipulate Git repositories: inspect history and diffs, stage changes and commit from the conversation.
At a glance
Git is the official MCP reference server in the Dev Tools & Git category. It runs locally over stdio via `uvx mcp-server-git`, and declares no required credentials. It exposes 12 tools, including git_status, git_diff_unstaged and git_diff_staged. It scores A (93/100) on the MCP Skills Hub health score as of Oct 27, 2026.
One-click install
Opens your editor and pre-fills the config. Your editor will ask before adding it.
How to install Git in your AI client
Setup for Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline and VS Code — copy-paste ready.
How to install Git in Claude CodeAnthropic's agentic CLI
Add the server
bashclaude mcp add git -- uvx mcp-server-gitVerify it's connected
bashclaude mcp listSharing it with your team?
Add `--scope project` to write it to .mcp.json in the repository root, which you can commit (with the secrets left as environment variables).
Use it in a session
Ask Claude to use the tools this server exposes (e.g. git_status, git_diff_unstaged, git_diff_staged). It discovers them automatically.
How to install Git in Claude DesktopDesktop app (MCP config)
Open your MCP config
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json
Add this server
json{ "mcpServers": { "git": { "command": "uvx", "args": [ "mcp-server-git" ] } } }Restart Claude Desktop
The tools appear under the 🔌 menu once the app reloads.
How to install Git in CursorAI-first code editor
Create / edit .cursor/mcp.json in your project
json{ "mcpServers": { "git": { "command": "uvx", "args": [ "mcp-server-git" ] } } }Enable it
Cursor Settings → MCP → toggle the server on. Tools become available to the Composer/Agent.
How to install Git in Codex CLIOpenAI coding agent
Add to ~/.codex/config.toml
toml[mcp_servers.git] command = "uvx" args = ["mcp-server-git"]Run Codex
Codex loads MCP servers from config.toml on startup and exposes their tools to the agent.
How to install Git in WindsurfCodeium's agentic IDE
Edit ~/.codeium/windsurf/mcp_config.json
json{ "mcpServers": { "git": { "command": "uvx", "args": [ "mcp-server-git" ] } } }Reload
Windsurf → Cascade → refresh MCP servers. Cascade can now call the tools.
How to install Git in ClineVS Code autonomous agent
Open Cline → MCP Servers → Configure
Adds to cline_mcp_settings.json.
Add the server
json{ "mcpServers": { "git": { "command": "uvx", "args": [ "mcp-server-git" ] } } }
How to install Git in VS CodeCopilot / MCP support
Create .vscode/mcp.json
json{ "servers": { "git": { "type": "stdio", "command": "uvx", "args": [ "mcp-server-git" ] } } }Start it
VS Code shows a ▶ Start action above the server entry. Agent mode (Copilot Chat) can then use the tools.
What tools does Git expose? (12)
Taken from the project's README — the server itself was not queried, so check its docs for the exact schemas.
- git_statusShows the working tree status
- git_diff_unstagedShows changes in working directory not yet staged
- git_diff_stagedShows changes that are staged for commit
- git_diffShows differences between branches or commits
- git_commitRecords changes to the repository
- git_addAdds file contents to the staging area
- git_resetUnstages all staged changes
- git_logShows the commit logs with optional date filtering
- git_create_branchCreates a new branch
- git_checkoutSwitches branches
- git_showShows the contents of a commit, or of a file or directory at a revision
- git_branchList Git branches
What the code can do
Source analysis currently covers npm packages only. This server ships as a Python package, which needs a different parser.
Before you install
Signals gathered from the source repo and package registry — not a safety verdict.
What it can reach
- Runs code on your machine — Executes as a local process with your user's permissions, including filesystem access.
- Downloads at launch — The package is fetched from its registry each run unless you pin a version.
- Last commit today — Actively maintained.
- 92k GitHub stars — Community adoption signal.
Client compatibility
Health score
A · 93Maintenance, adoption, transparency and packaging — not a safety audit. How this is calculated
- Maintenance30%100%
Last commit 0 days ago.
- Adoption20%100%
91630 stars.
- Transparency20%100%
4/4: ✓ public source repo, ✓ declared license, ✓ documentation, ✓ discoverable tool list.
- Provenance15%100%
Official reference implementation, maintained by the MCP steering group.
- Packaging15%50%
No pinned version — installs resolve to whatever is latest at launch.
Documentation
Full READMEmcp-server-git: A git MCP server
Overview
A Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.
Source: https://github.com/modelcontextprotocol/servers/tree/main/src/git
Requires MCP Python SDK 2.x (mcp>=2.3,<3). The server is built on the SDK's high-level MCPServer: each tool is a typed Python function, and the SDK derives its input schema from the signature.
Please note that mcp-server-git is currently in early development. The functionality and available tools are subject to change and expansion as we continue to develop and improve the server.
Tools
git_status- Shows the working tree status
- Input:
repo_path(string): Path to Git repository- Returns: Current status of working directory as text output
git_diff_unstaged- Shows changes in working directory not yet staged
- Inputs:
repo_path(string): Path to Git repositorycontext_lines(number, optional): Number of context lines to show (default: 3)- Returns: Diff output of unstaged changes
git_diff_staged- Shows changes that are staged for commit
- Inputs:
repo_path(string): Path to Git repositorycontext_lines(number, optional): Number of context lines to show (default: 3)- Returns: Diff output of staged changes
git_diff- Shows differences between branches or commits
- Inputs:
repo_path(string): Path to Git repositorytarget(string): Target branch or commit to compare withcontext_lines(number, optional): Number of context lines to show (default: 3)- Returns: Diff output comparing current state with target
git_commit- Records changes to the repository
- Inputs:
repo_path(string): Path to Git repositorymessage(string): Commit message- Returns: Confirmation with new commit hash; an error if nothing is staged (as
git commitwithout--allow-empty), except while a merge is in progress (MERGE_HEADpresent), where git also allows an empty commit. While a merge is in progress the commit concludes it: its parents areHEADand everyMERGE_HEADcommit, and the merge state is cleared
git_add- Adds file contents to the staging area
- Inputs:
repo_path(string): Path to Git repositoryfiles(string[]): Non-empty array of file paths to stage;["."]stages everything- Returns: Confirmation of staged files, or a message saying nothing was staged when the call left the index unchanged
git_reset- Unstages all staged changes
- Input:
repo_path(string): Path to Git repository- Returns: Confirmation of reset operation
Excerpt — the full document is on GitHub.
Alternatives to Git
- Paparats MCP: Self-Hosted Semantic Code SearchA · 84Self-hosted semantic code search MCP for Claude Code & Cursor. Multi-repo, AST-aware, stays local.
- Obsidian Semantic SearchA · 80Read-only semantic search MCP server for Obsidian vaults using local Ollama embeddings.
- memory-search-mcpB · 71Memory Search MCP Server by MEOK AI Labs
- Kalshi EyeB · 76Search Kalshi, Polymarket and Limitless markets, order book history, coverage and data files.
Maintain Git? Add a badge to your README
Shows its health grade, and links readers to install steps for every client.
[](https://mcp-skills-hub.vercel.app/mcps/official-git)Catalog data refreshed . Something wrong? Report it.