FastMCP GitHub Automation Server

Integrations

  • Supports environment variables management through .env files for storing configuration like GitHub tokens securely.

  • Enables interaction with Git version control system for repository operations, branch management, and commit handling.

  • Provides a comprehensive API wrapper for GitHub operations, enabling automation and management of repositories, pull requests, issues, branches, commits, and file operations. Includes features for secure token management, merge strategies, status checks, label management, and repository search.

GITパイロット

GIT-Pilotは、GitHub操作のための包括的なAPIラッパーを提供する、強力なGitHub自動化・管理ツールです。FastMCPベースのサーバーを通じてGitHubとのやり取りを簡素化し、リポジトリ、プルリクエスト、問題管理などを容易にします。

🌟 特徴

🔐 認証とセキュリティ

  • Fernetを使用した暗号化による安全なトークン管理
  • トークンの有効期限と自動クリーンアップ
  • レート制限の処理と自動再試行
  • 設定可能な認証タイムアウト

📦 リポジトリ管理

  • リポジトリの作成と管理
  • ブランチとコミットを処理する
  • ファイル操作(作成、更新、削除)
  • リポジトリの検索とフィルタリング
  • コミットの比較と履歴

🔄 プルリクエスト操作

  • プルリクエストの作成と管理
  • マージ戦略(マージ、スカッシュ、リベース)
  • ステータスチェックの検証
  • 競合の検出と処理
  • ドラフトPRサポート

📝 問題管理

  • 問題の作成と更新
  • ラベル管理
  • 譲受人の取り扱い
  • コメント管理
  • 問題の検索とフィルタリング

🛠 技術的特徴

  • スレッドセーフな操作
  • リソース管理
  • 包括的なエラー処理
  • 詳細なログ記録
  • 型安全性
  • 構成管理
  • FastMCPサーバー統合

🚀 はじめに

前提条件

  • Python 3.12以上
  • GitHubアカウント
  • GitHub 個人アクセストークン
  • FastMCP CLI(オプション)

インストール

  1. リポジトリをクローンします。
git clone https://github.com/yourusername/GIT-Pilot.git cd GIT-Pilot
  1. uv をインストールします (まだインストールされていない場合)。
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 仮想環境を作成してアクティブ化します。
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
  1. uv を使用してパッケージをインストールします。
uv pip install -e .
  1. 環境変数を設定します。プロジェクト ルートに.envファイルを作成します。
GITHUB_TOKEN=your_github_token_here

基本的な使い方

Claude デスクトップ統合の設定
  1. GIT-Pilot サーバーを起動します。
uv run main.py
  1. Claude Desktopをダウンロードしてインストールする
  2. Claude デスクトップを設定します。
    • クロードデスクトップを開く
    • File > Settings > Developer > Edit Configに移動します
    • 次の構成を追加します。
{ "mcpServers": { "GIT-Pilot": { "command": "uv", "args": [ "--directory", "path\\to\\repo", "run", "main.py" ] } } }
  1. Claudeデスクトップを再起動します
  2. チャットウィンドウのハンマーアイコンを探してください - これはMCPサーバーが使用可能であることを示します

APIの例

# Create a repository await call_tool("create_repository", name="my-repo", description="My awesome repository", private=True, has_issues=True, has_wiki=True, has_projects=True, auto_init=True ) # Create a pull request await call_tool("create_pull_request", repo_path="owner/repo", title="New feature", head="feature-branch", base="main", body="Description of changes", draft=False ) # List commits with filtering await call_tool("list_commits", repo_path="owner/repo", branch="main", author="username", since="2024-01-01", until="2024-04-21", max_results=30 )

🔧 構成

サービスはConfigクラスを通じて構成できます。

@dataclass class Config: TOKEN_TTL_HOURS: int = 24 MAX_STORED_TOKENS: int = 1000 CLEANUP_INTERVAL_SECONDS: int = 3600 MAX_RETRIES: int = 3 RETRY_DELAY_SECONDS: int = 5 MAX_RESULTS_PER_PAGE: int = 100 ENCRYPTION_KEY: bytes = Fernet.generate_key()

🛡 セキュリティ

  • トークンはFernetを使用して保存時に暗号化されます
  • 自動トークンの有効期限とクリーンアップ
  • 再試行によるレート制限保護
  • 入力検証
  • 包括的なエラー処理
  • 安全なトークンのクリーンアップ

🔄 レート制限

このサービスには、レート制限処理機能が組み込まれています。

  • レート制限時の自動再試行
  • 設定可能な再試行回数
  • 再試行間の遅延
  • レート制限ステータスのログ記録
  • 指数バックオフ

🧪 エラー処理

以下の包括的なエラー処理:

  • 認証失敗
  • APIエラー
  • レート制限
  • 無効な入力
  • 資源の競合
  • ネットワークの問題
  • トークンの検証
  • ファイル操作

📈 ログ記録

次の詳細なログ記録:

  • タイムスタンプ
  • ログレベル
  • 関数名
  • 行番号
  • エラーの詳細
  • スタックトレース
  • レート制限情報
  • トークン操作

🤝 貢献する

ご協力をお待ちしております!以下の手順に従ってください。

  1. リポジトリをフォークする
  2. 機能ブランチを作成する
  3. 変更をコミットする
  4. ブランチにプッシュする
  5. プルリクエストを作成する

📝 ライセンス

このプロジェクトは、GNU General Public License v3.0 に基づいてライセンスされています。詳細については、 LICENSEファイルを参照してください。

🙏 謝辞

  • GitHub APIラッパー用のPyGithub
  • サーバーフレームワーク用のFastMCP
  • 安全なトークン暗号化のためのFernet

GIT-Pilotチームが❤️を込めて作成しました

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

FastMCP ベースのサーバーを通じて GitHub 操作用の包括的な API ラッパーを提供し、安全な認証によるリポジトリ管理、プル リクエスト、問題、その他の GitHub のやり取りを簡素化します。

  1. 🌟 特徴
    1. 🔐 認証とセキュリティ
    2. 📦 リポジトリ管理
    3. 🔄 プルリクエスト操作
    4. 📝 問題管理
    5. 🛠 技術的特徴
  2. 🚀 はじめに
    1. 前提条件
    2. インストール
    3. 基本的な使い方
    4. APIの例
  3. 🔧 構成
    1. 🛡 セキュリティ
      1. 🔄 レート制限
        1. 🧪 エラー処理
          1. 📈 ログ記録
            1. 🤝 貢献する
              1. 📝 ライセンス
                1. 🙏 謝辞

                  Related MCP Servers

                  • A
                    security
                    F
                    license
                    A
                    quality
                    Provides tools for mapping and analyzing GitHub repositories. It allows users to set a GitHub Personal Access Token and retrieve detailed information about a specified repository, including its structure and summary statistics.
                    Last updated -
                    2
                    12
                    TypeScript
                  • -
                    security
                    F
                    license
                    -
                    quality
                    Enables interaction with GitHub through the GitHub API, supporting file operations, repository management, advanced search, and issue tracking with comprehensive error handling and automatic branch creation.
                    Last updated -
                    9
                    1
                    TypeScript
                  • -
                    security
                    F
                    license
                    -
                    quality
                    Facilitates authentication with GitHub using OAuth protocol, allowing secure access and interaction with GitHub repositories and services.
                    Last updated -
                    2
                    Python
                    • Apple
                    • Linux
                  • -
                    security
                    F
                    license
                    -
                    quality
                    Enables interaction with GitHub issues via the Model Context Protocol, allowing users to list and create issues with secure authentication.
                    Last updated -
                    Python

                  View all related MCP servers

                  ID: 3uqvmqqorf