G
GitHub MCP Server
官方 Official
直接在对话中管理仓库、Issue 与 PR
Manage repos, issues & PRs from chat
GitHub 仓库 · Source repo ↗
封装 GitHub REST/GraphQL API,让模型可以创建分支、提交代码、评论 Issue、发起 Pull Request,把日常协作流程接入对话式工作流,减少来回切换网页的时间。
工具能力 Tools
create_or_update_file
创建或修改仓库中的文件
search_repositories
按关键词搜索仓库
create_issue
创建新的 Issue
create_pull_request
发起 Pull Request
list_commits
列出分支的提交历史
merge_pull_request
合并已通过审查的 PR
安装接入 Setup
生成一个具备仓库权限的 GitHub Personal Access Token,并作为环境变量传入。
claude_desktop_config.json
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxx"
}
}
}
}
使用场景 Use Cases
自动创建修复分支并提交 PR
批量整理与回复积压的 Issue
生成周报式的提交摘要
支持客户端 Supported Clients
Claude Desktop
完整支持
Cursor
完整支持
Cline
完整支持
VS Code
部分支持