git-mcp

git-mcp

3

Git MCP is a Model Context Protocol (MCP) server designed for managing Git operations on local repositories. It features several methods for handling tasks like listing repositories, tagging, and syncing with remotes. The server can be installed via Smithery or manually using uvx.

Git MCP

MCP server for managing Git operations on local repositories.

Installation

Installing via Smithery

To install Git MCP for Claude Desktop automatically via Smithery.

Installing Manually

Use uvx to install git-mcp manually.

Configuration

Add the MCP server using a specified JSON configuration snippet.

Features and Usage

  • Environment Variables: Set GIT_REPOS_PATH for Git repositories.
  • Methods:
    • list_repositories: Lists all Git repositories.
    • get_last_git_tag: Finds the last Git tag.
    • list_commits_since_last_tag: Lists commit messages since last tag.
    • create_git_tag: Creates a new git tag.
    • push_git_tag: Pushes an existing git tag.
    • refresh_repository: Refreshes a repository by checking out the main branch and pulling from remotes.

Troubleshooting

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

Development

Install dependencies and run in dev mode with Inspector.

Testing

Includes test scripts for Git command functionality and MCP server.