Provides tools to read, compare, and modify Git repositories via MCP with local or containerized execution
Configuration
View docs{
"mcpServers": {
"git_uvx": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"path/to/git/repo"
]
}
}
}You can interact with Git repositories through this MCP server to read, search, and manipulate code using large language models. It exposes a set of Git-focused tools that let you inspect status, view diffs, commit changes, manage branches, and more, all via MCP client requests.
Connect to the MCP server from your MCP client and choose the Git MCP server configuration that matches how you want to run it. You can perform operations like checking the working tree status, viewing diffs for unstaged or staged changes, creating and switching branches, and inspecting commit history. Use the available tools to read repository state, apply changes, and verify results before finalizing commits.
Choose an execution method that fits your environment. The server can be run locally using UVX, Python, or Docker.
The MCP server provides a range of tools designed for Git repository interaction and automation. When configuring your client, you can point to a local repository and execute common Git operations through these endpoints. For debugging, you can inspect server logs or use debugging utilities to verify behavior during development and integration.
Shows the working tree status for the repository at the given path.
Displays changes in the working directory that have not yet been staged, with optional context lines.
Shows changes that have been staged for commit, with optional context lines.
Compares differences between the current state and a target branch or commit, with optional context lines.
Records changes to the repository with a commit message and returns the new commit hash.
Adds specified files to the staging area for the next commit.
Unstages all changes that have been staged.
Shows commit logs with optional filtering by count and timestamps.
Creates a new branch from a base branch or the current branch.
Switches the working tree to the specified branch.
Shows the contents of a specific commit revision.
Lists local, remote, or all branches with optional constraints on contained commits.