Git

Provides Git functionality via MCP to perform repositories, branches, remotes, and other version-control actions for LLMs and MCP clients.
  • typescript

0

GitHub Stars

typescript

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mcp-mirror-cyanheads_git-mcp-server": {
      "command": "node",
      "args": [
        "/path/to/git-mcp-server/build/index.js"
      ],
      "env": {
        "GIT_DEFAULT_PATH": "\"/optional/default/path/for/git/operations\""
      }
    }
  }
}

You can use the Git MCP Server to expose standard Git operations to language models and other MCP clients through a secure, standardized interface. This server enables LLMs to initialize repositories, clone, track changes, manage branches and remotes, and perform complex workflows with safety checks and structured error reporting.

How to use

You interact with the Git MCP Server through an MCP client that connects to the local or remote MCP endpoint. Use it to perform common Git workflows within a controlled environment. Typical patterns include creating a new repository, cloning an existing one, checking status, staging changes, committing, pushing to remotes, and managing branches, tags, and stashes. You can also execute bulk actions to run multiple Git operations in sequence while benefiting from defaults, error resilience, and clear messages when something goes wrong.

How to install

# Prerequisites
- Ensure Node.js is installed (recommended LTS version)
- Ensure npm is available

# 1. Clone the MCP Git server repository
git clone https://github.com/cyanheads/git-mcp-server.git

# 2. Navigate to the project directory
cd git-mcp-server

# 3. Install dependencies
npm install

# 4. Build the project
npm run build

Configuration and usage notes

Configure the MCP client to connect to the Git MCP Server using a local stdio configuration. The server runs as a local process and is started by invoking Node on the built entry file. You can optionally set a default path for Git operations to simplify workflows.

{
  "mcpServers": {
    "git": {
      "command": "node",
      "args": ["/path/to/git-mcp-server/build/index.js"],
      "env": {
        "GIT_DEFAULT_PATH": "/optional/default/path/for/git/operations"
      }
    }
  }
}

Additional notes

The server supports a comprehensive set of Git operations, including repository initialization, cloning, status checks, staging, commits, and remote management. It also provides bulk actions for sequential operations and safety features such as path validation and repository state verification. Ensure all paths used are absolute and that you validate repository state after operations.

Available tools

init

Initializes a new Git repository.

clone

Clones a repository to a specified path.

status

Retrieves the current status of a repository.

bulk_action

Executes multiple Git operations in sequence as a single action.

branch_list

Lists branches in the repository.

branch_create

Creates a new branch.

branch_delete

Deletes a branch.

checkout

Switches to a different branch or commit.

tag_list

Lists repository tags.

tag_create

Creates a new tag.

tag_delete

Deletes a tag.

remote_list

Lists remotes configured for the repository.

remote_add

Adds a new remote.

remote_remove

Removes an existing remote.

stash_list

Lists stash entries.

stash_save

Saves changes to a new stash.

stash_pop

Applies and removes the latest stash.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational