Git MCP Server
The official reference MCP server for Git, exposing status, diff, commit, branch, log and checkout as MCP tools an agent can call directly on your local repository.
Overview
Git brings Git repository operations to any MCP client, one of the
official Model Context Protocol reference servers. It gives an agent tools to
read, search and manipulate a local repository: inspect history, stage
changes and manage branches without shelling out to raw git commands.
How it works
- Every tool takes a
repo_pathpointing at a local Git repository. - Read tools cover status, unstaged/staged diffs, diffs against a branch or commit, commit log with date filtering, showing a commit's contents, and listing branches (local, remote or all).
- Write tools cover staging files (
git_add), committing, resetting the staging area, creating branches and checking out branches. - The server is still in early development per its own README, so tools may change as the project evolves.
Examples
{
"mcpServers": {
"git": {
"command": "uvx",
"args": ["mcp-server-git", "--repository", "path/to/git/repo"]
}
}
}
Installation
You need uv (recommended) or Python with pip, and a local Git
repository to point it at.
- Add the server to your MCP client's config, passing
--repository path/to/git/repo(see the sidebar). - Restart your client.
- Ask the agent to check the git status or show a diff to confirm it can see your repository.
Related assets
Awesome MCP Servers
The largest community catalog of MCP servers: thousands of entries across dozens of categories (databases, browser automation, cloud, communication and more), tagged by language and scope.
Context7
Pulls updated, version-specific documentation and code examples straight from the source into your prompt, so agents stop citing outdated APIs or hallucinating ones that don't exist.
Playwright MCP
Microsoft's official MCP server for browser automation, driving Playwright through structured accessibility snapshots instead of screenshots, so any MCP client can browse, click and fill forms without a vision model.