GithubMCP
GithubMCP
本番運用に耐えるパーソナル開発者アシスタント MCP サーバー
AI モデル(Claude、Cursor など)を GitHub のワークフロー、CI/CD パイプライン、ローカルワークスペースのコンテキスト、コード分析ツールにシームレスに接続します。
概要
GithubMCP は、開発者向けに設計された Model Context Protocol(MCP)サーバーです。AI アシスタントを開発環境に直接橋渡しし、以下を可能にします。
GitHub リポジトリ、プルリクエスト、イシュー、コミット、コードを、公開・非公開を問わず調査できます。
会話を通じて、リポジトリのプライバシーと公開状態(public/private)を直接管理できます。
CI/CD ワークフローの実行を監視し、失敗した GitHub Actions のビルドステップを解析できます。
ユーザーが定義した許可パス内で、ローカルファイルシステムのワークスペースを安全に調査できます。
コード品質の分析、複雑度のメトリクス算出、TODO の検出、潜在的なセキュリティの兆候(ハードコードされたシークレット)の検出を実行できます。
STDIO(Claude Desktop、Cursor)と SSE(Web クライアント向け Server-Sent Events)の両方の転送モードに対応しています。
Related MCP server: GitHub MCP Server
ツールスイート リファレンス
GithubMCP は 13 の専門ツールを提供します。
カテゴリ | ツール名 | 説明 |
GitHub |
| 言語・ソートフィルタ付きで、公開/非公開のユーザー・組織リポジトリを検索します。 |
GitHub |
| PR の詳細、変更ファイル、追加・削除の統計、レビューコメントを取得します。 |
GitHub |
| イシューの状態、アサインされた担当者、関連する PR、ラベル、最新コメントを確認します。 |
GitHub |
| 拡張子フィルタ付きで、リポジトリ横断のコードパターンを検索します。 |
GitHub |
| 差分統計と作成者を含む直近のコミット履歴を取得します。 |
GitHub |
| リポジトリの公開状態を 非公開 と 公開 の間で変更します。 |
CI/CD |
| GitHub Actions のステータス(成功/失敗/進行中)と失敗したステップのログを監視します。 |
ファイルシステム |
| MIME タイプの判定とサイズ検証による、ローカルファイルの安全な読み取りを実現します。 |
ファイルシステム |
| ファイルサイズ、mtime、glob フィルタを含むディレクトリツリー構造を一覧表示します。 |
ファイルシステム |
| 正規表現やパターンを、周辺の行コンテキスト付きで非同期に grep 検索します。 |
ファイルシステム |
| プロジェクトの技術スタック(Node、Python、Rust、Go、Docker)と開発コマンドを検出します。 |
分析 |
| git 参照を比較し、コミットを新機能・修正・破壊的変更などにマッ依頼します。 |
分析 |
| コード行数、複雑度の見積もり、TODO コメント、シークレットの匂い(ハードコード)を算出します。 |
クイックスタート
1. 前提環境
Python 3.11+
uv (高速な Python パッケージマネージャ)
uv がまだインストールされていない場合は、インストールします。
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh2. クローンとセットアップ
git clone https://github.com/Dhananjayrbiraris/github-mcp.git
cd github-mcp
# Install dependencies and sync virtual environment
uv sync3. 環境設定
テンプレート .env.example を .env にコピーします。
cp .env.example .envGitHub の Personal Access Token を登録して、.env を編集します。
# GitHub Personal Access Token (Classic PAT with 'repo', 'workflow', 'read:user' scopes)
GITHUB_TOKEN=ghp_your_github_token_here
# Default GitHub Username (Optional)
GITHUB_USERNAME=your_username
# Sandboxed directories allowed for local filesystem operations
ALLOWED_PATHS=["~/projects", "~/workspace", "."]
# Max file size limit in MB for reading files
MAX_FILE_SIZE_MB=10
# Default Transport mode: "stdio" or "sse"
TRANSPORT=stdioGitHub Token の生成方法: GitHub の GitHub Settings -> Developer Settings -> Personal Access Token (classic) にアクセスし、
repo、workflowでread:userのスコープを持つ Token を生成します。
クライアント設定ガイド
A. Claude Desktop
1. Claude Desktop の設定ファイルを開く
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
2. github-mcp サーバーを追加します
{
"mcpServers": {
"github-mcp": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/github-mcp",
"run",
"python",
"-m",
"github_mcp.main",
"--transport",
"stdio"
],
"env": {
"GITHUB_TOKEN": "ghp_your_personal_access_token_here"
}
}
}
}(Windows ではバックスラッシュを使用します。例: C:\\Users\\yourname\\path\\to\\github-mcp。またはフォワードスラッシュを使用します。)
3. Claude Desktop を再起動します
Claude Desktop を開くと、プロンプトボックスの右下にあるツールアイコンをクリックすると、接続されているすべての GithubMCP ツールを確認できます。
B. Cursor IDE
Cursor では次の手順を行います。
カーソル設定画面を開きます: Cursor Settings → Features → MCP
+ Add New MCP Server をクリックします。
フォームを入力します:
Name:
github-mcpType:
commandCommand:
uv --directory /path/to/github-mcp run python -m github_mcp.main --transport stdio
C. Server-Sent Events (SSE) モード / Web クライアント
HTTP 経由で MCP サーバーを起動する場合:
uv run python -m github_mcp.main --transport sse --host 0.0.0.0 --port 8000SSE エンドポイントは http://localhost:8000/sse からアクセスできます。
セキュリティとサンドボックス
パスサンドボックス: ローカルファイルシステムツール(
read_file、list_directory、search_local_files、get_project_context)は、ALLOWED_PATHSに対してパストラバーサラル検証を厳密に適用します。許可リスト外のパスにアクセスすると、SecurityErrorが発生します。シークレット管理: トークンやクレデンシャルがログに記録されたり、公開されたりすることはありません。
レートリミット耐性: GitHub API のレート制限によるスロットリングに対して、自動で指数バックオフのリトライを実行します。
開発とテスト
以下でテストと品質チェックを含むスイート全体を実行できます。
# Run pytest unit tests
uv run pytest
# Run linter
uv run ruff check .
# Check code formatting
uv run ruff format --check .
# Run strict type checking
uv run mypy src/リポジトリ構造
github-mcp/
├── .github/workflows/ci.yml # GitHub Actions CI workflow
├── src/github_mcp/
│ ├── __init__.py
│ ├── main.py # Server entrypoint & MCP tool registrations
│ ├── config.py # Pydantic Settings model
│ ├── github_tools.py # GitHub API integrations & visibility controls
│ ├── file_tools.py # Sandboxed local filesystem operations
│ ├── ci_tools.py # GitHub Actions CI/CD monitoring
│ ├── analysis_tools.py # Diff categorization & code quality analyzer
│ └── utils.py # Path safety, error handling, rate limiting
├── tests/
│ ├── conftest.py # Pytest fixtures and mocks
│ ├── test_github.py # GitHub tools unit tests
│ ├── test_files.py # Filesystem tools unit tests
│ └── test_ci.py # CI status tools unit tests
├── docs/
│ ├── architecture.md # System architecture & data flow
│ └── tools_reference.md # Complete API schemas for all 13 tools
├── pyproject.toml # Project dependencies & tool configurations
├── .env.example # Environment variable template
├── CONTRIBUTING.md # Open-source contribution guidelines
├── SECURITY.md # Security policy & vulnerability reporting
└── LICENSE # MIT Licenseライセンス
このプロジェクトは MIT License の下で提供されています。個人用途・商用用途ともに無料です。
Maintenance
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
- AlicenseAqualityNot gradedmaintenanceConnects AI assistants to GitHub Actions workflows to monitor CI/CD pipelines, view run logs, diagnose failures, and optionally trigger or manage workflows with granular permission controls.101
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to manage GitHub repositories, branches, issues, pull requests, releases, and actions through natural language.1155MIT
- FlicenseBqualityDmaintenanceEnables AI assistants to inspect local Git repositories and interact with the GitHub API for reading commits, diffs, files, issues, comments, pull requests, and project boards.10121
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to interact with GitHub via natural language, supporting repository management, issue tracking, file commits, and more.
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Dhananjayrbiraris/github-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server