Content
1{
2 "mcpServers": {
3 "github": {
4 "command": "npx",
5 "args": ["-y", "@modelcontextprotocol/server-github"],
6 "env": {
7 "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_GITHUB_PAT>"
8 }
9 }
10 }
11}
12
13// ── Setup ────────────────────────────────────────────────────────────────────
14// 1. Create a GitHub Personal Access Token at https://github.com/settings/tokens
15// Required scopes: repo, read:org, read:user, workflow (for Actions)
16//
17// 2. Replace <YOUR_GITHUB_PAT> with your token, or reference an env var:
18// "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PAT}"
19//
20// 3. Add to ~/.claude.json (global) or .claude/settings.json (project-local)
21//
22// ── Available tools ──────────────────────────────────────────────────────────
23// create_or_update_file push a file to a repo
24// search_repositories search GitHub for repos
25// create_repository create a new repo
26// get_file_contents read a file from any branch
27// push_files push multiple files in one commit
28// create_issue open an issue
29// create_pull_request open a PR
30// list_issues list open/closed issues
31// update_issue edit issue title/body/labels/state
32// add_issue_comment comment on an issue
33// get_pull_request fetch PR details
34// list_pull_requests list PRs for a repo
35// merge_pull_request merge a PR
36// list_workflows list GitHub Actions workflows
37// trigger_workflow manually trigger a workflow
38