Git (Reference)

Git (Reference)

Git repository interaction and automation.

10K+

24

12 Tools

Signed
Built by Docker
Requires Configuration
Add to Docker Desktop

Version 4.43 or later needs to be installed to add the server automatically

About

Git (Reference) MCP Server

Git repository interaction and automation.

What is an MCP Server?

Characteristics

AttributeDetails
Docker Imagemcp/git
Authormodelcontextprotocol
Repositoryhttps://github.com/modelcontextprotocol/servers
Dockerfilehttps://github.com/modelcontextprotocol/servers/blob/2025.4.24/src/git/Dockerfile
Docker Image built byDocker Inc.
Docker Scout Health ScoreDocker Scout Health Score
Verify SignatureCOSIGN_REPOSITORY=mcp/signatures cosign verify mcp/git --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub
LicenceMIT License

Available Tools (12)

Tools provided by this ServerShort Description
git_addAdds file contents to the staging area
git_checkoutSwitches branches
git_commitRecords changes to the repository
git_create_branchCreates a new branch from an optional base branch
git_diffShows differences between branches or commits
git_diff_stagedShows changes that are staged for commit
git_diff_unstagedShows changes in the working directory that are not yet staged
git_initInitialize a new Git repository
git_logShows the commit logs
git_resetUnstages all staged changes
git_showShows the contents of a commit
git_statusShows the working tree status

Tools Details

Tool: git_add

Adds file contents to the staging area

ParametersTypeDescription
filesarray
repo_pathstring

Tool: git_checkout

Switches branches

ParametersTypeDescription
branch_namestring
repo_pathstring

Tool: git_commit

Records changes to the repository

ParametersTypeDescription
messagestring
repo_pathstring

Tool: git_create_branch

Creates a new branch from an optional base branch

ParametersTypeDescription
branch_namestring
repo_pathstring
base_branchstringoptional

Tool: git_diff

Shows differences between branches or commits

ParametersTypeDescription
repo_pathstring
targetstring

Tool: git_diff_staged

Shows changes that are staged for commit

ParametersTypeDescription
repo_pathstring

Tool: git_diff_unstaged

Shows changes in the working directory that are not yet staged

ParametersTypeDescription
repo_pathstring

Tool: git_init

Initialize a new Git repository

ParametersTypeDescription
repo_pathstring

Tool: git_log

Shows the commit logs

ParametersTypeDescription
repo_pathstring
max_countintegeroptional

Tool: git_reset

Unstages all staged changes

ParametersTypeDescription
repo_pathstring

Tool: git_show

Shows the contents of a commit

ParametersTypeDescription
repo_pathstring
revisionstring

Tool: git_status

Shows the working tree status

ParametersTypeDescription
repo_pathstring

Use this MCP Server

{
  "mcpServers": {
    "git": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "/local-directory:/local-directory",
        "mcp/git"
      ]
    }
  }
}

Why is it safer to run MCP Servers with Docker?

Manual installation

You can install the MCP server using:

Installation for

Related servers