home / mcp / git mcp server

Git MCP Server

Provides tools to read, search, and manipulate Git repositories via MCP.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "modelcontextprotocol-servers-git": {
      "command": "uvx",
      "args": [
        "mcp-server-git"
      ],
      "env": {
        "GITHUB_TOKEN": "ghp_xxx"
      }
    }
  }
}

You can run the Git MCP Server to access read, search, and manipulate Git repositories through a Model Context Protocol client. This enables your AI agents to interact with local or remote Git data in a structured, tool-based way, simplifying workflows that involve source control.

How to use

To use this MCP server with a client, configure your MCP client to connect to the server using an MCP tool that exposes Git capabilities. You will typically start the server locally and point your client at it, enabling operations like reading repository data, querying history, and performing common Git actions through natural language prompts.

How to install

Prerequisites you need before installing include a Python 3.x runtime and a tool to run MCP servers. You will also use a Python package manager or a transport runner to start the server as described in the steps below.

Install via uvx (recommended local workflow)

uvx mcp-server-git

Install via Python package (alternative)

# Install the MCP server package
pip install mcp-server-git

# Run the MCP server
python -m mcp_server_git

Configure your MCP client to use the Git server

Create or update your MCP client configuration to point to the Git server tool. The following example shows a minimal client setup referencing the Git MCP server.

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

Available tools

git

Tools to read, search, and manipulate Git repositories.