GitHub MCP Server

Official GitHub MCP server — structured GitHub API access for agents. Prefer GitHub CLI for routine scoped tasks.

CopilotCursorKilo
Authorgithub
Updated
mcpgithubofficial

Overview

The official GitHub MCP server from GitHub. Enables agents to work with issues, pull requests, repositories, code search, and Actions.

Prefer GitHub CLI (gh) for routine scoped tasks. Use this MCP when the agent needs richer multi-step GitHub tool access inside the IDE.

Installation

Prefer the current upstream README — GitHub often documents a remote/hosted MCP endpoint as the easiest host path, with local Docker / ghcr.io as an alternative.

Example local Docker shape (verify args against upstream before shipping):

{
  "mcp": {
    "servers": {
      "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>"
        }
      }
    }
  }
}

Auth options (PAT vs OAuth) and host-specific config: https://github.com/github/github-mcp-server

When to use

  • Multi-step GitHub workflows inside the agent tool loop
  • Structured PR/issue operations beyond a single gh command

When not to use

  • Listing issues, opening a PR, or checking workflow runs — use gh first

Raw content

Copy into your project — e.g. .instructions.md, .agent.md, or SKILL.md

## Overview

The official GitHub MCP server from GitHub. Enables agents to work with issues, pull requests, repositories, code search, and Actions.

**Prefer [GitHub CLI](/tools/github-cli) (`gh`) for routine scoped tasks.** Use this MCP when the agent needs richer multi-step GitHub tool access inside the IDE.

## Installation

Prefer the **current upstream README** — GitHub often documents a remote/hosted MCP endpoint as the easiest host path, with local Docker / `ghcr.io` as an alternative.

Example local Docker shape (verify args against upstream before shipping):

```json
{
  "mcp": {
    "servers": {
      "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>"
        }
      }
    }
  }
}
```

Auth options (PAT vs OAuth) and host-specific config: https://github.com/github/github-mcp-server

## When to use

- Multi-step GitHub workflows inside the agent tool loop
- Structured PR/issue operations beyond a single `gh` command

## When not to use

- Listing issues, opening a PR, or checking workflow runs — use `gh` first

Next steps

Matched by shared tags and category. Browse all tools