Skip to main content
Glama

Git MCP

鍛冶屋のバッジローカル リポジトリでの Git 操作を管理するための MCP サーバー。

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Git MCP を自動的にインストールするには:

npx -y @smithery/cli install @kjozsa/git-mcp --client claude

手動でインストールする

uvx install git-mcp

Related MCP server: Git MCP Server

構成

次の JSON 構成スニペットを使用して MCP サーバーを追加します。

{
  "mcpServers": {
    "git-mcp": {
      "command": "uvx",
      "args": ["git-mcp"],
      "env": {
        "GIT_REPOS_PATH": "/path/to/your/git/repositories"
      }
    }
  }
}

機能と使用方法

環境変数

  • GIT_REPOS_PATH : Gitリポジトリを含むディレクトリへのパス(必須)

これを環境で設定するか、サーバーを実行するディレクトリに.envファイルを作成することができます。

利用可能な方法

リポジトリ一覧

設定されたパス内のすべての Git リポジトリを一覧表示します。

  • パラメータ: なし

  • 戻り値: リポジトリ名のリスト

最後のgitタグを取得する

指定されたリポジトリ内の最後の Git タグを検索します。

  • パラメータ: repo_name (Gitリポジトリの名前)

  • 戻り値: version (タグ名) とdate (タグ作成日) を含む辞書

最後のタグ以降のコミット一覧

最後の Git タグと HEAD 間のコミット メッセージを一覧表示します。

  • パラメータ:

    • repo_name : Gitリポジトリの名前

    • max_count (オプション): 返されるコミットの最大数

  • 戻り値: hashauthordatemessageを含む辞書のリスト

gitタグを作成する

指定されたリポジトリに新しい git タグを作成します。

  • パラメータ:

    • repo_name : Gitリポジトリの名前

    • tag_name : 作成するタグの名前

    • message (オプション):注釈付きタグのメッセージ(指定されていない場合は軽量タグを作成します)

  • 戻り値: statusversion (タグ名)、 date (タグ作成日)、 type (注釈付きまたは軽量) を含む辞書

プッシュ_git_tag

既存の git タグをデフォルトのリモート リポジトリにプッシュします。

  • パラメータ:

    • repo_name : Gitリポジトリの名前

    • tag_name : プッシュするタグの名前

  • 戻り値: statusremote (リモートの名前)、 tag (タグの名前)、 message (成功メッセージ) を含む辞書

リポジトリの更新

メイン ブランチ (またはフォールバックとしてのマスター) をチェックアウトし、すべてのリモートからプルしてリポジトリを更新します。

  • パラメータ:

    • repo_name : Gitリポジトリの名前

  • 戻り値: statusrepositorybranchpull_results (各リモートの結果)を含む辞書

トラブルシューティング

  • リポジトリが見つかりません: GIT_REPOS_PATHが正しく設定されており、リポジトリが存在することを確認してください

  • タグが見つかりません: リポジトリにはまだタグがありません

発達

# Install dependencies
uv pip install -r requirements.txt

# Run in dev mode with Inspector
mcp dev git_mcp/server.py

テスト

このプロジェクトには 2 つのテスト スクリプトが含まれています。

  1. test_git_mcp.py - MCP サーバーを使用せずに、基礎となる Git コマンド機能を直接テストします。

  2. test_mcp_server.py - サーバー インスタンスを起動して呼び出しを行うことで、MCP サーバーの機能をテストします。

テストを実行するには:

# Test the Git command functionality
python test_git_mcp.py

# Test the MCP server (requires the git-mcp package to be installed)
python test_mcp_server.py
Install Server
F
license - not found
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides Git version control operations for Claude, enabling comprehensive repository management. It allows users to perform tasks such as staging files, committing changes, managing branches, and handling remote operations like pushing and pulling.
    159
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides tools for interacting with Git repositories, enabling AI assistants to manage repositories, branches, commits, and files through a standardized interface.
    3,703
    1
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    A secure, git-aware MCP server for working with local repositories, enabling file management, shell commands, and full git operations within allowed directories.
    121
    1
    GPL 3.0

View all related MCP servers

Related MCP Connectors

  • A MCP server built for developers enabling Git based project management with project and personal…

  • MCP Server for JFrog, providing tools for development and artifact management.

  • An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform

View all MCP Connectors

Latest Blog Posts

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/kjozsa/git-mcp'

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