mcpField
G
GitHub MCP Server

GitHub MCP Server

Local
github.com/yamagaiVersion Control0Updated 82w ago

About GitHub MCP Server

GitHub MCP Server is a Go server that gives LLM applications a standardized interface to the GitHub API. It supports repository and file operations as well as creating and reviewing pull requests, and can run over stdio or SSE.

Key features

  1. 01Search and create repositories
  2. 02Read, create, and update files
  3. 03Push multiple files
  4. 04Fork repositories
  5. 05Create and inspect pull requests
  6. 06Add pull request reviews

Use cases

  1. 01Find repositories matching a query
  2. 02Update files in a GitHub repository
  3. 03Submit changes across multiple files
  4. 04Create and review pull requests

MCP support

The server exposes GitHub repository, file, and pull request operations as MCP tools. It supports stdio and SSE transports, with GitHub token authentication.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"github-mcp-server-sse": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"build"
]
}
}
}
Run commanddocker run -i --rm build

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocibuild

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

GitHub MCP Server

Model Context Protocol (MCP) を使用したGitHub統合サーバーです。このサーバーはLLM(大規模言語モデル)アプリケーションがGitHub APIと通信するための標準化されたインターフェースを提供します。

機能

このサーバーは以下の機能を提供します:

  • リポジトリの検索
  • リポジトリの作成
  • ファイルの内容の取得
  • ファイルの作成・更新
  • 複数ファイルの一括プッシュ
  • リポジトリのフォーク
  • Pull Requestの作成
  • Pull Requestの詳細取得
  • Pull Requestへのレビュー追加

インストール

go get github.com/yamagai/github-mcp-server-sse

使用方法

標準入出力モード (Stdio)
# 環境変数でGitHubトークンを設定
export GITHUB_TOKEN=your_github_token

# サーバーを起動(デフォルトは標準入出力モード)
github-mcp

# または明示的に標準入出力モードを指定
github-mcp -t stdio
SSEモード
# 環境変数でGitHubトークンを設定(または各リクエストのAuthorizationヘッダーで指定)
export GITHUB_TOKEN=your_github_token

# デフォルトポート(8080)でSSEサーバーを起動
github-mcp -t sse

# カスタムポートでSSEサーバーを起動
github-mcp -t sse -p 3000

SSEモードでは、HTTPリクエストのAuthorizationヘッダーにGitHubトークンを含めることもできます:

curl -H "Authorization: Bearer YOUR_GITHUB_TOKEN" http://localhost:8080/events
Dockerコンテナでの使用

SSEモードでサーバーを実行するDockerコンテナが提供されています。

ビルド方法
# Dockerイメージをビルド
docker build -t github-mcp-server-sse .
実行方法
# 環境変数でGitHubトークンを指定して実行
docker run -p 8080:8080 -e GITHUB_TOKEN=your_github_token github-mcp-server-sse

# カスタムポートで実行(環境変数でポートを指定)
docker run -p 3000:3000 -e GITHUB_TOKEN=your_github_token -e PORT=3000 github-mcp-server-sse

ツール一覧

ツール名説明
search_repositoriesGitHubリポジトリを検索します
create_repository新しいGitHubリポジトリを作成します
get_file_contentsGitHubリポジトリからファイルの内容を取得します
create_or_update_fileGitHubリポジトリにファイルを作成または更新します
push_files複数のファイルを一度にGitHubリポジトリにプッシュします
fork_repositoryGitHubリポジトリをフォークします
create_pull_requestGitHubリポジトリに新しいPull Requestを作成します
get_pull_requestGitHubリポジトリからPull Requestの詳細を取得します
create_pull_request_reviewPull Requestにレビューを作成します

開発

# 依存関係の解決
go mod tidy

# ビルド
go build

# テスト
go test ./...

コマンドラインオプション

オプション短縮形説明デフォルト値
--transport-t使用するトランスポートタイプ (stdio または sse)stdio
--port-pSSEサーバーのポート番号8080

参考

このプロジェクトはMCP-Goライブラリを使用しています。詳細なドキュメントについては、そちらを参照してください。

ライセンス

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.