GitHub MCP Server
Manage GitHub repos, issues, PRs, and code from your AI assistant
The GitHub MCP Server connects Claude and other MCP-compatible agents directly to the GitHub API. Search repositories, open issues, create pull requests, read file contents, and trigger actions — all from within your AI chat session.
Installation & Configuration
Add this block to your claude_desktop_config.json (or your agent framework's MCP config file):
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "your_token_here" }
}
}
}
Config file location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
Available Tools (10)
create_or_update_filesearch_repositoriescreate_repositoryget_file_contentspush_filescreate_issuecreate_pull_requestfork_repositorycreate_branchlist_commits
Use Cases
- Code review — ask Claude to review your open PRs
- Issue triage — have agents label and respond to GitHub issues
- Repository search — find code patterns across public repos
Source & Documentation
GitHub Repository: https://github.com/modelcontextprotocol/servers/tree/main/src/github
Protocol: Model Context Protocol (MCP) — modelcontextprotocol.io