Skip to content

MCP setupGit and releases

Git MCP Server

Give your agent structured git tools for status, diffs, logs, branches and commits through the reference mcp-server-git, fenced to one repository.

npx workspacetemplates add git-mcp --tool claude-code

Writes 1 file to your project root

.mcp.jsonmerge into your file12 lines · 155 BFile
{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "."
      ]
    }
  }
}

What it does

mcp-server-git is the reference Git server from the Model Context Protocol project. It exposes tools such as git_status, git_diff, git_log, git_show, git_branch and git_commit, so an agent can inspect and stage work without shelling out.

It runs locally through uvx and needs no account. The --repository flag confines it to the working tree you name, which is worth setting so the agent cannot wander into other clones on the disk.

Example

you › Show the staged diff and write a one-line commit message in the imperative.

agent › Staged: 3 files, +42 -7, all in src/billing. Suggested message: "Round invoice totals before applying tax". Nothing was committed.

Questions

Do I need Python installed?
You need uv, which provides uvx. It fetches mcp-server-git on first run. Git 2.31 or newer must be on the PATH.
Can it push to a remote?
The tool list has no push. It lists remotes with credentials hidden, and commits stay local until you push yourself.
Why keep the --repository flag?
Without it the server can act on any repository it can reach. Pinning it to the current folder limits what a bad prompt can touch.
  • GitHub MCP Server

    MCP setupGit and releases

    Free
  • GitLab MCP Server

    MCP setupGit and releases

    Free
  • Git Bisect Regression

    SkillGit and releases

    Free
  • Git Conflict Resolution

    SkillGit and releases

    Free