Skip to main content
Glama
rishav0004

GitHub MCP Server (Custom)

by rishav0004

GitHub MCP Server(カスタム)

AI エージェントに GitHub への完全な CRUD アクセス(リポジトリ、イシュー、プルリクエスト、ブランチ、コメント、レビュー、マージ)を提供するカスタム Model Context Protocol(MCP)サーバーです。公式の Python mcp SDK(FastMCP)と、httpx を介した GitHub の REST API を使用して構築されています。

ツールは合計 23 個 — 完全なリストは server.py を参照してください。ハイライト:

領域

ツール

リポジトリ

list_repos, get_repo

イシュー

list_issues, get_issue, create_issue, update_issue, close_issue, add_issue_comment, list_issue_comments

ブランチ

list_branches, get_branch, create_branch, delete_branch

プルリクエスト

list_pull_requests, get_pull_request, create_pull_request, update_pull_request, merge_pull_request, list_pr_files

レビュー

list_pr_reviews, create_pr_review

コミット

list_commits, get_commit

セットアップ

  1. 依存関係をインストールする

    pip install -r requirements.txt
  2. GitHub トークンを作成する

    https://github.com/settings/tokens にアクセスし、以下のいずれかを作成してください:

    • repo スコープを持つクラシック PAT、または

    • ContentsIssuesPull requestsMetadata を読み取り/書き込みに設定し、エージェントに操作させたいリポジトリにスコープを限定したファイングレインド PAT

  3. トークンを環境変数として設定する

    export GITHUB_TOKEN=ghp_your_token_here
  4. スタンドアロンで実行する(任意の動作確認)

    python server.py

    MCP クライアントが stdio 経由で接続するのを待機するだけです — これは正常な動作で、Web サーバーではありません。

Related MCP server: GitHub MCP Server

Claude Desktop への接続

これを claude_desktop_config.json に追加してください(Windows では %APPDATA%\Claude\claude_desktop_config.json、macOS では ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "github": {
      "command": "python",
      "args": ["/absolute/path/to/server.py"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Claude Desktop を再起動すると、GitHub ツールがツールピッカーに表示されます。

独自のエージェントパイプラインへの接続(例:Jira → GitHub → Teams プロジェクト)

これは標準的な MCP stdio サーバーであるため、MCP 互換のクライアントまたは SDK はどれでも、これをサブプロセスとして起動し、stdin/stdout 経由で通信できます — MCP C# SDK を使用する .NET ホストも、オーケストレーターが多言語対応の場合の Python/TypeScript SDK も同様です。クライアントの接続先は次のとおりです:

command: python
args: ["/absolute/path/to/server.py"]
env: { "GITHUB_TOKEN": "<token>" }

拡張方法

新しいツールを追加するには、server.py@mcp.tool() デコレータを付けた関数を追加して、GitHub REST API に対して _request(method, path, ...) を呼び出すだけです。docstring はモデルに表示されるツールの説明になり、型ヒントは入力スキーマになります — したがって、両方を正確に保ってください。

注意事項

  • すべての書き込み操作(create_*update_*delete_*merge_*)は GitHub 上で実際に変更を加えます — ドライランモードはありません。特に merge_pull_requestdelete_branch は、スクラッチリポジトリで先にテストすることを検討してください。

  • レート制限は GitHub の標準的な REST API の制限に従います(本稿執筆時点では、認証済みリクエストは 1 時間あたり 5,000 リクエスト)— サーバー側で独自のスロットリングは行いません。

  • GitHub からのエラー(認証エラー、404、マージ競合など)は、API のレスポンスボディを含む RuntimeError として発生します。そのため、呼び出し元のエージェントは対処できる読みやすいメッセージを受け取れます。

F
license - not found
Not graded
quality - not tested
C
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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides secure, controlled access to GitHub operations through the Model Context Protocol with enterprise-grade security features including secret detection, vulnerability scanning, rate limiting, and full audit trails. Supports repository management, file operations, branch creation, commits, and GitHub Actions workflows.
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables LLMs to interact with GitHub repositories, issues, pull requests, and workflows through the Model Context Protocol. It provides a comprehensive set of tools for repository management, issue tracking, code search, and CI/CD automation.
  • A
    license
    C
    quality
    D
    maintenance
    Enables AI assistants to directly operate GitHub repositories, such as listing issues, through the Model Context Protocol.
    2
    111
    2
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • Git-backed platform for skills, tools, and context for AI agents

  • A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…

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/rishav0004/custom-github-mcp'

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