Skip to main content
Glama

Git MCP Server

by Sheshiyer

Git MCP Server

A Model Context Protocol (MCP) server that provides enhanced Git operations through a standardized interface. This server integrates with the MCP ecosystem to provide Git functionality to AI assistants.

Features

  • Core Git Operations: init, clone, status, add, commit, push, pull
  • Branch Management: list, create, delete, checkout
  • Tag Operations: list, create, delete
  • Remote Management: list, add, remove
  • Stash Operations: list, save, pop
  • Bulk Actions: Execute multiple Git operations in sequence
  • GitHub Integration: Built-in GitHub support via Personal Access Token
  • Path Resolution: Smart path handling with optional default path configuration
  • Error Handling: Comprehensive error handling with custom error types
  • Repository Caching: Efficient repository state management
  • Performance Monitoring: Built-in performance tracking

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/git-mcp-v2.git cd git-mcp-v2
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Configuration

Add to your MCP settings file:

{ "mcpServers": { "git-v2": { "command": "node", "args": ["path/to/git-mcp-v2/build/index.js"], "env": { "GIT_DEFAULT_PATH": "/path/to/default/git/directory", "GITHUB_PERSONAL_ACCESS_TOKEN": "your-github-pat" } } } }

Environment Variables

  • GIT_DEFAULT_PATH: (Optional) Default path for Git operations
  • GITHUB_PERSONAL_ACCESS_TOKEN: (Optional) GitHub Personal Access Token for GitHub operations

Available Tools

Basic Operations

  • init: Initialize a new Git repository
  • clone: Clone a repository
  • status: Get repository status
  • add: Stage files
  • commit: Create a commit
  • push: Push commits to remote
  • pull: Pull changes from remote

Branch Operations

  • branch_list: List all branches
  • branch_create: Create a new branch
  • branch_delete: Delete a branch
  • checkout: Switch branches or restore working tree files

Tag Operations

  • tag_list: List tags
  • tag_create: Create a tag
  • tag_delete: Delete a tag

Remote Operations

  • remote_list: List remotes
  • remote_add: Add a remote
  • remote_remove: Remove a remote

Stash Operations

  • stash_list: List stashes
  • stash_save: Save changes to stash
  • stash_pop: Apply and remove a stash

Bulk Operations

  • bulk_action: Execute multiple Git operations in sequence

Development

# Run tests npm test # Run tests with coverage npm run test:coverage # Run linter npm run lint # Format code npm run format

License

MIT

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request
Deploy Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Git MCP 서버를 사용하면 AI 어시스턴트가 모델 컨텍스트 프로토콜을 통해 향상된 Git 작업을 수행하여 핵심 Git 기능, 브랜치 및 태그 관리, GitHub 통합 등을 지원할 수 있습니다.

  1. 특징
    1. 설치
      1. 구성
        1. 환경 변수
          1. 사용 가능한 도구
            1. 기본 작업
            2. 지점 운영
            3. 태그 작업
            4. 원격 작업
            5. 스태시 작업
            6. 대량 작업
          2. 개발
            1. 특허
              1. 기여하다

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  MCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.
                  Last updated -
                  17
                  22,573
                  66,283
                  MIT License
                • A
                  security
                  F
                  license
                  A
                  quality
                  MCP Server for the GitHub API, providing features for file operations, repository management, and advanced search, with automatic branch creation and comprehensive error handling.
                  Last updated -
                  18
                  1
                  4
                  • Linux
                  • Apple
                • A
                  security
                  F
                  license
                  A
                  quality
                  MCP server for managing Git operations on local repositories, allowing users to list repositories, get and create tags, list commits, push tags, and refresh repositories through a standardized interface.
                  Last updated -
                  6
                  3
                • -
                  security
                  A
                  license
                  -
                  quality
                  An MCP server that wraps around the GitHub CLI tool, allowing AI assistants to interact with GitHub repositories through commands for pull requests, issues, and repository operations.
                  Last updated -
                  4
                  MIT License
                  • 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/Sheshiyer/git-mcp-v2'

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