Skip to content

MCP server

GitHub MCP server

GitHub's official MCP server lets AI read repositories, search code, manage issues and pull requests and, when allowed, change files.

At a glance

Maintained by
GitHub
Tools exposed
10 listed below
Reviewed
September 24, 2026

Why it matters

What it does and why it matters

GitHub is where most software teams keep their code, issues and reviews. GitHub's official MCP server lets an assistant read repositories and files, search code, list and write issues, open and read pull requests and, if allowed, create branches, commit files and merge.

For development teams, it connects a coding assistant to the real project instead of a pasted snippet. For managers, it makes questions like "which pull requests are waiting for review" a one-line request.

It replaces the older MCP reference server, which was archived. It offers a read-only mode, which we use for anything beyond hands-on coding. Tokens should be fine-grained and limited to the repositories a task needs. We never let an agent merge to a protected branch without a person approving the review.

Use cases

Best business use cases

Review help

Summarize a pull request and point out risky changes for a reviewer.

Issue triage

Label and summarize new issues, and link duplicates.

Code search

Find where a function is used across repositories.

Release notes

Draft release notes from merged pull requests.

Status questions

Answer "what is waiting for review" in plain English.

Tools

Available tools

Tool names as published by the maintainer at review time. Versions change, so check the repository for the current list.

Read and write: Read and write: reads repos, issues and PRs, and can create issues, branches, files and merge PRs; a read-only mode is available.

  • get_me

    Get the signed-in user's profile.

  • search_repositories

    Search repositories.

  • get_file_contents

    Get file or directory contents.

  • search_code

    Search code across GitHub.

  • list_issues

    List issues in a repository.

  • issue_write

    Create or update an issue.

  • create_pull_request

    Open a new pull request.

  • pull_request_read

    Get details for a single pull request.

  • merge_pull_request

    Merge a pull request.

  • create_or_update_file

    Create or update a file in a repository.

Workflows

Example workflows

Weekly issue triage

  1. 1

    The assistant lists new issues from the last week.

  2. 2

    It summarizes each one and suggests labels.

  3. 3

    It finds likely duplicates.

  4. 4

    A maintainer reviews the suggestions.

  5. 5

    Approved labels and links are applied.

Draft release notes

  1. 1

    Ask for pull requests merged since the last release.

  2. 2

    The assistant reads titles and descriptions.

  3. 3

    It groups changes into features and fixes.

  4. 4

    It drafts release notes in plain language.

  5. 5

    A person edits and publishes them.

Prompts

Example prompts

  • “List open pull requests waiting more than three days for review, with authors.”

  • “Summarize this pull request and flag anything that touches payments code.”

  • “Draft release notes for everything merged since tag v2.4.0.”

Setup

Installation and configuration

Examples for Claude Desktop and Claude Code. Replace the placeholder values with your own keys, and store secrets outside version control.

Claude Desktop: claude_desktop_config.json

{
    "mcpServers": {
        "github": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "GITHUB_PERSONAL_ACCESS_TOKEN",
                "ghcr.io/github/github-mcp-server"
            ],
            "env": {
                "GITHUB_PERSONAL_ACCESS_TOKEN": "YOUR_GITHUB_PAT"
            }
        }
    }
}

Claude Code: terminal

claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT"
  • Hosted server: streamable-http; https://api.githubcopilot.com/mcp/; OAuth (host must support it) or header Authorization: Bearer <GITHUB_PAT>.
  • Local server: stdio; ghcr.io/github/github-mcp-server; github-mcp-server stdio (GitHub releases).
  • Needs: GITHUB_PERSONAL_ACCESS_TOKEN (or OAuth login).

Security

Security considerations

  • Fine-grained tokens

    Limit tokens to specific repositories and permissions.

  • Read-only mode

    Use read-only mode unless the task needs to write.

  • Protected branches

    Keep branch protection and required reviews on.

  • Untrusted text

    Issue and PR text can contain misleading instructions. Review agent actions.

Related servers

Servers that pair well with it

GitLab

GitLab's built-in MCP server lets AI read projects, code, merge requests and pipelines and create commits and work items. In beta.

Git

The MCP project's Git reference server lets AI read history and diffs and stage, commit and switch branches in a local repository.

Sentry

Sentry's official MCP server lets AI search errors, events and traces, read issue details, get AI analysis and update issues.

Keep exploring

FAQ

Questions people ask us

Have a question that is not here? Ask us directly.

Start a project

Want this connected to your own systems? We build AI workflows with MCP.

Send a short brief. We reply with questions, a suggested plan and an estimate you can compare with other offers.

Your privacy choices

We use necessary storage to run this site. With your permission we also use Google Analytics to see which pages help people, and load maps from Google. You can change this at any time. Read the cookie policy.