 
            
            
            
            
        Git-MCP
Servidor MCP para repositorios locales de git
1
Github Watches
2
Github Forks
0
Github Stars
Git MCP
MCP server for managing Git operations on local repositories.
Installation
Installing via Smithery
To install Git MCP for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @kjozsa/git-mcp --client claude
Installing Manually
uvx install git-mcp
Configuration
Add the MCP server using the following JSON configuration snippet:
{
  "mcpServers": {
    "git-mcp": {
      "command": "uvx",
      "args": ["git-mcp"],
      "env": {
        "GIT_REPOS_PATH": "/path/to/your/git/repositories"
      }
    }
  }
}
Features and Usage
Environment Variables
- 
GIT_REPOS_PATH: Path to the directory containing your Git repositories (required)
You can set this in your environment or create a .env file in the directory where you run the server.
Available Methods
list_repositories
Lists all Git repositories in the configured path.
- Parameters: None
- Returns: List of repository names
get_last_git_tag
Finds the last Git tag in the specified repository.
- Parameters: repo_name(Name of the Git repository)
- Returns: Dictionary with version(tag name) anddate(tag creation date)
list_commits_since_last_tag
Lists commit messages between the last Git tag and HEAD.
- Parameters:
- 
repo_name: Name of the Git repository
- 
max_count(optional): Maximum number of commits to return
 
- 
- Returns: List of dictionaries with hash,author,date, andmessage
create_git_tag
Creates a new git tag in the specified repository.
- Parameters:
- 
repo_name: Name of the git repository
- 
tag_name: Name of the tag to create
- 
message(optional): Message for annotated tag (if not provided, creates a lightweight tag)
 
- 
- Returns: Dictionary with status,version(tag name),date(tag creation date), andtype(annotated or lightweight)
push_git_tag
Pushes an existing git tag to the default remote repository.
- Parameters:
- 
repo_name: Name of the git repository
- 
tag_name: Name of the tag to push
 
- 
- Returns: Dictionary with status,remote(name of the remote),tag(name of the tag), andmessage(success message)
refresh_repository
Refreshes a repository by checking out the main branch (or master as fallback) and pulling from all remotes.
- Parameters:
- 
repo_name: Name of the git repository
 
- 
- Returns: Dictionary with status,repository,branch, andpull_results(results for each remote)
Troubleshooting
- 
Repository Not Found: Ensure GIT_REPOS_PATHis set correctly and the repository exists
- No Tags Found: The repository doesn't have any tags yet
Development
# Install dependencies
uv pip install -r requirements.txt
# Run in dev mode with Inspector
mcp dev git_mcp/server.py
Testing
The project includes two test scripts:
- 
test_git_mcp.py- Tests the underlying Git command functionality directly, without using the MCP server.
- 
test_mcp_server.py- Tests the MCP server functionality by starting a server instance and making calls to it.
To run the tests:
# Test the Git command functionality
python test_git_mcp.py
# Test the MCP server (requires the git-mcp package to be installed)
python test_mcp_server.py
相关推荐
I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.
I find academic articles and books for research and literature reviews.
Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.
Confidential guide on numerology and astrology, based of GG33 Public information
Advanced software engineer GPT that excels through nailing the basics.
Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.
Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.
Converts Figma frames into front-end code for various mobile frameworks.
Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.
La aplicación AI de escritorio todo en uno y Docker con trapo incorporado, agentes de IA, creador de agentes sin código, compatibilidad de MCP y más.
Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx
Plataforma de automatización de flujo de trabajo de código justo con capacidades de IA nativas. Combine el edificio visual con código personalizado, auto-anfitrión o nube, más de 400 integraciones.
🧑🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.
Espejo dehttps: //github.com/agentience/practices_mcp_server
Una lista curada de servidores de protocolo de contexto del modelo (MCP)
Reviews
 
                                    user_kZQpXtwb
As a dedicated user of Git-MCP, I must say it's an incredibly useful tool for managing multiple Git repositories simultaneously. The intuitive interface and efficient performance streamline my workflow, saving me a lot of time and effort. Kudos to kjozsa for developing such a helpful application. Highly recommend it to any developer managing numerous repositories!
 
     
                                                             
                                                             
                                                             
                                                             
                                                             
                                                             
                                                             
                                                             
                                                            