Git MCP Server A Model Context Protocol (MCP) server that provides enhanced Git operations through a standardized interface. This server integrates with the MCP ecosystem to provide Git functionality to AI assistants.
Features **Core Git Operations**: init, clone, status, add, commit, push, pull **Branch Management**: list, create, delete, checkout **Tag Operations**: list, create, delete **Remote Management**: list, add, remove **Stash Operations**: list, save, pop **Bulk Actions**: Execute multiple Git operations in sequence **GitHub Integration**: Built-in GitHub support via Personal Access Token **Path Resolution**: Smart path handling with optional default path configuration **Error Handling**: Comprehensive error handling with custom error types **Repository Caching**: Efficient repository state management **Performance Monitoring**: Built-in performance tracking Installation Clone the repository: Install dependencies: Build the project: Configuration Add to your MCP settings file:
Environment Variables `GIT_DEFAULT_PATH`: (Optional) Default path for Git operations `GITHUB_PERSONAL_ACCESS_TOKEN`: (Optional) GitHub Personal Access Token for GitHub operations Available Tools Basic Operations `init`: Initialize a new Git repository `clone`: Clone a repository `status`: Get repository status `commit`: Create a commit `push`: Push commits to remote `pull`: Pull changes from remote Branch Operations `branch_list`: List all branches `branch_create`: Create a new branch `branch_delete`: Delete a branch `checkout`: Switch branches or restore working tree files Tag Operations `tag_create`: Create a tag `tag_delete`: Delete a tag Remote Operations `remote_list`: List remotes `remote_add`: Add a remote `remote_remove`: Remove a remote Stash Operations `stash_list`: List stashes `stash_save`: Save changes to stash `stash_pop`: Apply and remove a stash Bulk Operations `bulk_action`: Execute multiple Git operations in sequence Development License MIT
Contributing Fork the repository Create your feature branch (`git checkout -b feature/amazing-feature`) Commit your changes (`git commit -m 'Add some amazing feature'`) Push to the branch (`git push origin feature/amazing-feature`) Open a Pull Request