drio
Open app

Git Mcp

Source

MCP server for managing Git operations on local repositories. Fetching commit messages, git tags, creating new tags.

Catalog onlyCatalog onlySTDIO

Overview

Git MCP is a server designed for managing Git operations on local repositories, allowing users to fetch commit messages, manage git tags, and perform various Git-related tasks efficiently.

To use Git MCP, you can install it via Smithery or manually. After installation, configure the MCP server with the required environment variables and JSON configuration snippet, then utilize the available methods to manage your Git repositories.

  • List all Git repositories in a specified path. - Fetch the last Git tag from a repository. - List commit messages between the last tag and HEAD. - Create new Git tags with optional messages. - Push existing tags to the remote repository. - Checkout and pull the main branch from all remotes.
  1. Managing multiple Git repositories in a local environment.
  2. Automating the process of tagging and pushing changes to remote repositories.
  3. Simplifying the retrieval of commit history and tags for project documentation.

Add to your AI client

Use these steps to connect Git Mcp in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "git-mcp-kjozsa": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-git-mcp-kjozsa"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "git-mcp-kjozsa": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-git-mcp-kjozsa"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "git-mcp-kjozsa": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-git-mcp-kjozsa"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "git-mcp-kjozsa": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-git-mcp-kjozsa"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "git-mcp-kjozsa": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-git-mcp-kjozsa"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "git-mcp-kjozsa": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-git-mcp-kjozsa"
      ]
    }
  }
}

FAQ

How do I install Git MCP?

You can install Git MCP using the command `npx -y @smithery/cli install @kjozsa/git-mcp --client claude` or manually with `uvx install git-mcp`.

What environment variables do I need to set?

You need to set `GIT_REPOS_PATH` to the directory containing your Git repositories.

Can I run tests on Git MCP?

Yes! The project includes test scripts to verify the functionality of both the Git commands and the MCP server.