Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
MCP serverAn toànKết nối & tự động hoáDễ cho người mới

github-mcp-server

github · github/github-mcp-server

Kết nối các công cụ AI trực tiếp với GitHub, cho phép các agent quản lý kho lưu trữ, vấn đề, PR và phân tích code bằng ngôn ngữ tự nhiên.

GitHub's official MCP Server

34k sao5.2kGiấy phép: MITCập nhật 3 ngày trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Yêu cầu một AI agent tóm tắt hoạt động gần đây trên nhiều kho lưu trữ GitHub.
  • Yêu cầu AI tự động tạo, cập nhật hoặc phân loại các vấn đề và yêu cầu kéo trên GitHub.
  • Sử dụng AI để phân tích các mẫu code hoặc xem xét các phát hiện bảo mật trong codebase của bạn.

Thử hỏi agent của bạn

  • “Tóm tắt hoạt động gần đây (7 ngày qua) trên các kho lưu trữ 'frontend-app' và 'backend-api' của tôi trên GitHub. Bao gồm các vấn đề mới, PR đã đóng và các commit chính.”
  • “Tạo một vấn đề GitHub mới trong kho lưu trữ 'my-project' với tiêu đề 'Bug: API endpoint /users trả về 500' và gán cho @johndoe.”
  • “Phân tích các phát hiện bảo mật trong kho lưu trữ 'payment-gateway' để tìm bất kỳ cảnh báo Dependabot quan trọng nào từ tháng trước.”

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

GitHub MCP Server

The GitHub MCP Server connects AI tools directly to GitHub's platform. This gives AI agents, assistants, and chatbots the ability to read repositories and code files, manage issues and PRs, analyze code, and automate workflows. All through natural language interactions.

Use Cases

  • Repository Management: Browse and query code, search files, analyze commits, and understand project structure across any repository you have access to.
  • Issue & PR Automation: Create, update, and manage issues and pull requests. Let AI help triage bugs, review code changes, and maintain project boards.
  • CI/CD & Workflow Intelligence: Monitor GitHub Actions workflow runs, analyze build failures, manage releases, and get insights into your development pipeline.
  • Code Analysis: Examine security findings, review Dependabot alerts, understand code patterns, and get comprehensive insights into your codebase.
  • Team Collaboration: Access discussions, manage notifications, analyze team activity, and streamline processes for your team.

Built for developers who want to connect their AI tools to GitHub context and capabilities, from simple natural language queries to complex multi-step agent workflows.

Using the Go module

The Go module path is github.com/github/github-mcp-server/v2. Library consumers must use this prefix in imports, for example github.com/github/github-mcp-server/v2/pkg/github, and in go get commands. No /v2 subdirectory is needed when building from a repository checkout.

The existing v2.0.0 tag predates this module-path correction and cannot be used as a Go module. After this change is merged, a new release such as v2.0.1 must be tagged from a commit containing the corrected module path. Until then, consumers can use a pseudo-version from a commit containing this change.


Remote GitHub MCP Server

The remote GitHub MCP Server is hosted by GitHub and provides the easiest method for getting up and running. If your MCP host does not support remote MCP servers, don't worry! You can use the local version of the GitHub MCP Server instead.

Prerequisites

  1. A compatible MCP host with remote server support (VS Code 1.101+, Claude Desktop, Cursor, Windsurf, etc.)
  2. Any applicable policies enabled

Install in VS Code

For quick installation, use one of the one-click install buttons above. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start. Make sure you're using VS Code 1.101 or later for remote MCP and OAuth support.

Alternatively, to manually configure VS Code, choose the appropriate JSON block from the examples below and add it to your host configuration:

Using OAuthUsing a GitHub PAT VS Code (version 1.101 or greater)

{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    }
  }
}
{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer ${input:github_mcp_pat}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "github_mcp_pat",
      "description": "GitHub Personal Access Token",
      "password": true
    }
  ]
}

Install in other MCP hosts

  • Copilot CLI - Installation guide for GitHub Copilot CLI
  • GitHub Copilot in other IDEs - Installation for JetBrains, Visual Studio, Eclipse, and Xcode with GitHub Copilot
  • Claude Applications - Installation guide for Claude Desktop and Claude Code CLI
  • Codex - Installation guide for OpenAI Codex
  • Cursor - Installation guide for Cursor IDE
  • OpenCode - Installation guide for the OpenCode terminal agent
  • Windsurf - Installation guide for Windsurf IDE
  • Zed - Installation guide for Zed editor
  • Rovo Dev CLI - Installation guide for Rovo Dev CLI

Note: Each MCP host application needs to configure a GitHub App or OAuth App to support remote access via OAuth. Any host application that supports remote MCP servers should support the remote GitHub server with PAT authentication. Configuration details and support levels vary by host. Make sure to refer to the host application's documentation for more info.

Configuration

Toolset configuration

See Remote Server Documentation for full details on remote server configuration, toolsets, headers, and advanced usage. This file provides comprehensive instructions and examples for connecting, customizing, and installing the remote GitHub MCP Server in VS Code and other MCP hosts.

When no toolsets are specified, default toolsets are used.

Insiders Mode

Try new features early! The remote server offers an insiders version with early access to new features and experimental tools.

Using URL PathUsing Header

{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/insiders"
    }
  }
}
{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "X-MCP-Insiders": "true"
      }
    }
  }
}

See [Remote Server Documentation](docs/remote-server

Xem mã nguồn trên GitHub