developer-tools

Git

by kjozsa

Create a local git repo easily with Git MCP: manage repositories, handle tags, and refresh repos without shell access.

Provides Git operations for local repositories, enabling repository management, tag handling, and repository refreshing without direct shell access.

github stars

3

No shell access requiredConfigurable repository path

best for

  • / Developers managing multiple local Git repositories
  • / Release management and versioning workflows
  • / Code review and commit tracking

capabilities

  • / List Git repositories in configured directory
  • / Get the most recent Git tag from repositories
  • / View commit history since last tag
  • / Create new Git tags with optional messages

what it does

Manages Git repositories through MCP operations like listing repos, handling tags, and viewing commit history without requiring direct shell access.

about

Git is a community-built MCP server published by kjozsa that provides AI assistants with tools and capabilities via the Model Context Protocol. Create a local git repo easily with Git MCP: manage repositories, handle tags, and refresh repos without shell access. It is categorized under developer tools.

how to install

You can install Git in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

Git is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

Git MCP

smithery badge MCP server for managing Git operations on local repositories.

Installation

Installing via Smithery

To install Git MCP for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @kjozsa/git-mcp --client claude

Installing Manually

uvx install git-mcp

Configuration

Add the MCP server using the following JSON configuration snippet:

{
  "mcpServers": {
    "git-mcp": {
      "command": "uvx",
      "args": ["git-mcp"],
      "env": {
        "GIT_REPOS_PATH": "/path/to/your/git/repositories"
      }
    }
  }
}

Features and Usage

Environment Variables

  • GIT_REPOS_PATH: Path to the directory containing your Git repositories (required)

You can set this in your environment or create a .env file in the directory where you run the server.

Available Methods

list_repositories

Lists all Git repositories in the configured path.

  • Parameters: None
  • Returns: List of repository names

get_last_git_tag

Finds the last Git tag in the specified repository.

  • Parameters: repo_name (Name of the Git repository)
  • Returns: Dictionary with version (tag name) and date (tag creation date)

list_commits_since_last_tag

Lists commit messages between the last Git tag and HEAD.

  • Parameters:
    • repo_name: Name of the Git repository
    • max_count (optional): Maximum number of commits to return
  • Returns: List of dictionaries with hash, author, date, and message

create_git_tag

Creates a new git tag in the specified repository.

  • Parameters:
    • repo_name: Name of the git repository
    • tag_name: Name of the tag to create
    • message (optional): Message for annotated tag (if not provided, creates a lightweight tag)
  • Returns: Dictionary with status, version (tag name), date (tag creation date), and type (annotated or lightweight)

push_git_tag

Pushes an existing git tag to the default remote repository.

  • Parameters:
    • repo_name: Name of the git repository
    • tag_name: Name of the tag to push
  • Returns: Dictionary with status, remote (name of the remote), tag (name of the tag), and message (success message)

refresh_repository

Refreshes a repository by checking out the main branch (or master as fallback) and pulling from all remotes.

  • Parameters:
    • repo_name: Name of the git repository
  • Returns: Dictionary with status, repository, branch, and pull_results (results for each remote)

Troubleshooting

  • Repository Not Found: Ensure GIT_REPOS_PATH is set correctly and the repository exists
  • No Tags Found: The repository doesn't have any tags yet

Development

# Install dependencies
uv pip install -r requirements.txt

# Run in dev mode with Inspector
mcp dev git_mcp/server.py

Testing

The project includes two test scripts:

  1. test_git_mcp.py - Tests the underlying Git command functionality directly, without using the MCP server.
  2. test_mcp_server.py - Tests the MCP server functionality by starting a server instance and making calls to it.

To run the tests:

# Test the Git command functionality
python test_git_mcp.py

# Test the MCP server (requires the git-mcp package to be installed)
python test_mcp_server.py

FAQ

What is the Git MCP server?
Git is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for Git?
This profile displays 10 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
MCP server reviews

Ratings

4.510 reviews
  • Shikha Mishra· Oct 10, 2024

    Git is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Piyush G· Sep 9, 2024

    We evaluated Git against two servers with overlapping tools; this profile had the clearer scope statement.

  • Chaitanya Patil· Aug 8, 2024

    Useful MCP listing: Git is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Sakshi Patil· Jul 7, 2024

    Git reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Ganesh Mohane· Jun 6, 2024

    I recommend Git for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Oshnikdeep· May 5, 2024

    Strong directory entry: Git surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Dhruvi Jain· Apr 4, 2024

    Git has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Rahul Santra· Mar 3, 2024

    According to our notes, Git benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.

  • Pratham Ware· Feb 2, 2024

    We wired Git into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

  • Yash Thakker· Jan 1, 2024

    Git is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.