mcpFree

git

<!-- mcp-name: io.github.modelcontextprotocol/server-git -->

mcp-server-git: A git MCP server

<!-- mcp-name: io.github.modelcontextprotocol/server-git -->

Overview

A Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.

Please note that mcp-server-git is currently in early development. The functionality and available tools are subject to change and expansion as we continue to develop and improve the server.

Tools

  1. git_status

    • Shows the working tree status
    • Input:
      • repo_path (string): Path to Git repository
    • Returns: Current status of working directory as text output
  2. git_diff_unstaged

    • Shows changes in working directory not yet staged
    • Inputs:
      • repo_path (string): Path to Git repository
      • context_lines (number, optional): Number of context lines to show (default: 3)
    • Returns: Diff output of unstaged changes
  3. git_diff_staged

    • Shows changes that are staged for commit
    • Inputs:
      • repo_path (string): Path to Git repository
      • context_lines (number, optional): Number of context lines to show (default: 3)
    • Returns: Diff output of staged changes
  4. git_diff

    • Shows differences between branches or commits
    • Inputs:
      • repo_path (string): Path to Git repository
      • target (string): Target branch or commit to compare with
      • context_lines (number, optional): Number of context lines to show (default: 3)
    • Returns: Diff output comparing current state with target
  5. git_commit

    • Records changes to the repository
    • Inputs:
      • repo_path (string): Path to Git repository
      • message (string): Commit message
    • Returns: Confirmation with new commit hash
  6. git_add

    • Adds file contents to the staging area
    • Inputs:
      • repo_path (string): Path to Git repository
      • files (string[]): Array of file paths to stage
    • Returns: Confirmation of staged files