github-mcp-server
by github·★ 29,881·综合分 64
GitHub 官方 MCP 服务器将 AI 工具连接到 GitHub 平台,实现仓库管理、问题自动化和代码分析。
概述
GitHub MCP Server 是 Model Context Protocol 的一个强大实现,使 AI 代理、助手和聊天机器人能够直接与 GitHub 生态系统交互。它全面访问仓库、代码文件、问题、拉取请求和 GitHub Actions 工作流。该服务器支持远程和本地部署选项,为多种 MCP 主机(包括 VS Code、Claude Desktop、Cursor 等)提供详细文档。使用 Go 语言实现,代码质量高,反映在高星标数和最近的提交中。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您需要将 GitHub 与 AI 工具直接集成时选择此方案,特别是如果您已经在使用 GitHub Copilot 或希望利用 GitHub 官方实现以获得更好的兼容性。
什么时候不要选它
如果您需要自托管且无互联网访问、需要离线功能,或者需要与其他版本控制系统(GitHub 之外)集成时,应避免使用。
此 server 暴露的工具
从 README 抽取出 12 个工具browse_repositoryBrowse and query code, search files, and understand project structure across a repository
create_issueCreate a new GitHub issue in a repository
update_issueUpdate an existing GitHub issue with new information
manage_pull_requestCreate, update, or manage pull requests in a repository
monitor_workflowsMonitor GitHub Actions workflow runs and analyze build status
analyze_security_findingsExamine security findings in a repository
create_releaseCreate a new release on GitHub
analyze_commitsAnalyze commit history and changes in a repository
manage_team_discussionsAccess and manage team discussions and notifications
query_codebaseQuery code and understand patterns in the codebase
analyze_activityAnalyze team activity and repository statistics
dependabot_alertsReview 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.
可对比工具
安装
安装选项
远程安装(推荐)
添加到您的 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 讨论
开发者社区最近的相关讨论。
- 帖子 by tosh · 2025-04-07
- GitHub MCP Server▲ 5💬 2帖子 by jonbaer · 2025-04-04
github-mcp-server 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。