
GitHub
Full GitHub API access: repos, PRs, issues, and code search.
Quick answer
What it does
Provides access to GitHub repositories, issues, pull requests, commits, branches, and code search via the GitHub REST and GraphQL APIs.
Best for
- Automated issue creation
- PR review and management
- Code search across repos
- Repository browsing
Not for
- GitLab or Bitbucket workflows
- Fully local git-only setups
Setup recipe
- 1
Install
No install snippet available yet — see the project’s README for setup instructions.
- 2
Set required secrets
Set
GITHUB_PERSONAL_ACCESS_TOKENin your shell environment before launching your MCP client. - 3
Try a minimum working prompt
Open a draft PR that adds a CI-status README badge
On github.com/<owner>/<repo>, open a draft pull request from a new branch `readme-badge` that adds a GitHub Actions status badge for the `ci.yml` workflow to the top of README.md. Link the badge to the Actions tab. Do not merge — leave it as draft for me to review.Tested with: Claude Desktop, Claude Code, Cursor.
Tools & permissions
| Tool | Description | Args | Side effects |
|---|---|---|---|
get_file_contents | Read a file from a repo at a given path and ref. | owner: string, repo: string, path: string, ref?: string | Read |
search_repositories | Search public and accessible repositories. | query: string | Read |
search_code | Search code across GitHub. | q: string | Read |
create_or_update_file | Commit a single file change to a branch. | owner: string, repo: string, path: string, content: string, message: string, branch: string | Write |
create_issue | Open a new issue on a repo. | owner: string, repo: string, title: string, body?: string | Write |
create_pull_request | Open a pull request. | owner: string, repo: string, title: string, head: string, base: string | Write |
merge_pull_request | Merge an open PR that passes branch protection. | owner: string, repo: string, pull_number: number | Write |
list_issues | List issues on a repo with filters. | owner: string, repo: string | Read |
create_branch | Create a new branch from a base ref. | owner: string, repo: string, branch: string, from_branch?: string | Write |
Security & scope
- Access scope
- Read + write
- Sandbox
- Authenticates to the GitHub API using the token in `GITHUB_PERSONAL_ACCESS_TOKEN`. The blast radius equals the token scope — the MCP has whatever repo, issue, PR, and admin permissions the token grants.
- Gotchas
- Classic tokens grant every permission on the account — prefer fine-grained tokens scoped to the specific repos you want the agent to touch.
- Branch-protection rules still apply; unprotected branches let an agent push directly to default branches.
Agent prompt pack
— copy into Claude, Cursor, or ChatGPT.Recommend the best MCP servers for [task: e.g. git & repo workflows work] in [client: Claude]. Constraints: - Prefer tools that are [official | open-source | read-only] — pick what matters for my use case. - Exclude MCPs that require [e.g. a paid plan, OAuth-only flows, remote-only transport]. - Return at most 3 picks, ranked. For each pick include: 1. One-sentence rationale. 2. The ready-to-paste install snippet for my client. 3. Any required secrets I need to create before installing. Cross-check the top-mcps.com listing: https://top-mcps.com/top-mcps-for-git-repo-workflows
Compare GitHub MCP vs [GitLab MCP] for the following job: [describe the job, e.g. "let an agent create GitHub issues on bug triage"]. Judge them on: - Setup time and complexity (what a new user hits first). - Auth model (none / API key / OAuth 2.1) and credential risk. - Transport (stdio / Streamable HTTP / SSE) and where the server runs. - Required secrets and the blast radius if they leak. - Operational risk in an unattended agent loop. - Which one is "good enough" for a weekend prototype vs. production. End with one sentence: which should I pick for my scenario, which is: [my scenario]. References: - https://top-mcps.com/mcp/github - top-mcps.com listing for GitLab
Install the GitHub MCP server for my [client: Claude] at the default config path for that client. Use the exact install snippet published at https://top-mcps.com/mcp/github (fetch https://top-mcps.com/mcp/github.json for the canonical server.json if you can read URLs). Before finishing: 1. Create the required secrets (GITHUB_PERSONAL_ACCESS_TOKEN) and put them in the appropriate env block — do not hard-code them. 2. Restart or reload the client so it picks up the new server. 3. Verify the server is connected (green / running state) and at least one tool is listed. 4. If anything fails, read the client's MCP logs and report the exact error — do not silently retry. Confirm when done and list the tools the server now exposes.
Frequently asked questions
What changed
— 2 updates tracked.Refreshed install snippets and fact sheet; verified for 2026.
Initial directory listing.
More Git & Repo Workflows MCPs
Other tools in the same category worth evaluating.
Compared with GitHub
Side-by-side breakdowns for the choices people most often weigh against this MCP.
Exploring Top MCPs for Git & Repo Workflows? See all Git & Repo Workflows MCPs →