Skip to main content
AgentsUse

MCP server, by Model Context Protocol

mcp-server-git

Python MCP server that lets a model inspect and change a local Git repository through a fixed set of Git tools.

stdio (local process)Checked 2026-10-07Config checked

Quick facts

Transport
stdio (local process)
Runs as
uvx (mcp-server-git)
Review state
Config checked against the official source. Facts checked 2026-10-07. Not locally tested by AgentsUse.

What it does

mcp-server-git wraps common Git operations for an MCP client. It reads status, diffs and logs, and can stage, commit, create branches and check out branches in a repository you point it at. The README notes the server is still in early development and that tool behavior may change.

The server runs with uvx, pip, or Docker. The Claude Desktop example passes a repository path with the --repository argument, while VS Code examples run it without a fixed repository and pass repo_path per tool call.

It requires MCP Python SDK 1.x. The README states SDK 2.0 renamed APIs this server uses and that a port is in progress.

Configuration

Run with uvx mcp-server-git and optionally pass --repository path/to/git/repo, or install with pip install mcp-server-git.

MCP config (placeholders)
{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": ["mcp-server-git", "--repository", "path/to/git/repo"]
    }
  }
}

Source: https://github.com/modelcontextprotocol/servers/tree/main/src/git. Placeholders only. Replace them in your own environment, and never commit real keys to a repository.

No environment variables are required per the official documentation.

Verified tools and features

  • git_status and git_log Config checked

    Shows working tree status and commit history with optional count and date range filters.

  • git_diff, git_diff_staged and git_diff_unstaged Config checked

    Shows unstaged changes, staged changes, or a diff against a branch or commit.

  • git_add and git_commit Config checked

    Stages listed files and records a commit with a supplied message.

  • git_create_branch, git_checkout and git_branch Config checked

    Creates and switches branches, and lists local, remote or all branches with optional contains filters.

Security notes

Security notes
  • Tools operate on local repositories passed as repo_path. The model can stage, commit, reset and check out branches, so use it on repositories where those changes are acceptable.
  • git_reset unstages staged changes. Review the target repository before enabling write tools.
  • No credentials or network remote operations such as push or fetch are listed in the README tool set.

An MCP server runs with the permissions of the process you start it from. Scope credentials to the narrowest access the job needs, and review what the client will send before connecting anything sensitive.

Stacks featuring this server

Sources and freshness

Last checked 2026-10-07. Verification label: config checked, which means the configuration and feature list trace to the official source above. It does not mean AgentsUse ran the server. Spotted an error? Send a correction. Back to the MCP server index.