# GitHub MCP Server

> GitHub's own MCP server: repos, issues, PRs, Actions and security alerts as agent tools

- Category: Agents & Automation / Workflow Automation
- Language: Go
- Licence: MIT
- Repository: https://github.com/github/github-mcp-server
- Canonical page: https://ai-tldr.dev/tools/github-mcp-server/

## In short

GitHub MCP Server is GitHub's own MCP server: repos, issues, PRs, Actions and security alerts as agent tools. It sits in the Workflow Automation category of the Agents & Automation tools and is open-source, written in Go and licensed MIT. To get started: use the remote server.

## Overview

The GitHub MCP Server is GitHub's official Model Context Protocol server. It hands an AI agent, assistant or chatbot a set of GitHub tools: reading repositories and code files, creating and updating issues and pull requests, monitoring Actions workflow runs and analysing build failures, reading code-scanning, Dependabot and secret-scanning alerts, and working with discussions, notifications, projects, gists and organisation data.

There are two ways to run it. The remote server is hosted by GitHub at `https://api.githubcopilot.com/mcp/` and is the quickest path for any host that supports remote MCP with OAuth — VS Code 1.101+, Claude Desktop, Cursor, Windsurf and others — with one-click install buttons in the README. The local server is a Go binary, published as a Docker image at `ghcr.io/github/github-mcp-server`, authenticated with OAuth or a `GITHUB_PERSONAL_ACCESS_TOKEN`; installation guides cover Copilot CLI, Claude, Codex, Cursor, OpenCode, Windsurf, JetBrains, Visual Studio, Eclipse and Xcode.

Tool surface is controlled rather than all-or-nothing. Functionality is grouped into toolsets — `context`, `repos`, `issues`, `pull_requests`, `actions`, `code_security`, `secret_protection`, `dependabot`, `discussions`, `gists`, `git`, `governance`, `labels`, `notifications`, `orgs`, `projects`, `security_advisories`, `stargazers`, `users` and more — enabled with `--toolsets` or the `GITHUB_TOOLSETS` environment variable, and individual tools can be allow-listed with `--tools`. Enabling only what you need helps tool choice and keeps the context small. A `--read-only` flag drops every write tool and takes priority over explicit `--tools` entries. The project is MIT licensed.

## What it does

- Official, GitHub-maintained MCP server, available both hosted (remote) and self-run (local)
- Toolsets for repositories, issues, pull requests, Actions, code security, secret protection, Dependabot, discussions, projects and more
- Fine-grained control with `--toolsets` / `GITHUB_TOOLSETS` and `--tools` / `GITHUB_TOOLS`
- `--read-only` mode that removes every write tool, overriding explicit tool requests
- OAuth or personal-access-token authentication, so the agent only gets the scopes you grant
- Distributed as a Go binary and a public Docker image, with install guides for a dozen MCP hosts

## Getting started

Start with the remote server if your host supports remote MCP; otherwise run the Docker image locally. Then narrow the tool surface.

1. Use the remote server

   Point your MCP host at GitHub's hosted endpoint — VS Code 1.101 or later handles the OAuth flow for you.

```json
{
  "servers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/"
    }
  }
}
```

2. Or run it locally with Docker

   The image is public. This example registers the local server with Claude Code using a personal access token.

```bash
claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT -- \
  docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
```

3. Enable only the toolsets you need

   Fewer tools means better tool choice and less context spent on schemas.

```bash
github-mcp-server --toolsets repos,issues,pull_requests,actions,code_security

# or via the environment
GITHUB_TOOLSETS="repos,issues,pull_requests" ./github-mcp-server
```

4. Lock it to read-only

   Write tools are skipped entirely, even if named in `--tools`.

```bash
./github-mcp-server --read-only
```

## When to use it

- Let a coding agent open, review and update pull requests in the repositories you grant it
- Triage issues and project boards from an assistant instead of the web UI
- Have an agent read a failing Actions run and explain or fix the build
- Give a read-only agent access to code scanning, Dependabot and secret-scanning findings for security review
