Git MCP

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GIT_REPOS_PATHYesPath to the directory containing your Git repositories

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
get_last_git_tag

Find the last git tag in the repository

Args: repo_name: Name of the git repository Returns: Dictionary containing tag version and date
list_commits_since_last_tag

List commit messages since main HEAD and the last git tag

Args: repo_name: Name of the git repository max_count: Maximum number of commits to return Returns: List of dictionaries containing commit hash, author, date, and message
list_repositories

List all git repositories in the configured path

Returns: List of repository names
create_git_tag

Create a new git tag in the repository

Args: repo_name: Name of the git repository tag_name: Name of the tag to create message: Optional message for annotated tag Returns: Dictionary containing status and tag information
push_git_tag

Push a git tag to the default remote

Args: repo_name: Name of the git repository tag_name: Name of the tag to push Returns: Dictionary containing status and information about the operation
refresh_repository

Refresh repository by checking out main branch and pulling all remotes

Args: repo_name: Name of the git repository Returns: Dictionary containing status and information about the operation