Git MCP Server

Developmentstdiov2026.1.26
Репозиторий

Reference MCP server for Git repository operations. Provides tools to read, search, and manipulate Git repositories including viewing commit history, diffs, branches, file contents at specific revisions, and repository status. Enables AI agents to understand code changes and navigate version history without direct filesystem access.

Подключение

Добавьте эту конфигурацию в .claude/mcp.json

{
  "mcpServers": {
    "git": {
      "command": "uvx",
      "args": [
        "mcp-server-git",
        "--repository",
        "."
      ]
    }
  }
}

Инструменты (4)

git_log

Show commit history for the repository with messages, authors, and dates.

{
  "type": "object",
  "required": [
    "repo_path"
  ],
  "properties": {
    "branch": {
      "type": "string",
      "description": "Branch name (default current branch)"
    },
    "max_count": {
      "type": "integer",
      "description": "Maximum number of commits to return (default 10)"
    },
    "repo_path": {
      "type": "string",
      "description": "Path to the Git repository"
    }
  }
}

git_diff

Show changes between commits, branches, or working directory.

{
  "type": "object",
  "required": [
    "repo_path"
  ],
  "properties": {
    "target": {
      "type": "string",
      "description": "Commit hash, branch name, or range (e.g. HEAD~3..HEAD)"
    },
    "repo_path": {
      "type": "string",
      "description": "Path to the Git repository"
    }
  }
}

git_status

Show the working tree status including staged, modified, and untracked files.

{
  "type": "object",
  "required": [
    "repo_path"
  ],
  "properties": {
    "repo_path": {
      "type": "string",
      "description": "Path to the Git repository"
    }
  }
}

git_show

Show the contents of a file at a specific commit or branch.

{
  "type": "object",
  "required": [
    "repo_path",
    "path"
  ],
  "properties": {
    "path": {
      "type": "string",
      "description": "File path within the repository"
    },
    "revision": {
      "type": "string",
      "description": "Commit hash or branch name"
    },
    "repo_path": {
      "type": "string",
      "description": "Path to the Git repository"
    }
  }
}

Ресурсы

Этот сервер не предоставляет ресурсы.

Промпты

Этот сервер не предоставляет промпты.

Сведения о сервере

Автор
Anthropic (@modelcontextprotocol)
Репозиторий
https://github.com/modelcontextprotocol/servers
Лицензия
Apache-2.0
Версия
2026.1.26
Звёзды
86,206
Последнее обновление
27 января 2026 г.