What it does
GitHub MCP is the most-used developer integration in the Claude MCP ecosystem. It gives Claude full access to the GitHub REST API via a personal access token, enabling it to act as a capable developer assistant that can read, create, and modify GitHub resources on your behalf.
Common workflows include automated code review on open PRs, bulk issue triage and labelling, searching for examples across public or private repositories, creating feature branches and draft PRs, and reading file contents from any accessible repo without local checkout.
- Search repositories, code, issues, and users across GitHub
- Read file contents from any accessible repository
- Create and manage issues with labels and assignees
- Create pull requests with base/head branch selection
- List open issues and PRs with filtering
- Create and push files to branches
- List commit history on any branch
How to connect
Create a GitHub personal access token at github.com → Settings → Developer settings → Personal access tokens. Grant the repo scope at minimum.
export GITHUB_TOKEN="ghp_your_token_here" claude mcp add github -- npx -y @modelcontextprotocol/server-github
Available tools
search_repositories— search GitHub repos by query, language, starsget_file_contents— read a file from any accessible repocreate_issue— open a new issue with title, body, labelscreate_pull_request— create a PR from a branch with title and descriptionlist_issues— list open or closed issues with filterscreate_branch— create a new branch from a base refpush_files— commit and push files to a branchlist_commits— list recent commits on a branch
Example usage
Ask Claude to review all open PRs and post comments, or search for usage examples of a library:
# User prompt
Look at all open PRs in my-org/api-service,
summarize the changes in each, and flag any that
touch the authentication module.
list_issues({ repo: "my-org/api-service", type: "pr", state: "open" }) → returns 6 open PRs get_file_contents("my-org/api-service", PR#12 diff) get_file_contents("my-org/api-service", PR#14 diff) → scans diffs for auth/ file paths → flags PR #14: modifies auth/middleware.ts
Token scopes: For read-only operations use repo:read. For creating issues, PRs, and pushing files you need the full repo scope. For private organizational repos, also add read:org.