Git MCP
by kjozsa
Git MCP is an MCP server for managing Git operations on local repositories. It provides methods for listing repositories, retrieving tags, listing commits, creating tags, pushing tags, and refreshing repositories.
Last updated: N/A
What is Git MCP?
Git MCP is a Micro Control Plane (MCP) server that provides an API for interacting with local Git repositories. It allows you to automate common Git tasks such as listing repositories, retrieving tags, listing commits, creating tags, pushing tags, and refreshing repositories.
How to use Git MCP?
To use Git MCP, you need to install it either via Smithery or manually using uvx install git-mcp
. Then, configure the MCP server with the path to your Git repositories using the GIT_REPOS_PATH
environment variable. Finally, you can call the available methods through the MCP server's API.
Key features of Git MCP
Lists Git repositories
Retrieves the last Git tag
Lists commits since the last tag
Creates new Git tags
Pushes Git tags to remote
Refreshes repositories by pulling from remotes
Use cases of Git MCP
Automating Git tag creation and pushing
Retrieving version information from Git tags
Listing recent commits for release notes
Refreshing local repositories with remote changes
Integrating Git operations into automated workflows
FAQ from Git MCP
How do I specify the path to my Git repositories?
How do I specify the path to my Git repositories?
Set the GIT_REPOS_PATH
environment variable to the directory containing your Git repositories.
What happens if a repository doesn't have any tags?
What happens if a repository doesn't have any tags?
The get_last_git_tag
method will return an appropriate empty or null value.
How do I create an annotated tag?
How do I create an annotated tag?
Provide a message
parameter when calling the create_git_tag
method.
What remotes are used when refreshing a repository?
What remotes are used when refreshing a repository?
The refresh_repository
method pulls from all remotes configured for the repository.
What happens if the main branch does not exist?
What happens if the main branch does not exist?
The refresh_repository
method will fallback to using the master branch.