MCP Server Directory LogoMCP Server Directory
Git Logo

Git MCP Server

MCP Server for Git repository interaction, offering core Git commands and workflow automation

Git MCP Server provides a standardized interface for Large Language Models to interact with Git repositories. Part of the official Model Context Protocol server collection, it enables reading, searching, and manipulating Git repositories through a secure and extensible architecture. Currently in early development stage, this server's functionality continues to expand as the project matures, making repository workflows more accessible to AI systems.

Features
  • Complete repository lifecycle management from initialization to advanced operations
  • Comprehensive commit handling with staging, diffing, and history tracking
  • Branch creation and navigation capabilities
  • Detailed repository status reporting and visualization
  • Error handling with informative diagnostics
  • Multiple installation methods (uv/uvx, pip, Docker)
  • Secure command execution with validation
Use cases
  • Automating Git operations within AI-powered development workflows
  • Creating intelligent code assistants with version control awareness
  • Implementing automated code review processes with repository context
  • Building history-aware development tools that leverage Git metadata
  • Enhancing documentation generation with repository insights
  • Streamlining continuous integration workflows with Git automation
  • Enabling natural language interfaces for repository management
Tools
  • git_status: Shows working tree status
  • git_diff_unstaged: Displays unstaged changes in the working directory
  • git_diff_staged: Shows changes staged for commit
  • git_diff: Compares differences between branches or commits
  • git_commit: Records changes to the repository with message
  • git_add: Stages file contents for the next commit
  • git_reset: Unstages all staged changes
  • git_log: Shows commit history with configurable display limits
  • git_create_branch: Creates new branches with optional starting points
  • git_checkout: Switches between branches
  • git_show: Displays contents of specified commits
  • git_init: Initializes new Git repositories
Integration complexity

3/5 - Moderate. Requires configuration of environment and repository paths, but offers multiple installation methods.

Setup Guide

Add to your Claude Desktop configuration:

"mcpServers": {
  "git": {
    "command": "uvx",
    "args": ["mcp-server-git", "--repository", "path/to/git/repo"]
  }
}
Using Docker

Add to your Claude Desktop configuration:

"mcpServers": {
  "git": {
    "command": "docker",
    "args": [
      "run", 
      "--rm", 
      "-i", 
      "--mount", 
      "type=bind,src=/Users/username,dst=/Users/username", 
      "mcp/git"
    ]
  }
}
Using pip
  1. Install the package:
pip install mcp-server-git
  1. Add to your configuration:
"mcpServers": {
  "git": {
    "command": "python",
    "args": ["-m", "mcp_server_git", "--repository", "path/to/git/repo"]
  }
}
License

MIT License

Website

https://github.com/modelcontextprotocol/servers/tree/main/src/git

Stay Updated

Subscribe to our newsletter for the latest news and updates about MCP servers