概要
GitHub 公式の MCP サーバーを通じて、Claude、ChatGPT、Copilot から GitHub を操作できます。コードやコミットの閲覧、リポジトリ検索、Issue のトリアージ、プルリクエストの作成とレビューに対応します。
ガイド付きセットアップ
GitHub を Microsoft Copilot に 2 分で接続
AnythingMCP Cloud の無料トライアルを始め、ガイド付きセットアップで GitHub を接続して、MCP URL を Microsoft Copilot に追加します。コードもサーバーの運用も不要です。
クレジットカード不要 · 7日間の試用 · セルフホストの選択肢あり
こう聞いてみよう
GitHub のサンプルプロンプト
プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。
Claude は AI のため誤ることがあります。回答をご確認ください。
💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → GitHub をクリック、認証情報を貼り付け、MCP API キーを発行 — 完了です。Docker も
git cloneもローカルサーバーも不要。
GitHub + Microsoft Copilot
GitHub 公式の MCP サーバーを通じて、Claude、ChatGPT、Copilot から GitHub を操作できます。コードやコミットの閲覧、リポジトリ検索、Issue のトリアージ、プルリクエストの作成とレビューに対応します。
前提条件
完全なセットアップ手順はコネクタ自体に組み込まれています (ストアでコネクタを選択すると表示)。必要な環境変数:
GITHUB_PAT
ステップ 1 — 認証情報を取得
AnythingMCP は、personal access token を使って GitHub 公式のリモート MCP サーバー (https://api.githubcopilot.com/mcp/) に接続します。ツールは GitHub のサーバーが提供します。インストール時に AnythingMCP が最新のツール一覧を読み込み、すべてのツールに github_ プレフィックスが付きます。GitHub がツールを追加したら、コネクタを開いて Discover tools をクリックしてください。
- GitHub で Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token を開きます (直接リンク)。resource owner (自分のアカウントまたは組織)、有効期限を選び、Only select repositories で AI にアクセスさせるリポジトリだけを指定します。
- Repository permissions で Contents、Issues、Pull requests を Read-only に設定します。AI にブランチ作成、コミット、Issue やプルリクエストの作成をさせる場合は Read and write にします。Metadata (読み取り専用) は自動で追加されます。
github_get_teamsとgithub_get_team_membersを使うには、組織の権限 Members: Read-only も追加します。 - owner が組織の場合、先に組織のオーナーがトークンを承認する必要があることがあります (組織の Settings → Personal access tokens → Pending requests)。SAML シングルサインオンを使う組織では、トークンを SSO 用に承認する必要もあります。
- トークンを
GITHUB_PATに貼り付けてインストールします。クラシックトークン (ghp_…、スコープrepo、チーム用にread:org) も使えますが、アクセスできるすべてのリポジトリに届くため、fine-grained トークンのほうが安全です。
組織のポリシー: Copilot Business または Copilot Enterprise では、組織で MCP servers in Copilot ポリシーが有効になっている必要があります。組織は personal access token を制限でき、Enterprise Managed Users のエンタープライズでは無効化されている場合があります。データレジデンシー付きの GitHub Enterprise Cloud では、コネクタのベース URL を https://copilot-api.<your-subdomain>.ghe.com/mcp に変更します。GitHub Enterprise Server にはホスト型の MCP サーバーはありません。
ツールセットと読み取り専用モード: GitHub は既定で context、repos、issues、pull_requests、users のツールセットを提供します。変更するには、コネクタエディタでヘッダー X-MCP-Toolsets を追加します (例: repos,issues,pull_requests,actions、または all)。読み取りツールだけを公開するには X-MCP-Readonly: true を追加します。その後 Discover tools をクリックします。
インストール時に無効: github_merge_pull_request、github_push_files、github_create_or_update_file、github_delete_file。ツールセットのヘッダーで後から追加されるツール (リポジトリの削除など) も無効の状態で追加されます。どれもコネクタでツールごとに有効にできます。すべての操作はトークンの所有者として実行されます。公開リポジトリの Issue やプルリクエストの本文は信頼できない入力として扱ってください (X-MCP-Lockdown: true を付けると、push 権限のない作成者のコンテンツが非表示になります)。
最初の呼び出し: github_get_me でトークンの所有者を確認し、続いて github_search_repositories、github_get_file_contents、github_list_issues、github_pull_request_read を使います。401 はトークンが誤っている、期限切れ、または取り消されていることを示します。403 は権限不足、組織の承認や SSO 承認の保留、またはポリシーによるものです。プライベートリポジトリで 404 が返る場合、通常はトークンにそのリポジトリが含まれていません。
ステップ 2 — アダプターをインストール
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
ステップ 3 — Microsoft Copilot にコネクタを追加
サーバーURL: AnythingMCP で MCP Servers を開き、このコネクタがあるサーバーを選んで URL(
https://cloud.anythingmcp.com/mcp/…)をコピーします。このガイドでYOUR_SERVER_IDと表示されている箇所に使ってください。
Microsoft Copilot は、Copilot Studio で作成したエージェントを通じて MCP サーバーを使います。AnythingMCP をツールとしてエージェントに追加し、そのエージェントを Microsoft 365 Copilot と Teams に公開します。Copilot Studio は Microsoft のクラウドから Streamable HTTP で接続し、AnythingMCP はこれに対応しています。
- Copilot Studio でエージェントを開き(または新規作成し)、Tools で Add a tool → New tool → Model Context Protocol を選びます。
- Server name(例:
AnythingMCP)、コネクタでできることを説明する Server description、Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_IDを入力します。Copilot Studio はこの説明をもとに、いつサーバーを呼び出すかを判断します。 - 認証で API key を選び、Type を Header、ヘッダー名を
X-API-Keyにして Create を選びます。 - Add tool で Create a new connection を選び、AnythingMCP の MCP API キー(MCP Servers → 対象のサーバー → API keys)を貼り付けて Add to agent を選びます。
- エージェントの Test ウィンドウで試します。
GitHubのツールが必要になる依頼をしてみましょう。 - Publish を選び、Channels → Microsoft 365 and Microsoft Teams で Make agent available in Microsoft Copilot を選択したまま Add channel を選びます。See agent in Teams で自分用にインストールされます。Microsoft 365 Copilot では @ を入力してエージェントを選びます。
ユーザーごとにサインインさせたい場合は、API キーの代わりに OAuth 2.0 → Dynamic discovery を選びます。各ユーザーは、エージェントが初めて呼び出すときに AnythingMCP にサインインします。
セルフホストの場合は、https://cloud.anythingmcp.com の代わりにインスタンスの公開 HTTPS アドレスを使ってください。Copilot Studio は Microsoft のクラウドから接続するため、localhost は使えません。
利用可能なツール
| Tool | What it does |
|---|---|
github_add_comment_to_pending_review | Add review comment to the requester's latest pending pull request review |
github_add_issue_comment | Add a comment and/or reaction to a specific issue or issue comment in a GitHub repository |
github_add_reply_to_pull_request_comment | Add a reply and/or reaction to an existing pull request comment |
github_create_branch | Create a new branch in a GitHub repository, starting from from_branch or, when it is omitted, from the repository's default branch |
github_create_or_update_file | Create or update a single file in a GitHub repository |
github_create_pull_request | Create a new pull request in a GitHub repository from the head branch into the base branch, optionally as a draft and with reviewers… |
github_create_repository | Create a new GitHub repository in your account or specified organization |
github_delete_file | Delete a file from a GitHub repository by committing its removal to the given branch with a commit message |
github_fork_repository | Fork a GitHub repository to your account or specified organization |
github_get_commit | Get details for a commit from a GitHub repository: message, author and, depending on detail, the stats or the full patch of the changed… |
github_get_file_contents | Get the contents of a file or directory from a GitHub repository |
github_get_label | Get a specific label from a repository by its name, with its color and description |
github_get_latest_release | Get the latest release in a GitHub repository, with its tag, name, release notes and assets |
github_get_me | Get details of the authenticated GitHub user |
github_get_release_by_tag | Get a specific release by its tag name in a GitHub repository |
github_get_tag | Get details about a specific git tag in a GitHub repository, including the object the tag points to |
github_get_team_members | Get member usernames of a specific team in an organization |
github_get_teams | Get details of the teams the user is a member of |
github_issue_read | Get information about a specific issue in a GitHub repository |
github_issue_write | Create a new or update an existing issue in a GitHub repository |
github_list_branches | List branches in a GitHub repository with the commit each one points to; paginated with page and perPage |
github_list_commits | Get list of commits of a branch in a GitHub repository |
github_list_issue_fields | List issue fields for a repository or organization |
github_list_issue_types | List supported issue types for a repository or its owner organization |
github_list_issues | List issues in a GitHub repository |
github_list_pull_requests | List pull requests in a GitHub repository |
github_list_releases | List releases in a GitHub repository with their tags, names and release notes; paginated with page and perPage |
github_list_repository_collaborators | List collaborators of a GitHub repository |
github_list_tags | List git tags in a GitHub repository with the commit each tag points to; paginated with page and perPage |
github_merge_pull_request | Merge a pull request in a GitHub repository with the merge, squash or rebase method, optionally only while its head is still expectedHeadSha |
(showing 30 of 46 tools — install the connector to see them all)
FAQ
どの Copilot が対象ですか? 職場で使う Microsoft 365 Copilot で、Copilot Studio のエージェントを通じて利用します。個人アカウント向けの Microsoft Copilot アプリでは、独自の MCP サーバーを追加できません。
何が必要ですか? エージェントを作成するために、Copilot Studio を利用できる職場アカウント(ライセンスまたは試用版)が必要です。Microsoft 365 Copilot や Teams でエージェントを使う人には、エージェントへのアクセス権が必要です。共有するか、管理者に組織向けに公開してもらってください。組織が Power Platform コネクタにデータ ポリシーを適用している場合は、MCP サーバーにも適用されます。
エージェントがツールを呼び出しません。 ヘッダー名が正確に X-API-Key であること、キーが URL と同じ MCP サーバーのものであることを確認し、Server description を具体的に書いてください。Copilot Studio はこの説明をもとにサーバーを呼び出すかどうかを判断します。変更のたびにエージェントを再公開し、開いているチャットでは "start over" と入力すると新しいバージョンになります。
次のステップ
このガイドは役に立ちましたか?