Git MCP Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Provides core Git operations such as init, clone, status, add, commit, push, pull, as well as branch management, tag operations, remote management, and stash operations

  • Offers GitHub integration via Personal Access Token to perform Git operations specifically with GitHub repositories

Git MCP サーバー

標準化されたインターフェースを通じて強化されたGit操作を提供するModel Context Protocol(MCP)サーバー。このサーバーはMCPエコシステムと統合され、AIアシスタントにGit機能を提供します。

特徴

  • コア Git 操作: init、clone、status、add、commit、push、pull
  • ブランチ管理: リスト、作成、削除、チェックアウト
  • タグ操作: リスト、作成、削除
  • リモート管理: リスト、追加、削除
  • スタッシュ操作: リスト、保存、ポップ
  • 一括操作: 複数の Git 操作を連続して実行します
  • GitHub 統合: 個人アクセストークンによる GitHub サポートが組み込まれています
  • パス解決: オプションのデフォルトパス設定によるスマートなパス処理
  • エラー処理: カスタムエラータイプによる包括的なエラー処理
  • リポジトリキャッシュ: 効率的なリポジトリ状態管理
  • パフォーマンス監視: パフォーマンス追跡機能が組み込まれています

インストール

  1. リポジトリをクローンします。
git clone https://github.com/yourusername/git-mcp-v2.git cd git-mcp-v2
  1. 依存関係をインストールします:
npm install
  1. プロジェクトをビルドします。
npm run build

構成

MCP 設定ファイルに以下を追加します:

{ "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" } } } }

環境変数

  • GIT_DEFAULT_PATH : (オプション) Git操作のデフォルトパス
  • GITHUB_PERSONAL_ACCESS_TOKEN : (オプション) GitHub 操作用の GitHub 個人アクセス トークン

利用可能なツール

基本操作

  • init : 新しいGitリポジトリを初期化する
  • clone : リポジトリをクローンする
  • status : リポジトリのステータスを取得する
  • add :ステージファイル
  • commit : コミットを作成する
  • push : コミットをリモートにプッシュする
  • pull : リモートから変更をプルする

支店運営

  • branch_list : すべてのブランチを一覧表示する
  • branch_create : 新しいブランチを作成する
  • branch_delete : ブランチを削除する
  • checkout : ブランチを切り替えるか、作業ツリーのファイルを復元する

タグ操作

  • tag_list : タグを一覧表示する
  • tag_create : タグを作成する
  • tag_delete : タグを削除する

リモート操作

  • remote_list : リモートの一覧
  • remote_add : リモートを追加する
  • remote_remove : リモートを削除する

スタッシュ操作

  • stash_list : スタッシュを一覧表示する
  • stash_save : 変更をスタッシュに保存する
  • stash_pop : スタッシュを適用および削除する

一括操作

  • bulk_action : 複数の Git 操作を順番に実行する

発達

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

ライセンス

マサチューセッツ工科大学

貢献

  1. リポジトリをフォークする
  2. 機能ブランチを作成します( git checkout -b feature/amazing-feature
  3. 変更をコミットします ( git commit -m 'Add some amazing feature' )
  4. ブランチにプッシュする ( git push origin feature/amazing-feature )
  5. プルリクエストを開く

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Git MCP サーバーを使用すると、AI アシスタントはモデル コンテキスト プロトコルを介して拡張された Git 操作を実行でき、コア Git 機能、ブランチとタグの管理、GitHub の統合などをサポートします。

  1. Features
    1. Installation
      1. Configuration
        1. Environment Variables
          1. Available Tools
            1. Basic Operations
            2. Branch Operations
            3. Tag Operations
            4. Remote Operations
            5. Stash Operations
            6. Bulk Operations
          2. Development
            1. License
              1. Contributing
                ID: 46aozzlyhx