This MCP server implementation provides Git tools for the Model Context Protocol. It integrates with the MCP Core, Server, and Macros libraries to enable Git-related operations. The server is built using Rust and leverages asynchronous programming with Tokio. It's designed for use cases requiring version control integration within AI-assisted applications, such as managing code repositories or tracking changes in collaborative environments.
No reviews yet. Be the first to review!
Sign in to join the conversation
Get the status of a repository. Parameters: repo_path (string) - Path to the Git repository.
List all branches. Parameters: repo_path (string) - Path to the Git repository.
Get commit history with flexible filtering options. Parameters: repo_path (string), max_count (optional integer), branch (optional string), since (optional string), until (optional string), author (optional string).
Create a new commit. Parameters: repo_path (string) - Path to the Git repository, message (string) - Commit message, all (optional boolean) - Whether to automatically stage modified files.
Pull changes from remote. Parameters: repo_path (string) - Path to the Git repository, remote (optional string) - Remote name, defaults to 'origin', branch (optional string) - Branch name.
Push changes to remote. Parameters: repo_path (string) - Path to the Git repository, remote (optional string) - Remote name, defaults to 'origin', branch (optional string) - Branch name, force (optional boolean) - Whether to force push.
View file differences. Parameters: repo_path (string) - Path to the Git repository, path (optional string) - Path to file or directory, staged (optional boolean) - Whether to show staged changes, commit (optional string) - Commit to compare against.
Add file contents to the staging area. Parameters: repo_path (string) - Path to the Git repository, path (string) - Path(s) to add, or patterns to match, update (optional boolean) - Whether to update, rather than add, all (optional boolean) - Whether to add all changes, including untracked files.
Reset the staging area or working tree to a specified state. Parameters: repo_path (string) - Path to the Git repository, path (string) - Path(s) to reset, or patterns to match, hard (optional boolean) - Whether to perform a hard reset, target (optional string) - The commit or branch to reset to.
List all worktrees in a repository. Parameters: repo_path (string) - Path to the Git repository.
Create a new worktree. Parameters: repo_path (string) - Path to the Git repository, path (string) - Path for the new worktree, branch (optional string) - Branch name to create, commit_ref (optional string) - Commit reference to check out, checkout (optional boolean) - Whether to check out files, defaults to true.
Remove a worktree. Parameters: repo_path (string) - Path to the Git repository, path (string) - Path to the worktree to remove, force (optional boolean) - Force removal even if worktree is dirty.
Prune working tree files in $GIT_DIR/worktrees. Parameters: repo_path (string) - Path to the Git repository, verbose (optional boolean) - Report all removals, dry_run (optional boolean) - Do not remove, show only.