SG

stephanj/githubmcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

33 stars 7 forks 品質 60 トレンド 11MIT

このプロジェクトでは、GitHub API アクセス用のモデルコンテキストプロトコル(MCP)サーバーを実装しています。 LLMエージェントがGitHubリポジトリ、問題、プルリクエストと対話できる一連のツールを提供します.

概要

このプロジェクトでは、GitHub API アクセス用のモデルコンテキストプロトコル(MCP)サーバーを実装しています。 LLM エージェントが GitHub リポジトリ、問題、プルリクエスト、その他の GitHub リソースとやり取りできるようにする一連のツールを提供します。 サーバは、次の GitHub 操作を提供します。 - - - 認証されたユーザーのためのリストリポジトリ - リポジトリの詳細を取得する - リポジトリの検索 - - フィルタリングオプションで問題をリスト - 問題に関する詳細な情報を入手 - 新しい問題を作成 - コメントを追加 - 問題を検索 - - プルリクエストをフィルタリングオプションで一覧表示 - プルリクエストに関する詳細情報を入手 - プルリクエストのコメントを作成する - Merge pull request - - リポジトリにブランチをリスト - 新しいブランチを作成する - - - コミットに関する詳細な情報を取得する - フィルタリングオプションでコミットを一覧表示 - メッセージでコミットを検索する - - リポジトリからファイルコンテンツを取得する - リストディレクトリのコンテンツ - 作成または更新ファイル - リポジトリ内のコードを検索する

概要(AI 翻訳)

このプロジェクトでは、GitHub API アクセス用のモデルコンテキストプロトコル(MCP)サーバーを実装しています。 LLM エージェントが GitHub リポジトリ、問題、プルリクエスト、その他の GitHub リソースとやり取りできるようにする一連のツールを提供します。

##特徴

サーバは、次の GitHub 操作を提供します。

  • リポジトリ管理

  • 認証されたユーザーのためのリストリポジトリ

  • リポジトリの詳細を取得する

  • リポジトリの検索

  • 工事管理

  • フィルタリングオプションでの問題のリスト

  • 問題に関する詳細情報を入手

  • 新しい問題を作成する

  • 問題にコメントを追加する

  • 問題の検索

  • プルリクエスト管理

  • フィルタリングオプションでプルリクエストをリスト

  • プルリクエストに関する詳細情報を入手

  • プルリクエストのコメントを作成する

  • マージプルリクエスト

  • ブランチ管理

  • リポジトリのブランチのリスト

  • 新しいブランチを作成する

  • コミット管理

  • コミットに関する詳細情報を入手

  • フィルタリングオプションでコミットをリスト

  • メッセージでコミットを検索する

-コンテンツ管理

  • リポジトリからファイルコンテンツを取得する
  • リストディレクトリの内容
  • ファイルの作成または更新
  • リポジトリ内のコードを検索

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

GitHub MCP Server

This project implements a Model Context Protocol (MCP) server for GitHub API access. It provides a set of tools that allow LLM agents to interact with GitHub repositories, issues, pull requests, and other GitHub resources.

Features

The server provides the following GitHub operations:

  • Repository Management

    • List repositories for the authenticated user
    • Get repository details
    • Search for repositories
  • Issue Management

    • List issues with filtering options
    • Get detailed information about issues
    • Create new issues
    • Add comments to issues
    • Search for issues
  • Pull Request Management

    • List pull requests with filtering options
    • Get detailed information about pull requests
    • Create comments on pull requests
    • Merge pull requests
  • Branch Management

    • List branches in a repository
    • Create new branches
  • Commit Management

    • Get detailed information about commits
    • List commits with filtering options
    • Search for commits by message
  • Content Management

    • Get file contents from repositories
    • List directory contents
    • Create or update files
    • Search for code within repositories

These operations are exposed as tools for Large Language Models using the Model Context Protocol (MCP), allowing AI systems to safely interact with GitHub through its API.

Claude Desktop

DevoxxGenie IDEA plugin

Getting Started

Prerequisites

  • Java 17 or higher
  • Maven 3.6+
  • Spring Boot 3.3.6
  • Spring AI MCP Server components
  • A GitHub account and personal access token

Building the Project

Build the project using Maven:

mvn clean package

Running the Server

Run the server using the following command:

java -jar target/GitHubMCP-1.0-SNAPSHOT.jar

The server can use STDIO for communication with MCP clients or can be run as a web server.

Environment Variables

The GitHub MCP server supports the following environment variables for authentication:

  • GITHUB_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN: Your GitHub personal access token
  • GITHUB_HOST: The base URL of your GitHub instance (e.g., github.com or github.mycompany.com for GitHub Enterprise)
  • GITHUB_REPOSITORY: Default repository to use if not specified in API calls (e.g., owner/repo)

You can set these environment variables when launching the MCP server, and the GitHub services will use them as default values. This allows you to avoid having to provide authentication details with every API call.

Usage with MCP Clients

Using with Claude Desktop

Edit your claude_desktop_config.json file with the following:

{
  "mcpServers": {
    "github": {
      "command": "java",
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "github": { "command": "java", "args": [ "-Dspring.ai.mcp.server.stdio=true", "-Dspring.main.web-application-type=none", "-Dlogging.pattern.console=", "-jar", "/path/to/GitHubMCP/target/GitHubMCP-1.0-SNAPSHOT.jar" ], "env": { "GITHUB_TOKEN": "your-github-token-here", "GITHUB_HOST": "github.com", "GITHUB_REPOSITORY": "your-username/your-repository" } } } }