0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Copilot ChatでGitHub参照できるようにするためMCPサーバ導入してみた

Posted at

はじめに

とりあえずMCPサーバの導入手順を学びたい!ということで、
GitHubのMCPサーバをVS Codeにインストールし、GitHubのリポジトリ情報をVS CodeのCopilot Chatから参照できるようにします。


使用するMCPサーバ

今回は、公式が提供する以下のリポジトリを使用します。


MCPサーバ導入手順

GitHubアクセストークンを取得する

  1. GitHubの右上アイコン → [Settings] をクリック
  2. 左メニューから「Developer settings」 → 「Personal access tokens」 → 「Tokens (classic)」へ進む
  3. 「Generate new token」 → 「Generate new token (classic)」を選択し、トークン作成画面を開く
  4. 今回は read:packagesrepo にチェックを入れてトークンを作成する

✅ 作成したトークンは必ずコピーしておくこと(再表示できません)

VS CodeにMCPサーバをインストールする

今回はローカルPC上にMCPサーバを立てます。
以下のリポジトリのREADMEから「Install Server」をクリックします。

スクリーンショット 2025-07-19 205546.png

VS Codeが開かれるので「インストール」をクリックします。

image.png

歯車アイコンから「サーバの起動」を選択します。

image.png

サーバが起動しました!

image.png

動作確認する

Copilot ChatをAgentモードに切り替えます。

image.png

GitHubの参照が必要な質問を適当に投げてみます。

image.png

Copilot Chatから、MCPサーバを経由してGitHubの情報を取得することができました!


おわりに

本記事では割愛しましたが、筆者はCopilot ChatにAgentモードがあることを知らず、いろいろ試行錯誤してしまいました。
やはり、公式の情報を確認しながら進めるのが大切ですね……!


参考リンク

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?