Git MCP Server

By thumbsupordown

Official MCP reference server that lets a language model read, search, and manipulate a local Git repository — status, diffs, commits, branches, and history.

Install Git

Published by
Official (vendor)
Transport
Local process (stdio)
Authentication
None
Package
mcp-server-git

Claude Desktop, Claude Code and Cursor

Add this to the mcpServers object in your client's config file, then restart the client.

{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "path/to/git/repo"
      ]
    }
  }
}
VS Code uses a different key — show that config

Identical entry, filed under servers rather than mcpServers. Put it in .vscode/mcp.json for one workspace.

{
  "servers": {
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "path/to/git/repo"
      ]
    }
  }
}

Before it will answer

Python rather than Node, so it is launched with uvx. Scoped to the repository you pass.

Documentation ↗ Source ↗ Config checked against vendor docs August 25, 2026 · how we verify

Tools

git_add

Stage the specified file contents so they will be included in the next commit.

git_branch

List local, remote, or all branches in the repository, with optional name filtering.

git_checkout

Switch the working directory over to a different existing branch.

git_commit

Record the currently staged changes to the repository with the provided commit message.

git_create_branch

Create a new branch starting from a specified base branch or commit.

git_diff

Show the differences between arbitrary branches or commits in the repository.

git_diff_staged

Show the diff of changes that have been staged and are ready to be committed.

git_diff_unstaged

Show the diff of changes in the working directory that have not yet been staged for commit.

git_log

Show the repository's commit history, with optional filtering by a date range.

git_reset

Unstage all currently staged changes, leaving the working directory contents untouched.

git_show

Display the contents, metadata, and diff of a specific commit in the repository.

git_status

Show the current working tree status of the repository, including staged and unstaged changes.

Want to create your own MCP server?

Create an account to add and manage your own MCP servers.