Skip to main content
Community resource — not affiliated with Anthropic. Learn more


GitHub MCP

Git & GitHub · Official

Full GitHub API access. Claude can read repos, create issues and PRs, review code, manage branches, search across organizations, and automate your GitHub workflow.

4.9 rating 18,200+ connects Free · Open source Protocol v1.0
GitHub Issues Pull Requests Official Code Review

Connect command

GITHUB_TOKEN=ghp_xxx claude mcp add github -- npx -y @modelcontextprotocol/server-github
View on GitHub →

Requires GITHUB_TOKEN env var

18.2kConnects
4.9Rating

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.

terminal
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, stars
  • get_file_contents — read a file from any accessible repo
  • create_issue — open a new issue with title, body, labels
  • create_pull_request — create a PR from a branch with title and description
  • list_issues — list open or closed issues with filters
  • create_branch — create a new branch from a base ref
  • push_files — commit and push files to a branch
  • list_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:

example prompt
# 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.
tool call sequence
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.