Version Control · Developer Tools

Git MCP Server logo

Git MCP Server

wty0512/git-mcp-server

A Model Context Protocol (MCP) server that provides tools for interacting with Git repositories. This server allows AI assistants and LLM agents to manage repositories, branches, commits, and files through a standardized interface without requiring direct filesystem or command-line access.

Install

npm install -g git-mcp-server

Client configuration

{
  "mcpServers": {
    "git": {
      "command": "git-mcp-server"
    }
  }
}
Author
@wty0512
Category
Version Control, Developer Tools
License
Apache-2.0
Updated
Oct 6, 2026

About Git MCP Server

It exposes Git operations as MCP resources and tools while maintaining proper security boundaries.

Features

  • Repository Information: Access basic Git repository information including current branch, status, and reference details

  • Repository Branches: List all branches in the repository with current branch indicator

  • Repository Remotes: List all configured remote repositories with their URLs

  • Repository Tags: List all tags in the repository with their references

  • File Content: Access content of specific files at a given Git reference

  • Directory Listing: View lists of files and directories at a specific path and reference

  • Diffs: Get differences between references, unstaged changes, or staged changes

  • Commit History: View detailed commit logs with author, date, and message information

  • File Blame: See line-by-line attribution showing which commit last modified each line

  • Commit Details: Access detailed information about specific commits including diff changes

Tools (30)

  • git_init

    Initialize a new Git repository at the specified path with options for bare repositories.

  • git_clone

    Clone a Git repository from a remote URL to a local path with branch and depth options.

  • git_status

    Get the current status of a Git repository including working directory and staging area changes.

  • git_branch_list

    List all branches in a repository with options to include remote branches.

  • git_branch_create

    Create a new branch with options for specifying the starting point and automatic checkout.

  • git_checkout

    Checkout a branch, tag, or commit with options to create a new branch during checkout.

  • git_branch_delete

    Delete a branch with options for force deletion of unmerged branches.

  • git_merge

    Merge a branch into the current branch with customizable commit messages and merge strategies.

  • git_add

    Stage files for commit with support for individual files or entire directories.

  • git_reset

    Unstage files from the staging area with options for specific files or all staged changes.

  • git_commit

    Commit staged changes with customizable commit messages, author information, and amend options.

  • git_diff_unstaged

    Get a diff of all unstaged changes in the working directory with options for specific files.

  • git_diff_staged

    Get a diff of all staged changes in the index with options for specific files.

  • git_reset_commit

    Reset the repository to a specific reference with options for hard, soft, or mixed mode.

  • git_clean

    Remove untracked files from the working tree with options for directories and force cleaning.

  • git_remote_add

    Add a new remote repository with a name and URL.

  • git_remote_list

    List all configured remote repositories and their URLs.

  • git_fetch

    Fetch updates from a remote repository with options for specific branches.

  • git_pull

    Pull changes from a remote repository with options for rebase strategy.

  • git_push

    Push local changes to a remote repository with options for force push and upstream tracking.

  • git_tag_create

    Create a new tag with options for annotated tags with messages.

  • git_tag_list

    List all tags in the repository with their references.

  • git_stash_create

    Stash changes in the working directory with options for untracked files and descriptions.

  • git_stash_list

    List all stashes in the repository with their descriptions.

  • git_stash_apply

    Apply a stashed change without removing it from the stash list.

  • git_stash_pop

    Apply a stashed change and remove it from the stash list.

  • git_cherry_pick

    Apply changes from specific commits to the current branch.

  • git_rebase

    Rebase the current branch onto another branch with interactive mode options.

  • git_log

    Get commit history with customizable output format and depth.

  • git_show

    Show detailed information about a specific commit including diff changes.

Details on this page are taken from the project's README. Open README

Related MCP servers

More servers
core logo

core

opensumi/core

3.3k

A framework helps you quickly build AI Native IDE products.

Version Control
test1 logo

test1

trpc-group/trpc-go

942

tRPC-Go, is the Go language implementation of tRPC, which is a pluggable, high-performance RPC framework.

Version Control
AI-Gateway logo

AI-Gateway

Azure-Samples/AI-Gateway

565

New! The AI Gateway Dev Portal is now live — A starting point for building your own developer portal on top of Azure API Management AI Gateway's. Fork it, open it in VS Code with GitHub Copilot (or any coding agent), and shape it to fit your needs!

Version Control
e2b logo

e2b

e2b-dev/mcp-server

233

Deprecated: This project is no longer actively maintained. It may not receive further updates or bug fixes.

Version Control
MCP Git Ingest logo

MCP Git Ingest

adhikasp/mcp-git-ingest

180

A Model Context Protocol (MCP) server that helps read GitHub repository structure and important files.

Version Control
gitlab mcp logo

gitlab mcp

zereight/gitlab-mcp

70

Documentation → Setup guides, environment variables, and the full tool reference live on the hosted docs site.

Version Control