MCP ConfigsMar 29, 2026·2 min read

GitHub MCP Server

GitHub's official MCP server. Connect Claude Code or Cursor to GitHub for managing repos, issues, PRs, and Actions via natural language.

TO
TokRepo精选 · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

Add to your .mcp.json (VS Code / Claude Code):

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

Or run locally with Docker:

docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN=your_token ghcr.io/github/github-mcp-server

Intro

GitHub's official MCP server — the first-party integration that connects any MCP-compatible AI tool (Claude Code, Cursor, VS Code Copilot, Windsurf) directly to GitHub. Browse repos, manage issues and PRs, trigger Actions, review security alerts, all through natural language. 28,000+ GitHub stars.


Available Toolsets

Toolset What It Does
repos Browse files, search code, manage branches, create commits
issues Create, update, comment on issues
pull_requests Open PRs, request reviews, merge
actions List workflows, trigger runs, get job logs
code_security Code scanning alerts, secret detection
dependabot Dependency vulnerability alerts
discussions Access GitHub Discussions
notifications Manage notification inbox
projects GitHub Projects board operations

Default: repos, issues, pull_requests, users, context

Enable all: Set GITHUB_TOOLSETS="all"

Configuration Examples

Claude Code (.mcp.json with PAT)

{
  "servers": {
    "github": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Select specific toolsets

docker run -i --rm   -e GITHUB_PERSONAL_ACCESS_TOKEN=your_token   -e GITHUB_TOOLSETS="repos,issues,pull_requests,actions"   ghcr.io/github/github-mcp-server

Read-only mode

docker run -i --rm   -e GITHUB_PERSONAL_ACCESS_TOKEN=your_token   -e GITHUB_READ_ONLY=1   ghcr.io/github/github-mcp-server

Key Tools

  • get_file_contents — Read any file or directory
  • search_code — Search across repositories
  • create_or_update_file — Commit file changes
  • create_pull_request / merge_pull_request — PR lifecycle
  • issue_read / issue_write — Issue management
  • get_job_logs — CI/CD debugging

Authentication

Create a PAT at github.com/settings/personal-access-tokens/new. Recommended scopes: repo, read:packages, read:org.


Source & Thanks

Author: GitHub Repository: github-mcp-server — ⭐ 28,300+ License: MIT

The official GitHub MCP integration, maintained by GitHub's engineering team.

Related Assets