Skip to content
FossShelf
Home / Categories / For AI Engineers

Github Mcp Server

Connect AI agents directly to GitHub

Replaces —

34.53K starsMITlast commit 13 Nov 2026
Screenshot of Github Mcp Server

Who it's for

AI-assisted code review and PR management

Developers using Claude, Copilot, or Cursor connect the server to let their AI assistant read open pull requests, review diffs, post comments, check CI status, and create or update issues without leaving the chat interface.

Automated CI/CD triage

Platform teams point an AI agent at the `actions` toolset to monitor failing workflow runs, retrieve job logs filtered to failed steps only, and surface root-cause summaries — replacing manual log spelunking after a broken deploy.

Team does not use GitHub Actions

Security alert remediation

Security engineers use the `code_security` and `dependabot` toolsets to query open alerts, understand their severity and context, and have an AI agent draft fix PRs or triage false positives across multiple repositories.

Not using GitHub Advanced Security or Dependabot

Repository context for agent workflows

Teams building multi-step AI agents embed the GitHub MCP Server to give agents live repository context: file contents, commit history, team membership, and project boards, enabling agents that plan and execute multi-file changes grounded in the actual codebase state.

The problem

AI coding assistants and agents lack direct, structured access to GitHub's API, forcing developers to manually copy context — repository structure, open issues, CI failures, security alerts — into chat windows. This context gap makes AI-assisted development workflows slow and error-prone, and prevents agents from taking actions like creating PRs or triaging issues autonomously.

How it works

Remote and local deployment

Connect to GitHub's hosted MCP endpoint at `api.githubcopilot.com/mcp/` with a one-line JSON config, or run the public Docker image `ghcr.io/github/github-mcp-server` locally for environments that need stdio transport or GitHub Enterprise Server support.

Configurable toolsets

Enable only the GitHub capabilities your workflow needs via `--toolsets` or the `GITHUB_TOOLSETS` environment variable. Available sets include repos, issues, pull_requests, actions, code_security, dependabot, discussions, gists, governance, notifications, and more. Unused toolsets are hidden from the model, reducing context size and improving tool selection.

OAuth and PAT authentication

On github.com the server performs a browser-based OAuth flow on first use, storing the token in memory only. A GitHub Personal Access Token can be set via `GITHUB_PERSONAL_ACCESS_TOKEN` and takes precedence over OAuth. GitHub App authentication is available for non-interactive stdio deployments.

GitHub Actions and CI/CD intelligence

The `actions` toolset exposes workflow listing, run details, job logs (including failed-job-only filtering), artifact downloads, and workflow triggers through the consolidated `actions_list`, `actions_get`, and `actions_run_trigger` tools.

Security and governance toolsets

Dedicated toolsets cover code scanning alerts, Dependabot vulnerability alerts, secret scanning, security advisories, and repository governance rulesets at the repository, organization, and enterprise levels.

Structured MCP output for modern clients

Clients negotiating MCP protocol version 2026-07-28 or newer receive typed `structuredContent` and output schemas for repository tools, issues, Actions, and Gists. Older clients receive the same data as plain text, byte-for-byte unchanged.

Features

  • Remote and local deployment
  • Configurable toolsets
  • OAuth and PAT authentication
  • GitHub Actions and CI/CD intelligence
  • Security and governance toolsets
  • Structured MCP output for modern clients

How to install

# Remote server (VS Code 1.101+, no local setup needed) # Add to your MCP host config: { "servers": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" } } } # Local server via Docker docker run -i --rm \ -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \ ghcr.io/github/github-mcp-server # Claude Code CLI 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

Recommended for this setup

Strengths

  • Official GitHub implementation: Maintained directly by GitHub, the server tracks GitHub's API surface authoritatively. The remote hosted endpoint at `api.githubcopilot.com/mcp/` means no infrastructure to run for users on github.com.
  • Broad MCP host compatibility: Installation guides cover VS Code, JetBrains IDEs, Visual Studio, Eclipse, Xcode, Claude Desktop, Claude Code, Cursor, Windsurf, Zed, OpenCode, Google Gemini CLI, OpenAI Codex, Rovo Dev CLI, and GitHub Copilot CLI. Any host supporting local stdio MCP servers can use the Docker image.
  • GitHub Enterprise support: GitHub Enterprise Cloud with data residency (`ghe.com`) can use the remote hosted server. GitHub Enterprise Server is supported through the local server with the `--gh-host` flag or `GITHUB_HOST` environment variable, with HTTPS enforced for non-loopback hosts.
  • Fine-grained access control: The `--read-only` flag silently skips all write tools even when explicitly requested, enabling safe read-only deployments. Individual tools can be named with `--tools` alongside toolsets for additive, precise configuration.

Trade-offs

  • Remote server requires Copilot-capable host: The hosted remote endpoint at `api.githubcopilot.com/mcp/` requires a GitHub Copilot subscription and an MCP host that supports HTTP/remote servers (VS Code 1.101+). Teams without Copilot or on older IDE versions must use the local Docker or binary server.
  • GitHub Enterprise Server requires local deployment: GitHub Enterprise Server does not support the remote hosted server. Organizations on GHES must run and maintain the local Docker image or binary, configure OAuth or GitHub App credentials themselves, and manage the `GITHUB_HOST` environment variable.
  • OAuth in Docker needs a fixed callback port: The browser-based OAuth flow inside Docker requires publishing a fixed loopback port (`127.0.0.1:8085:8085`) so the callback is reachable from the container. Non-interactive or headless environments need a device-code fallback or GitHub App authentication instead.

Tech stack

Languages
Go, TypeScript, Shell, HTML, CSS, Dockerfile, JavaScript
Frameworks
React
Databases
—
Tooling
—

FAQ

Do I need a GitHub Copilot subscription to use this?

Only for the remote hosted server at `api.githubcopilot.com/mcp/`. The local Docker image (`ghcr.io/github/github-mcp-server`) and the compiled Go binary work with any GitHub account using OAuth or a Personal Access Token.

How do I limit what the AI can do with my GitHub account?

Use the `--read-only` flag to disable all write tools globally, or configure specific toolsets with `--toolsets` to expose only the capabilities you need. When using a PAT, you can also scope the token to minimum required permissions (e.g. `repo`, `read:org`).

Does this work with GitHub Enterprise Server?

Yes, through the local server only. Set `GITHUB_HOST=https://<your-ghes-domain>` or pass `--gh-host https://<your-ghes-domain>`. HTTPS is required and enforced for non-loopback hosts. You must also bring your own OAuth App or GitHub App credentials.

Can I use this in a CI pipeline or non-interactive environment?

Yes. For non-interactive stdio deployments, GitHub App authentication is the recommended approach — see the GitHub App Authentication documentation linked from the README. PAT authentication via the `GITHUB_PERSONAL_ACCESS_TOKEN` environment variable also works in any environment.

What is Insiders mode?

Insiders mode enables early access to new features and experimental tools before they reach the stable release. On the remote server, enable it via the `/insiders` URL path or the `X-MCP-Insiders: true` header. On the local server, pass `--insiders` or set `GITHUB_INSIDERS=true`.

Similar tools

More in AI Engineers