Official MCP reference server with tools to read, search and manipulate local Git repositories, such as status, diff and commit.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add git -- uvx mcp-server-git --repository path/to/git/repo~/.codex/config.toml
[mcp_servers.git]
command = "uvx"
args = ["mcp-server-git", "--repository", "path/to/git/repo"]
# codex mcp add git -- uvx mcp-server-git --repository path/to/git/repo~/.cursor/mcp.json
{
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"path/to/git/repo"
]
}
}
}.vscode/mcp.json
{
"servers": {
"git": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"path/to/git/repo"
]
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"path/to/git/repo"
]
}
}
}claude_desktop_config.json
{
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"path/to/git/repo"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"git": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"path/to/git/repo"
]
}
}
}