GitHub MCP Server
Official GitHub MCP Server connects AI tools to GitHub's API with 51 tools for repo management, issues, PRs, security scanning, and CI/CD automation.
docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server GitHub’s official MCP Server connects AI assistants directly to GitHub’s platform, enabling natural language control over repositories, issues, PRs, and security scanning.
What the GitHub MCP Server Does
The GitHub MCP Server is the most widely adopted MCP implementation in the ecosystem. Built by GitHub in partnership with Anthropic and released in public preview in April 2025, it exposes 51 standardized tools that let AI agents interact with GitHub without you touching the web interface or memorizing CLI commands.
You can ask your AI assistant to open a PR, search for a function across your repos, create issues from bug reports, review code scanning alerts, or check CI/CD status. The server handles authentication and API calls while your AI handles the intent.
With 27.4k stars on GitHub, it’s become the de facto standard for GitHub-AI integration.
GitHub MCP Server Installation
The GitHub MCP Server offers three deployment options. For Claude Desktop users, the Docker method is recommended due to current OAuth limitations.
Prerequisites
- Docker installed and running (for Docker method)
- GitHub Personal Access Token with required scopes:
repo— Full repository operationsread:packages— Docker image accessread:org— Organization team access
Method 1: Docker (Recommended for Claude Desktop)
Create or generate your Personal Access Token at github.com/settings/tokens.
Open Claude Desktop and navigate to Settings → Developer → Edit Config. Add this configuration block to your claude_desktop_config.json:
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
}
}
}
}
Replace YOUR_GITHUB_PAT with your actual token, save the file, and restart Claude Desktop.
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Method 2: Remote Server (VS Code 1.101+)
Available since June 2025. No local installation required.
Use the hosted endpoint https://api.githubcopilot.com/mcp/ with OAuth authentication through the GitHub App connector. Automatic updates and no Docker management.
Note: The remote server requires OAuth authentication, which Claude Desktop doesn’t currently support via its standard connector interface. VS Code and other compatible hosts work fine.
Method 3: Build From Source
Clone the repository and build with Go. See the official GitHub repo for detailed instructions.
Available Tools
The server exposes 51 tools across six capability groups:
Repository Management (15 tools)
get_file_contents— Retrieve file or directory contentscreate_or_update_file— Modify single filesdelete_file— Remove filespush_files— Commit multiple files at oncecreate_repository— Create new repositoriesfork_repository— Fork to your account or organizationcreate_branch— Branch creationlist_branches,list_commits,list_tags— Repository inspectionget_commit,get_tag— Detailed version control infosearch_code,search_repositories,search_users— GitHub-wide search
Issue Management (8 tools)
create_issue,get_issue,list_issues,update_issue— Full issue lifecycleadd_issue_comment,get_issue_comments— Discussion threadsassign_copilot_to_issue— AI-assisted triagesearch_issues— Cross-repository issue search
Pull Request Management (17 tools)
create_pull_request,get_pull_request,list_pull_requests,update_pull_request— PR workflowmerge_pull_request— Merge automationget_pull_request_diff,get_pull_request_files— Code review contextget_pull_request_comments,get_pull_request_reviews,get_pull_request_status— Review visibilitycreate_pending_pull_request_review,add_pull_request_review_comment_to_pending_review,submit_pending_pull_request_review,delete_pending_pull_request_review— Review workflowcreate_and_submit_pull_request_review— Simplified review submissionrequest_copilot_review— Request GitHub Copilot code reviewupdate_pull_request_branch— Sync with base branch
Security & Code Scanning (4 tools)
list_code_scanning_alerts,get_code_scanning_alert— Code analysis resultslist_secret_scanning_alerts,get_secret_scanning_alert— Credential leak detection
Notifications (6 tools)
list_notifications,get_notification_details— Notification feeddismiss_notification,mark_all_notifications_read— Notification triagemanage_notification_subscription,manage_repository_notification_subscription— Notification preferences
User/Account (1 tool)
get_me— Retrieve authenticated user details
You can configure which toolsets are exposed to reduce context size and improve AI tool selection.
Use Cases
Automated PR Workflows
“Add a CODEOWNERS file assigning /api/** to @backend-team, then open a draft PR with @alice and @bob as reviewers.” The AI creates the file, opens the PR, and assigns reviewers without you touching GitHub’s UI.
CI/CD Debugging
“Why did the release.yml workflow fail last night?” The server fetches workflow logs and the AI analyzes failures to suggest fixes, saving you from hunting through GitHub Actions tabs.
Security Triage
“List all critical Dependabot alerts across my repos and create issues for each.” The AI scans for vulnerabilities and creates structured issues for your team to address.
Repository Intelligence Without Cloning
Search codebases, analyze project structure, and stream files directly into your AI conversation. No need to clone repos locally for quick investigations.
Issue Management From Chat
File bugs, add labels, assign team members, and update status without context-switching to GitHub. Your AI handles the API calls based on natural language requests.
Advanced Features
Read-Only Mode
Use the --read-only flag to restrict the server to read-only operations. Useful for safe exploration in production environments or when you want to prevent accidental modifications.
Toolsets Configuration
Specify which capability groups (repository, issues, PRs, security, notifications) are available to reduce the number of tools exposed to your AI. This improves tool selection accuracy and reduces token usage.
GitHub Enterprise Support
Works with GitHub Enterprise Cloud. GitHub Enterprise Server requires local deployment.
Limitations & Gotchas
Rate Limits
GitHub’s API enforces 5,000 requests per hour for authenticated users. Heavy usage can hit this limit quickly.
Some users report excessive token consumption from the VS Code extension (see issue #933).
Response Size
The server can return large responses without pagination, especially for file listings or search results.
This consumes significant AI tokens. Be mindful of context window usage when requesting broad searches or large file trees.
Docker Compatibility
Some users report compatibility issues between Claude Desktop and Docker-based MCP servers.
If Docker setup doesn’t work, try the remote server option (if your host supports OAuth) or build from source.
OAuth Requirement for Remote Server
The remote hosted option requires OAuth authentication through GitHub’s App connector.
Claude Desktop’s standard MCP connector doesn’t support this flow yet, limiting remote server usage to VS Code and compatible hosts.
NPM Package Deprecated
The npm package @modelcontextprotocol/server-github was deprecated in April 2025. Development moved to the official GitHub repository. Use Docker or binary installations instead.
Alternatives
Git MCP Server (cyanheads/git-mcp-server) focuses on local Git operations like commit, branch, merge, and rebase. Use this if you need version control without GitHub-specific features like issues or PRs.
GitMCP (gitmcp.io) specializes in documentation access to reduce AI hallucinations. Replace github.com with gitmcp.io in URLs to get clean documentation feeds. Best for projects where you want AI to reference docs without modifying code.
GitKraken MCP Server wraps GitKraken’s APIs with support for Jira, GitHub, and GitLab. Consider this if you use GitKraken’s GUI and want multi-platform integration.
Our Take
Best for: Developers who work with GitHub repos daily and want to automate issue management, PR workflows, and security triage from their AI assistant.
Skip if: You don’t use GitHub, or you only need basic Git operations without GitHub’s platform features (issues, PRs, Actions).
Rating: 9.2/10 — The most mature and feature-complete MCP server available. It scores this high for its comprehensive 51-tool set, rock-solid documentation, active maintenance from GitHub, and coverage of nearly every GitHub API operation you’d need.
Rate limiting and large response sizes are the main pain points, but those are manageable with configuration.
If you use GitHub and an MCP-compatible AI tool, this server is essential infrastructure.