Git repository interaction and automation.
10K+
12 Tools
Version 4.43 or later needs to be installed to add the server automatically
Use cases
About
Git repository interaction and automation.
| Attribute | Details |
|---|---|
| Docker Image | mcp/git |
| Author | modelcontextprotocol |
| Repository | https://github.com/modelcontextprotocol/servers |
| Dockerfile | https://github.com/modelcontextprotocol/servers/blob/2025.4.24/src/git/Dockerfile |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/git --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| Licence | MIT License |
| Tools provided by this Server | Short Description |
|---|---|
git_add | Adds file contents to the staging area |
git_checkout | Switches branches |
git_commit | Records changes to the repository |
git_create_branch | Creates a new branch from an optional base branch |
git_diff | Shows differences between branches or commits |
git_diff_staged | Shows changes that are staged for commit |
git_diff_unstaged | Shows changes in the working directory that are not yet staged |
git_init | Initialize a new Git repository |
git_log | Shows the commit logs |
git_reset | Unstages all staged changes |
git_show | Shows the contents of a commit |
git_status | Shows the working tree status |
git_addAdds file contents to the staging area
| Parameters | Type | Description |
|---|---|---|
files | array | |
repo_path | string |
git_checkoutSwitches branches
| Parameters | Type | Description |
|---|---|---|
branch_name | string | |
repo_path | string |
git_commitRecords changes to the repository
| Parameters | Type | Description |
|---|---|---|
message | string | |
repo_path | string |
git_create_branchCreates a new branch from an optional base branch
| Parameters | Type | Description |
|---|---|---|
branch_name | string | |
repo_path | string | |
base_branch | stringoptional |
git_diffShows differences between branches or commits
| Parameters | Type | Description |
|---|---|---|
repo_path | string | |
target | string |
git_diff_stagedShows changes that are staged for commit
| Parameters | Type | Description |
|---|---|---|
repo_path | string |
git_diff_unstagedShows changes in the working directory that are not yet staged
| Parameters | Type | Description |
|---|---|---|
repo_path | string |
git_initInitialize a new Git repository
| Parameters | Type | Description |
|---|---|---|
repo_path | string |
git_logShows the commit logs
| Parameters | Type | Description |
|---|---|---|
repo_path | string | |
max_count | integeroptional |
git_resetUnstages all staged changes
| Parameters | Type | Description |
|---|---|---|
repo_path | string |
git_showShows the contents of a commit
| Parameters | Type | Description |
|---|---|---|
repo_path | string | |
revision | string |
git_statusShows the working tree status
| Parameters | Type | Description |
|---|---|---|
repo_path | string |
{
"mcpServers": {
"git": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/local-directory:/local-directory",
"mcp/git"
]
}
}
}
Manual installation
You can install the MCP server using:
Installation for