MCP Catalogs
首页github-mcp-server screenshot

github-mcp-server

by github·29,881·综合分 64

GitHub 官方 MCP 服务器将 AI 工具连接到 GitHub 平台,实现仓库管理、问题自动化和代码分析。

githubdeveloper-toolsproductivity
4,195
Forks
328
活跃 Issue
本月
最近提交
2 天前
收录于

概述

GitHub MCP Server 是 Model Context Protocol 的一个强大实现,使 AI 代理、助手和聊天机器人能够直接与 GitHub 生态系统交互。它全面访问仓库、代码文件、问题、拉取请求和 GitHub Actions 工作流。该服务器支持远程和本地部署选项,为多种 MCP 主机(包括 VS Code、Claude Desktop、Cursor 等)提供详细文档。使用 Go 语言实现,代码质量高,反映在高星标数和最近的提交中。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:在 AI 助手中浏览和分析代码仓库
:自动化创建和管理 GitHub 问题与拉取请求
:监控和分析 CI/CD 管道和 GitHub Actions 工作流
:支持哪些身份验证方法?
:它是否适用于 GitHub Enterprise Server?

什么时候选它

当您需要将 GitHub 与 AI 工具直接集成时选择此方案,特别是如果您已经在使用 GitHub Copilot 或希望利用 GitHub 官方实现以获得更好的兼容性。

什么时候不要选它

如果您需要自托管且无互联网访问、需要离线功能,或者需要与其他版本控制系统(GitHub 之外)集成时,应避免使用。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • browse_repository

    Browse and query code, search files, and understand project structure across a repository

  • create_issue

    Create a new GitHub issue in a repository

  • update_issue

    Update an existing GitHub issue with new information

  • manage_pull_request

    Create, update, or manage pull requests in a repository

  • monitor_workflows

    Monitor GitHub Actions workflow runs and analyze build status

  • analyze_security_findings

    Examine security findings in a repository

  • create_release

    Create a new release on GitHub

  • analyze_commits

    Analyze commit history and changes in a repository

  • manage_team_discussions

    Access and manage team discussions and notifications

  • query_codebase

    Query code and understand patterns in the codebase

  • analyze_activity

    Analyze team activity and repository statistics

  • dependabot_alerts

    Review and manage Dependabot alerts for dependencies

说明:Tool names were inferred from use cases and feature descriptions in the README rather than from an explicit tools section. The server documentation was not fully accessible in the provided text.

可对比工具

git-mcpgithub-cli-mcpoctokit-mcp

安装

安装选项

远程安装(推荐)

添加到您的 MCP 主机配置(例如 VS Code 1.101+)中:

{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    }
  }
}

对于 Claude Desktop,添加到您的 claude_desktop_config.json 中:

{
  "mcpServers": {
    "github": {
      "command": "http",
      "args": ["https://api.githubcopilot.com/mcp/"]
    }
  }
}

本地安装

使用 Docker:

docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN=your_token ghcr.io/github/github-mcp-server

或者克隆仓库后从源码安装。

FAQ

支持哪些身份验证方法?
GitHub MCP Server 支持 OAuth 认证和 GitHub 个人访问令牌(PAT)。OAuth 推荐用于更好的安全性和用户体验,而 PAT 可以作为替代方案使用。
它是否适用于 GitHub Enterprise Server?
是的,远程和本地版本都支持 GitHub Enterprise。对于远程版本,您需要 GitHub Enterprise Cloud。对于本地版本,您可以使用 --gh-host 标志或 GITHUB_HOST 环境变量来指定您的 Enterprise Server 端点。

Hacker News 讨论

开发者社区最近的相关讨论。

github-mcp-server 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。