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.
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. Parameters: repo_path (string) - Path to the Git repository, max_count (optional integer) - Maximum number of commits to return, branch (optional string) - Branch name.
Get commits within a specified time range, optionally filtered by author and branch. Parameters: repo_path (string) - Path to the Git repository, since (string) - Start date, until (optional string) - End date, author (optional string) - Filter by specific author, branch (optional string) - Branch name.
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. Use '.' for all files, 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. Use '.' for all files, hard (optional boolean) - Whether to perform a hard reset, target (optional string) - The commit or branch to reset to (defaults to HEAD).
No reviews yet. Be the first to review!
Sign in to join the conversation
Our bundler currently only supports TypeScript-based servers. Check back soon!