Git

Provides Git operations via MCP, including status, branches, diffs, logs, and remote interactions across repositories.
  • typescript

2

GitHub Stars

typescript

Language

4 months ago

First Indexed

2 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": {
    "danyelkirsch-git-mcp-server": {
      "command": "git-mcp-server",
      "args": []
    }
  }
}

You run a Git MCP Server to expose full Git functionality to MCP clients, with automatic project context detection and multi-repo support. It lets you query status, branches, diffs, logs, file contents, and pushes or fetches to remotes directly through MCP clients like Claude Desktop.

How to use

Once you have the server running and configured in your MCP client, you can perform common Git operations across your repositories without leaving your client. The server automatically detects the Git repository based on your current working directory, so you can work in any project folder and issue standard Git-like actions through your MCP client.

How to install

Prerequisites: you need Node.js 18+ and npm or yarn, plus Git installed on your system.

# Option 1: Global Installation (Recommended)
npm install -g git-mcp-server
# Option 2: Local Development Setup

# 1. Clone the project
git clone https://github.com/yourusername/git-mcp-server.git
cd git-mcp-server

# 2. Install dependencies
npm install

# 3. Build the project
npm run build

Configuration

Configure the MCP client to load the Git MCP Server. For Claude Desktop, add the server to the client configuration with the following structure.

{
  "mcpServers": {
    "git": {
      "command": "git-mcp-server",
      "args": []
    }
  }
}

Other MCP clients

If you are using an MCP client other than Claude Desktop, you can run the server directly from the command line. The server will automatically use the current working directory as the Git repository context.

git-mcp-server

Usage tips

With the server configured, you can issue a wide range of Git operations through your MCP client, including viewing status, diffing against branches, listing and switching branches, staging and committing changes, and synchronizing with remotes.

Testing the server locally

You can verify the server is accessible by starting it from within any Git repository and issuing queries through your MCP client.

cd /path/to/your/git/repo
git-mcp-server

Available operations (tools)

The server exposes a set of tools to inspect and manipulate Git state through MCP. These include commands to read repository information, inspect history, and manage branches and remotes.

Notes and best practices

  • Ensure Git is installed on the host machine where the server runs. - Keep Node.js updated to a supported version (18+). - If you run multiple repositories, the server will handle each context automatically based on where you run it. - For production scenarios, consider securing the server and restricting access to trusted MCP clients.

Security considerations

Only expose the MCP server to trusted clients and networks. Use appropriate authentication and network access controls where available. Regularly update dependencies to incorporate security fixes.

Troubleshooting

If the server does not detect a repository, verify you are in a valid Git repository directory and that Git is installed. Check that the MCP client is correctly configured to point to the Git MCP Server binary. Review any error responses from the MCP client for guidance on required permissions or context.

Available tools

git_status

Return the current working tree status, showing modified, added, and deleted files.

git_current_branch

Identify the active branch in the current repository.

git_staged_changes

List changes that are staged for the next commit.

git_working_directory

Provide information about the current working directory and repository context.

git_diff

Show differences between commits, branches, or the working tree.

git_log

Display commit history for the repository.

git_show_file

Display the contents of a file at a specific commit.

git_branches

List all branches in the repository.

git_checkout

Switch between branches or create a new branch.

git_add

Add files to the staging area for the next commit.

git_commit

Create commits with a message and selected files.

git_pull

Fetch and integrate changes from a remote repository.

git_fetch

Fetch changes from a remote repository without merging.

git_init

Initialize a new Git repository in the current directory.

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