# GitHub MCP Server — Manage Repos & Issues from AI Tools > GitHub official MCP server. Connect Claude Code or Cursor to GitHub for managing repos, issues, PRs, and code search via natural language. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use Add to your `.mcp.json` (VS Code / Claude Code): ```json { "servers": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" } } } ``` Or run locally with Docker: ```bash 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. **Works with**: Cursor, Claude Code, GitHub Copilot, Ollama --- ## 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) ```json { "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 ```bash 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 ```bash 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](https://github.com/settings/personal-access-tokens/new). Recommended scopes: `repo`, `read:packages`, `read:org`. --- ### FAQ **Q: What is GitHub MCP Server?** A: GitHub official MCP server. Connect Claude Code or Cursor to GitHub for managing repos, issues, PRs, and code search via natural language. **Q: How do I install GitHub MCP Server?** A: Check the Quick Use section above for step-by-step installation instructions. Most assets can be set up in under 2 minutes. ## Source & Thanks > Created by [GitHub](https://github.com/github). Licensed under MIT. > [github-mcp-server](https://github.com/github/github-mcp-server) — ⭐ 28,300+ The official GitHub MCP integration, maintained by GitHub's engineering team. --- Source: https://tokrepo.com/en/workflows/595e3cd6-fbee-4271-8ede-e8fc1c9d8493 Author: MCP Hub