MCP Configs2026年4月2日·1 分钟阅读

GitHub MCP Server — Official GitHub AI Integration

GitHub's official MCP server that lets AI assistants manage repos, issues, PRs, Actions, and code search through the Model Context Protocol.

MC
MCP Hub · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-token>"
      }
    }
  }
}

Save this to your .mcp.json or Claude Desktop config, replacing <your-token> with a GitHub Personal Access Token.

Introduction

GitHub MCP Server is the official MCP server built by GitHub that connects AI coding assistants to the entire GitHub platform. It transforms natural language into GitHub API calls, letting you manage repositories, issues, pull requests, code reviews, Actions workflows, and security alerts directly from your AI assistant.

Key capabilities:

  • Repository Management — Search repos, browse code, read files, list branches, and analyze commits
  • Issues & PRs — Create, update, comment, merge PRs, and manage labels programmatically
  • GitHub Actions — Monitor CI/CD workflows, analyze build failures, re-run jobs
  • Code Search — Full GitHub code search across public and private repositories
  • Security — View code scanning alerts, Dependabot alerts, and secret scanning results
  • Notifications — Read and manage your GitHub notification inbox

Built in Go, runs as a Docker container or standalone binary. MIT licensed.

FAQ

Q: What permissions does the GitHub token need? A: At minimum repo scope for private repos, public_repo for public only. Add workflow for Actions, security_events for security features.

Q: Can I use this with Claude Code? A: Yes. Add the MCP config to your .mcp.json in your project root or ~/.claude/mcp.json globally.

Q: Does it work with GitHub Enterprise? A: Yes. Set the GITHUB_HOST environment variable to your GHE instance URL.

Q: Is there a rate limit? A: It uses your PAT's rate limit (5,000 requests/hour for authenticated users). The server handles pagination automatically.

Works With

  • Claude Code / Claude Desktop
  • Any MCP-compatible AI assistant
  • GitHub.com and GitHub Enterprise Server
  • Docker or standalone Go binary
🙏

来源与感谢

Thanks to the GitHub team for building the official integration that sets the standard for MCP server quality and security.

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产