The GitHub MCP server lets Claude Code read issues, PRs, and repo data directly.
1. Create a GitHub token
On GitHub: Settings → Developer settings → Personal access tokens → generate a token
with repo scope. Copy it (starts with ghp_).
2. Add the server
Pass the token as an env var:
claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token -- npx -y @modelcontextprotocol/server-github
Use --scope user if you want it in every project:
claude mcp add --scope user github -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token -- npx -y @modelcontextprotocol/server-github
3. Restart and confirm
claude mcp list
You should see github. Now you can ask:
Summarize the open issues labeled "bug" in this repo.
Security: treat the token like a password. Prefer a fine-grained token limited to the repos you need. See installing any MCP server.