Skip to main content
Glama
pranjal-sen-2004

GitHub Activity MCP Server

🚀 GitHub Activity MCP Server

FastMCPPyGithub で構築された MCP(Model Context Protocol)サーバーで、AI アシスタントを GitHub に接続し、リポジトリの検索、Issue や PR の管理、コントリビューションの分析などを行うことができます。

MCP とは? Model Context Protocol は、AI アシスタントが統一されたインターフェースを通じて外部データやツールに接続できるようにするオープンスタンダードです。「AI 向けの USB-C」と考えてください。


✨ 機能

このサーバーは 13 個のツール3 個のリソースプロバイダー3 個のプロンプトテンプレートを備え、MCP の 3 つのプリミティブすべてをカバーしています。

🔧 ツール(モデル制御)

AI が自律的に実行できるアクション:

ツール

説明

search_repositories

クエリ、言語、スター数で GitHub リポジトリを検索する

get_repository

リポジトリの詳細情報(スター数、フォーク数、トピックなど)を取得する

get_file_contents

リポジトリ内の任意のファイルを読み取る

list_commits

フィルター付きで最近のコミットを一覧表示する

list_issues

状態、ラベル、担当者のフィルターで Issue を一覧表示する

get_issue

Issue の詳細とコメントを取得する

create_issue

新しい Issue を作成する

add_issue_comment

Issue にコメントを追加する

list_pull_requests

状態/ブランチのフィルターで PR を一覧表示する

get_pull_request

PR の詳細とマージ状態を取得する

get_pull_request_diff

PR のコード変更を表示する

get_user_profile

ユーザーの公開プロフィールを取得する

list_user_repos

ユーザーのリポジトリを一覧表示する

📦 リソース(アプリケーション制御)

AI が読み取れるコンテキストデータ:

リソース URI

説明

github://repo/{owner}/{repo}/readme

リポジトリの README(マークダウン)

github://repo/{owner}/{repo}/tree

ファイルツリーの全一覧

github://repo/{owner}/{repo}/languages

パーセンテージ付きの言語別内訳

💬 プロンプト(ユーザー起動)

あらかじめ用意されたワークフローテンプレート:

プロンプト

説明

analyze-repo

総合的なリポジトリ分析

review-pr

ベストプラクティスに沿ったコードレビュー

issue-triage

オープンな Issue の分類と優先順位付け


Related MCP server: GitHub MCP Server

🏗️ アーキテクチャ

graph LR
    A[AI Assistant] <-->|MCP Protocol| B[GitHub MCP Server]
    B <-->|REST API| C[GitHub API]

    subgraph "MCP Server (FastMCP)"
        B --> D[Tools]
        B --> E[Resources]
        B --> F[Prompts]
    end

    subgraph "Tools"
        D --> D1[Repos]
        D --> D2[Issues]
        D --> D3[Pull Requests]
        D --> D4[Users]
    end

🚀 クイックスタート

前提条件

  • Python ≥ 3.10

  • GitHub パーソナルアクセストークン(任意。ただし、レート制限を上げるために推奨)

インストール

# Clone the repository
git clone https://github.com/YOUR_USERNAME/github-mcp-server.git
cd github-mcp-server

# Install dependencies
pip install fastmcp PyGithub

GitHub トークンの設定(任意)

repo スコープと read:user スコープを持つ パーソナルアクセストークン を作成します:

# Linux/macOS
export GITHUB_TOKEN=ghp_your_token_here

# Windows (PowerShell)
$env:GITHUB_TOKEN = "ghp_your_token_here"

注: トークンがない場合、API リクエストは 1 時間あたり 60 回に制限されます。トークンがあれば 1 時間あたり 5,000 回利用できます。

サーバーの起動

# Run directly
fastmcp run src/server.py

# Or with Python
python -m src.server

FastMCP Dev Mode でテストする

fastmcp dev src/server.py

⚙️ 設定

Claude Desktop

Claude Desktop の設定ファイルに追加します(macOS では ~/Library/Application Support/Claude/claude_desktop_config.json、Windows では %APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "github": {
      "command": "fastmcp",
      "args": ["run", "src/server.py"],
      "cwd": "/absolute/path/to/github-mcp-server",
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Cursor

Cursor の MCP 設定(プロジェクト内またはグローバル設定の .cursor/mcp.json)に追加します:

{
  "mcpServers": {
    "github": {
      "command": "fastmcp",
      "args": ["run", "src/server.py"],
      "cwd": "/absolute/path/to/github-mcp-server",
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

VS Code(GitHub Copilot)

VS Code の設定(.vscode/settings.json)に追加します:

{
  "mcp": {
    "servers": {
      "github": {
        "command": "fastmcp",
        "args": ["run", "src/server.py"],
        "cwd": "/absolute/path/to/github-mcp-server",
        "env": {
          "GITHUB_TOKEN": "ghp_your_token_here"
        }
      }
    }
  }
}

📁 プロジェクト構成

github-mcp-server/
├── src/
│   ├── __init__.py
│   ├── server.py             # FastMCP server instance & entry point
│   ├── github_client.py      # PyGithub client wrapper & error handling
│   ├── resources.py          # Resource providers (README, tree, languages)
│   ├── prompts.py            # Prompt templates (analyze, review, triage)
│   └── tools/
│       ├── __init__.py
│       ├── repos.py          # Repository tools (search, get, file contents, commits)
│       ├── issues.py         # Issue tools (list, get, create, comment)
│       ├── pulls.py          # Pull request tools (list, get, diff)
│       └── users.py          # User tools (profile, repos)
├── pyproject.toml
├── README.md
├── LICENSE
└── .gitignore

🛠️ 技術スタック

技術

用途

FastMCP

高レベルな MCP サーバーフレームワーク

PyGithub

GitHub REST API クライアント

Model Context Protocol

AI ツール統合のためのオープンスタンダード


🤝 コントリビューション

コントリビューションを歓迎します。手順は以下のとおりです:

  1. リポジトリをフォークします

  2. フィーチャーブランチを作成します(git checkout -b feature/amazing-feature

  3. 変更をコミットします(git commit -m 'Add amazing feature'

  4. ブランチにプッシュします(git push origin feature/amazing-feature

  5. プルリクエストを開きます


📄 ライセンス

このプロジェクトは MIT License の下でライセンスされています。詳細は LICENSE ファイルを参照してください。


Install Server
A
license - permissive license
A
quality
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

View all related MCP servers

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.

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/pranjal-sen-2004/github-mcp-server'

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