qvib.pro
RU

GitHub MCP

What for: let AI work with your repositories, issues and pull requests through the official GitHub MCP server, with no copy-paste.

бесплатно open-source MCP профи

Официальный сервер GitHub · ★30.3k checked 2026-06-01

Updated: 02.07.2026

$ claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \ …

Open source ↗

GitHub MCP

What it gives the AI

The AI starts working with GitHub like a real teammate: reading issues and PRs, leaving review comments, creating branches and PRs, checking CI status (GitHub Actions), searching code and security alerts — without copy-pasting from the browser.

Example: "Take issue #412, fix it and open a PR" — the AI reads the ticket through the server, makes the changes, pushes a branch and files a pull request with a description.

Setup (exact steps)

Claude Code

The recommended path is the GitHub remote server, authorized with a fine-grained PAT via a header:

claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
  --header "Authorization: Bearer YOUR_GITHUB_PAT"

Create the token in GitHub → Settings → Developer settings → Personal access tokens (fine-grained), scoped to just the repositories you need.

Alternative — locally in Docker (the official image), handy for offline work or a strict perimeter:

claude mcp add github --env GITHUB_PERSONAL_ACCESS_TOKEN=YOUR_PAT \
  -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server

Cursor / Claude Desktop

Remote config (type http) with an authorization header:

{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_GITHUB_PAT"
      }
    }
  }
}

Usage example

Say: "Show the open PRs assigned to me and review the biggest one" → the AI pulls the PR list, reads the diff and leaves structured comments. Or "file an issue for the bug we just found" → it creates a ticket with reproduction steps.

Security

  • Least privilege: run it read-only — the --read-only flag (locally) or GITHUB_READ_ONLY=1 (Docker env). Then the AI reads but can't push or close issues.
  • Shrink the surface: with --toolsets repos,issues,pull_requests (or the GITHUB_TOOLSETS env var) keep only the tool groups you need and disable, say, actions and code_security.
  • Token: use a fine-grained PAT scoped to specific repositories only, never a classic account-wide token. The PAT is passed in a header — don't commit it into the repository's .mcp.json.

Gotchas

  • The remote server talks to api.githubcopilot.com/mcp/ — for private corporate perimeters that's an external host; those setups go with the Docker option.
  • The tool set is large: without --toolsets/tool search it bloats the context. Enable only what the task actually needs.
  • A classic PAT gives the AI access to all your repositories — a common mistake; use fine-grained tokens and least privilege.

Читать по-русски →