BACK TO DIRECTORY
mcpbeginner

GitHub

Provides Claude Code with direct access to the GitHub API through the Model Context Protocol. Enables reading and writing issues, reviewing pull requests, searching code across repositories, managing GitHub Actions workflows, and accessing repository metadata. Requires a GitHub personal access token with appropriate scopes.

2.3k STARS
34.6k DOWNLOADS
github
githubgitapiissuespull-requests

INSTALL COMMAND

npx @anthropic-ai/claude-code mcp add github -- npx -y @modelcontextprotocol/server-github

CONFIGURATION

json
1{
2 "mcpServers": {
3 "github": {
4 "command": "npx",
5 "args": [
6 "-y",
7 "@modelcontextprotocol/server-github"
8 ],
9 "env": {
10 "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-github-pat>"
11 }
12 }
13 }
14}
15
16// Required GitHub PAT scopes:
17// - repo (full repository access)
18// - read:org (organization membership)
19// - read:user (user profile data)
20// - workflow (GitHub Actions)
21//
22// Available tools:
23// - search_repositories: Search for GitHub repositories
24// - get_file_contents: Read files from a repository
25// - create_issue: Create a new issue
26// - list_issues: List repository issues
27// - create_pull_request: Create a PR
28// - get_pull_request: Get PR details and diff
29// - search_code: Search code across GitHub
30// - list_commits: List recent commits
31// - get_pull_request_diff: Get the diff of a PR