Git
- python
2
GitHub Stars
python
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mementorc-mcp-git": {
"command": "uvx",
"args": [
"mcp-server-git",
"--repository",
"path/to/git/repo"
],
"env": {
"GITHUB_TOKEN": "ghp_abcdefghijklmnopqrstuvwxyz",
"AZURE_DEVOPS_ORG": "YOUR_ORG",
"AZURE_DEVOPS_TOKEN": "YOUR_AZURE_DEVOPS_TOKEN"
}
}
}
}You can use the MCP Git server to read, search, and manipulate Git repositories through a Model Context Protocol client. It exposes a set of tools that let you check status, view diffs, commit changes, manage branches, and inspect commit contents, all from a consistent MCP interface. This makes it easier to automate repository workflows, perform code analysis, and integrate Git operations into larger AI-assisted workflows.
How to use
To work with the MCP Git server, connect your MCP client to one of the available local (stdio) or remote (http) endpoints that are described in the MCP configuration options. You can run the server locally and interact with it through your client by starting the server in one of the supported ways and then issuing the standard MCP calls to perform Git operations such as checking status, viewing diffs, staging files, creating branches, and inspecting commits.
How to install
# Prerequisites
- Python 3.8+ (or the runtime specified by your environment)
- Access to a Git repository you want to manage
# Method A: Install via pip (development-friendly)
pip install mcp-server-git
# Run the server directly (example)
python -m mcp_server_git
If you prefer developers workflows or using a package manager that fits your setup, you can choose from the following MCP server configurations that are demonstrated in various usage scenarios. Use one configuration per runtime environment and start the server accordingly.
## Configuration and usage notes
Environment variables are supported and can be loaded from .env files to customize authentication, API endpoints, and log levels. The server loads variables from several locations with a defined precedence, including .env files in your project, the repository directory, ClaudeCode workspace, and system environment variables. For example, you can provide a GitHub access token and optional API base URL via a .env file in your project directory.
## Notes on development and debugging
During development or troubleshooting, you can inspect server logs to diagnose issues. If you run the server in a development environment, you may find logs under typical user log directories or as configured by your environment. Use the MCP inspector tooling to test changes and validate responses from the server.
## Available tools
### git\_status
Shows the working tree status for a given repository path.
### git\_diff\_unstaged
Shows changes in the working directory that have not been staged.
### git\_diff\_staged
Shows changes that are staged for commit.
### git\_diff
Shows differences between the current state and a target branch or commit.
### git\_commit
Records changes to the repository with a commit message.
### git\_add
Adds file contents to the staging area with support for batch operations.
### git\_reset
Unstages all staged changes in the repository.
### git\_log
Shows the commit logs with advanced filtering and formatting.
### git\_create\_branch
Creates a new branch from a base branch.
### git\_checkout
Switches to a specified branch.
### git\_show
Shows the contents of a specific commit revision.
### git\_init
Initializes a new Git repository.
### azure\_get\_build\_status
Retrieves the status of an Azure DevOps build/pipeline run.
### azure\_get\_build\_logs
Retrieves logs from an Azure DevOps build.
### azure\_get\_failing\_jobs
Provides details about failing jobs in an Azure DevOps build.
### azure\_list\_builds
Lists builds for an Azure DevOps project with filtering options.