Skip to main content
Glama

mcp-git

by ver0-project
MIT License
20

MCP Git Server

An MCP (Model Context Protocol) server that provides comprehensive Git operations as tools for AI assistants and applications. This server enables AI systems to interact with Git repositories through a structured, validated interface.

Tools

The server provides the following Git operations:

Repository Management

  1. init - Initialize new Git repository
  2. status - Get repository status with detailed file information

File Operations

  1. add - Stage files for commit
  2. reset - Reset repository state (soft, mixed, hard)

Commit Operations

  1. commit - Create commits with comprehensive options
  2. log - View commit history with filtering and formatting options
  3. show - Display commit details and changes

Branch Operations

  1. create-branch - Create new branches from any starting point
  2. checkout - Switch branches/commits with advanced options

Comparison Operations

  1. diff - Show differences between commits, branches, or files

Note

Server intentionally lacks push operations to avoid security risks.

Tool Details

git_status

Shows the working tree status with comprehensive formatting options.

Inputs:

  • repoPath (string): Absolute path to Git repository
  • short (boolean, optional): Give output in short format
  • branch (boolean, optional): Show branch and tracking info
  • verbose (boolean/number, optional): Show textual changes staged for commit
  • untrackedFiles (boolean/string, optional): Show untracked files
  • ignoreSubmodules (string, optional): Ignore changes to submodules
  • pathspec (array, optional): Limit output to given paths

Returns: Detailed repository status information

git_add

Adds file contents to the staging area.

Inputs:

  • repoPath (string): Absolute path to Git repository
  • files (array): List of file paths to stage

Returns: Confirmation of staged files

git_commit

Records changes to the repository with extensive commit options.

Inputs:

  • repoPath (string): Absolute path to Git repository
  • message (string): Commit message
  • all (boolean, optional): Automatically stage modified files
  • author (string, optional): Override author
  • amend (boolean, optional): Amend the previous commit
  • gpgSign (boolean/string, optional): GPG sign commit
  • trailers (array, optional): Add trailers to commit message
  • Plus many more advanced options...

Returns: Commit confirmation with details

git_log

Shows commit history with advanced filtering and formatting.

Inputs:

  • repoPath (string): Absolute path to Git repository
  • maxCount (number, optional): Limit number of commits
  • since (string, optional): Show commits after date
  • author (string, optional): Filter by author
  • format (string, optional): Pretty-print format
  • graph (boolean, optional): Show text-based graph
  • pathspec (array, optional): Limit to specific paths

Returns: Formatted commit history

git_create_branch

Creates new branches with flexible options.

Inputs:

  • repoPath (string): Absolute path to Git repository
  • branchName (string): Name of new branch
  • startPoint (string, optional): Starting commit/branch/tag
  • switchToBranch (boolean, optional): Switch to new branch (default: true)
  • force (boolean, optional): Force create, reset if exists

Returns: Branch creation confirmation

git_checkout

Switches branches or commits with advanced options.

Inputs:

  • repoPath (string): Absolute path to Git repository
  • target (string): Branch/commit/tag to checkout
  • force (boolean, optional): Force checkout
  • createBranch (string, optional): Create and checkout new branch
  • detach (boolean, optional): Detached HEAD mode
  • pathspec (array, optional): Limit to specific paths

Returns: Checkout confirmation

git_reset

Resets repository state with different modes.

Inputs:

  • repoPath (string): Absolute path to Git repository
  • target (string, optional): Target commit (default: HEAD)
  • mode (string, optional): Reset mode - soft/mixed/hard (default: mixed)
  • pathspec (array, optional): Limit to specific paths

Returns: Reset confirmation

git_diff

Shows differences between commits, branches, or files.

Inputs:

  • repoPath (string): Absolute path to Git repository
  • from (string, optional): Source commit/branch/tag
  • to (string, optional): Target commit/branch/tag
  • staged (boolean, optional): Show staged changes
  • nameOnly (boolean, optional): Show only changed file names
  • pathspec (array, optional): Limit to specific paths

Returns: Diff output

git_show

Displays commit details and changes.

Inputs:

  • repoPath (string): Absolute path to Git repository
  • commit (string, optional): Commit to show (default: HEAD)
  • format (string, optional): Pretty-print format
  • stat (boolean, optional): Show diffstat
  • pathspec (array, optional): Limit to specific paths

Returns: Commit details and changes

git_init

Initializes a new Git repository.

Inputs:

  • repoPath (string): Path where to initialize repository
  • bare (boolean, optional): Create bare repository
  • initialBranch (string, optional): Set initial branch name
  • template (string, optional): Template directory

Returns: Initialization confirmation

Installation

{ "mcpServers": { "git": { "command": "npx", "args": ["-y", "@ver0/mcp-git"] } } }

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Provides comprehensive Git operations as tools for AI assistants and applications. This server enables AI systems to interact with Git repositories, allowing to initialize, fetch, commit, log, status, etc..

  1. Tools
    1. Repository Management
    2. File Operations
    3. Commit Operations
    4. Branch Operations
    5. Comparison Operations
  2. Tool Details
    1. git_status
    2. git_add
    3. git_commit
    4. git_log
    5. git_create_branch
    6. git_checkout
    7. git_reset
    8. git_diff
    9. git_show
    10. git_init
  3. Installation

    Related MCP Servers

    • A
      security
      F
      license
      A
      quality
      The Git MCP Server allows AI assistants to perform enhanced Git operations via the Model Context Protocol, supporting core Git functions, branch and tag management, GitHub integration, and more.
      Last updated -
      21
      55
      4
      TypeScript
    • -
      security
      A
      license
      -
      quality
      A server that allows AI assistants to browse and read files from specified GitHub repositories, providing access to repository contents via the Model Context Protocol.
      Last updated -
      3
      JavaScript
      MIT License
      • Apple
    • -
      security
      F
      license
      -
      quality
      A custom server implementation that allows AI assistants to interact with GitLab repositories, providing capabilities for searching, fetching files, creating/updating content, and managing issues and merge requests.
      Last updated -
      JavaScript
    • -
      security
      A
      license
      -
      quality
      A server implementation that provides a unified interface for OpenAI services, Git repository analysis, and local filesystem operations through REST API endpoints.
      Last updated -
      Python
      GPL 3.0
      • Linux
      • Apple

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/ver0-project/mcps'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server