Skip to content
MCP Shelf

GitHub MCP Server

GitHub's own server for repos, issues, pull requests and Actions.

View on GitHub
  • Needs your setup first
  • ★ 34K GitHub stars
  • Last commit 28 Oct 2026

What is GitHub?

The GitHub MCP server is GitHub's official MCP server: it lets AI assistants read and manage repositories, issues, pull requests and Actions, through a hosted endpoint or a local Docker image.

Tools
46
Runs on
Hosted or your computer
Licence
MIT
GitHub stars
34K

Good for

  • Triage: summarise new issues and failing runs
  • Reviewing or drafting pull requests from the chat
  • Searching code across an organisation

You'll need

  • A GitHub account
  • A fine-grained personal access token, or OAuth in clients that support it
Works withClaude CodeCursorClaude DesktopVS CodeCodexWindsurfEach has a ready-made config on the Install tab, built from the README.

Needs your setup firstIt needs something our Linux test machine does not have (an account, a desktop app, a Mac or a running service), so on 26 Oct 2026 we listed its tools from its package instead of running this config.

Try asking GitHub

Once it is installed, ask your assistant things like:

  • Summarise the open pull requests on my repo and which ones are waiting on me.
  • Why did the last GitHub Actions run on main fail? Show me the failing step.
  • Open an issue for the login bug we just found, with steps to reproduce.

MCP Shelf take

GitHub needs something our Linux test machine does not have (an account, an app or a service), so on 26 Oct 2026 we ran its package and counted 46 tools. 27 of the 46 only read; the other 19 can change things. Every tool comes with a useful description, all of them say whether they change things, and the tool list costs about 3,300 tokens of context before you ask a thing. It sits 2nd of 24 in its category on our shelf by GitHub stars (34K).
MCP Shelf tests: numbers from our own runs, not the README · tested on 26 Oct 2026

What can GitHub read and change?

It can read

  • Every repository, issue, pull request and Actions log your token or sign-in can see, private ones included

It can change

  • Can push files, open and merge pull requests, comment, close issues and re-run workflows, as you

Safer setup: Start with read-only mode, use a fine-grained token limited to the repositories you name, and turn on lockdown mode if the assistant reads public issues from strangers.

GitHub in more detail

This is the server GitHub maintains. Through it an assistant can browse code, open and comment on issues and pull requests, check Actions runs and search across repositories you can see.

GitHub hosts it, so most people never install anything: point the client at the URL and authenticate. A Docker image exists for anyone who needs to run it themselves.

Made by
GitHub
Last commit
28 Oct 2026
Setup checked
27 Oct 2026
Page updated
27 Oct 2026

What's in the pod

What tools does GitHub have?

We found 46 tools when we ran its package, before any sign-in or app was connected, on 26 Oct 2026. 27 only read. The rest can change things, so keep your app's "ask before each tool call" setting on for them.

How we tested it: Listed by the official github-mcp-server binary built from source with its default toolsets, without a real token. The hosted URL on this page serves the same toolsets after you sign in.

Changes things19 tools · Can create, edit, send or delete.

ToolWhat it is for
add_comment_to_pending_reviewAdds a line comment to a review you have started but not sent.
add_issue_commentPosts a comment on an issue or pull request.
add_reply_to_pull_request_commentReplies inside an existing review comment thread.
assign_copilot_to_issueHands an issue to GitHub's Copilot coding agent to work on.
create_branchMakes a new branch from an existing one.
create_or_update_fileWrites one file to a branch as a new commit.
create_pull_requestOpens a pull request between two branches.
create_repositoryCreates a new repository under your account or an organisation.
delete_fileRemoves a file from a branch with a commit.
fork_repositoryForks a repository to your account or an organisation.
issue_writeOpens a new issue or edits, labels, assigns or closes an existing one.
merge_pull_requestMerges a pull request by merge, squash or rebase.
pull_request_review_writeStarts, submits or deletes a review on a pull request.
push_filesCommits several files to a branch in one go.
request_copilot_reviewAsks Copilot to review a pull request.
sub_issue_writeAdds, removes or reorders sub-issues under a parent issue.
update_issue_commentEdits a comment you posted.
update_pull_requestChanges a pull request's title, body, base branch, state or reviewers.
update_pull_request_branchBrings a pull request branch up to date with its base.

Only reads27 tools · Looks things up and changes nothing.

ToolWhat it is for
get_commitShows one commit with its message and changed files.
get_file_contentsReads a file, or lists a folder, at any branch or commit.
get_labelLooks up one label in a repository.
get_latest_releaseFinds the newest published release.
get_meShows which GitHub account the token belongs to.
get_release_by_tagFinds a release by its tag.
get_tagShows the details of one git tag.
get_team_membersLists the people in an organisation team.
get_teamsLists the teams you belong to.
issue_readReads an issue, its comments, labels or sub-issues.
list_branchesLists a repository's branches.
list_commitsLists recent commits on a branch, optionally by author.
list_issue_fieldsLists the custom issue fields an organisation has set up.
list_issue_typesLists the issue types an organisation uses, such as bug or task.
list_issuesLists issues with filters for state, labels and dates.
list_pull_requestsLists pull requests with filters for state and branch.
list_releasesLists a repository's releases.
list_repository_collaboratorsLists people with access to a repository.
list_tagsLists a repository's git tags.
pull_request_readReads a pull request: its diff, files, reviews, comments or check status.
search_codeSearches code across GitHub with GitHub's search syntax.
search_commitsSearches commit messages and authors.
search_issuesSearches issues across repositories.
search_pull_requestsSearches pull requests across repositories.
search_repositoriesFinds repositories by name, topic, language and more.
search_usersFinds GitHub users and organisations.
ui_getFetches data the server's interactive views need, in clients that show them.

Tool groups

repos
Browse files, branches, commits and tags; create or update files and branches.
issues
Search, read, open, comment on and close issues.
pull_requests
Read diffs and reviews, open pull requests, comment, request reviews and merge.
actions
List workflow runs, read job logs, re-run or cancel runs.
code_security
Read code scanning alerts.
secret_protection
Read secret scanning alerts.
dependabot
Read Dependabot alerts.
discussions
Read and search repository discussions.
notifications
Read and dismiss your GitHub notifications.
projects
Read and update GitHub Projects boards.
gists
Read and create gists.
users / orgs
Look up people and organisations.
all
Turns on every toolset at once.

Grouped and described by us. The README on GitHub lists the inputs each tool takes.

How clearly it describes its tools to your assistant

Tools with a description
46 of 46
Say if they change things
46 of 46
Context it takes, at least
~3,300 tokens

Every tool says whether it only reads or can change things, so a client can ask before the risky ones.

From the tool list it sent us. The token figure counts names, descriptions and input names; the full schemas your client loads add more.

How do I install GitHub?

Quick install

Pick your app and paste this in. It follows the README's own install steps below.

Where it goes: Your terminal (Claude Code 2.1.1 or newer)

Claude Code
claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'

Add --scope user to use it in every project. If Windows answers Invalid input, use claude mcp add --transport http github https://api.githubcopilot.com/mcp --header "Authorization: Bearer YOUR_GITHUB_PAT" instead. Check it with claude mcp list.

Codex, Windsurf, ChatGPT and more →

Install steps from the GitHub README

The project's own instructions, copied from its README on GitHub on 10 Nov 2026 under its MIT licence. They are the source of truth; the ready-made configs further down are built from them. The full README is on GitHub.

Installation
Install in GitHub Copilot on VS Code

For quick installation, use one of the one-click install buttons above. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start.

More about using MCP server tools in VS Code's agent mode documentation.

Install in GitHub Copilot on other IDEs (JetBrains, Visual Studio, Eclipse, etc.)

Add one of the following JSON blocks to your IDE's MCP settings.

Log in with OAuth (no token to create or store). On github.com the official image already includes the app credentials, so you provide none yourself: it runs a browser-based login on first use and keeps the resulting token in memory only. In Docker this needs a fixed callback port published to loopback so the container's login callback is reachable:

{
  "mcp": {
    "servers": {
      "github": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-p",
          "127.0.0.1:8085:8085",
          "-e",
          "GITHUB_OAUTH_CALLBACK_PORT",
          "ghcr.io/github/github-mcp-server"
        ],
        "env": {
          "GITHUB_OAUTH_CALLBACK_PORT": "8085"
        }
      }
    }
  }
}

See Local Server OAuth Login for the native-binary flow (no fixed port needed), the headless/device-code fallback, GitHub Enterprise Server / ghe.com, and bringing your own OAuth or GitHub App.

For non-interactive stdio deployments, see GitHub App Authentication.

Or authenticate with a Personal Access Token. Set GITHUB_PERSONAL_ACCESS_TOKEN instead (it takes precedence over OAuth):

{
  "mcp": {
    "inputs": [
      {
        "type": "promptString",
        "id": "github_token",
        "description": "GitHub Personal Access Token",
        "password": true
      }
    ],
    "servers": {
      "github": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "-e",
          "GITHUB_PERSONAL_ACCESS_TOKEN",
          "ghcr.io/github/github-mcp-server"
        ],
        "env": {
          "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
        }
      }
    }
  }
}

Optionally, you can add a similar example (i.e. without the mcp key) to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with other host applications that accept the same format.

Example JSON block without the MCP key included
{
  "inputs": [
    {
      "type": "promptString",
      "id": "github_token",
      "description": "GitHub Personal Access Token",
      "password": true
    }
  ],
  "servers": {
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITHUB_PERSONAL_ACCESS_TOKEN",
        "ghcr.io/github/github-mcp-server"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}"
      }
    }
  }
}
Install in Other MCP Hosts

For other MCP host applications, please refer to our installation guides:

For a complete overview of all installation options, see our Installation Guides Index.

Note: Any host application that supports local MCP servers should be able to access the local GitHub MCP server. However, the specific configuration process, syntax and stability of the integration will vary by host application. While many may follow a similar format to the examples above, this is not guaranteed. Please refer to your host application's documentation for the correct MCP configuration syntax and setup process.

Build from source

If you don't have Docker, you can use go build to build the binary in the cmd/github-mcp-server directory, and use the github-mcp-server stdio command with the GITHUB_PERSONAL_ACCESS_TOKEN environment variable set to your token. To specify the output location of the build, use the -o flag. You should configure your server to use the built executable as its command.

STDIO API requests identify the server as github-mcp-server/<version> and retain the upstream MCP client's name/version in parentheses when available. Control characters, quotes, backslashes and parentheses in client metadata are escaped so the HTTP header remains valid; ordinary names, versions, spaces and printable Unicode are preserved. Release builds keep their release version. Source and default Docker builds with revision metadata use vcs-<full-commit-sha>. The Docker publishing workflow preserves tag versions, including prereleases, and lets branch, pull-request and nightly builds use the linked source revision. The -dirty marker applies only when both the revision and modified state come from embedded VCS metadata, never to a valid, explicitly supplied main.commit. This is a VCS build identifier, not a release number.

Build the complete package with go build -o github-mcp-server ./cmd/github-mcp-server from a Git checkout to embed its VCS revision. For builds without VCS metadata, supply the actual release with -ldflags '-X main.version=<release>' or the full source revision with -ldflags '-X main.commit=<sha>'. Valid metadata is selected in this order: explicit release, explicit source revision, embedded VCS revision, then installed main-module version. Valid explicit revisions remain authoritative even if build-context filtering changes embedded VCS metadata. Missing or malformed candidates fall through to the next usable source. If none is available, STDIO still starts with the development label dev and emits a warning on stderr, leaving stdout available for the MCP protocol. Supply real release or revision metadata when version-specific attribution is needed.

For example:

{
  "mcp": {
    "servers": {
      "github": {
        "command": "/path/to/github-mcp-server",
        "args": ["stdio"],
        "env": {
          "GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
        }
      }
    }
  }
}

What you need first

  • A GitHub account
  • A fine-grained personal access token, or OAuth in clients that support it

Add GitHub to your app

Pick your app for a ready-to-paste snippet and where it goes, built from the steps above.

Where it goes: Your terminal (Claude Code 2.1.1 or newer)

Claude Code
claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'

Add --scope user to use it in every project. If Windows answers Invalid input, use claude mcp add --transport http github https://api.githubcopilot.com/mcp --header "Authorization: Bearer YOUR_GITHUB_PAT" instead. Check it with claude mcp list.

Swap YOUR_API_KEY for a fine-grained token limited to the repositories and permissions you actually want the assistant to use.

Step-by-step guides for GitHub

Longer walk-throughs for one app at a time: sign-in, scopes, trimming the tools, and that app's own errors.

Checked against the project's own install docs on 27 Oct 2026: github/github-mcp-server README, github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-claude.md, github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-cursor.md, github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-windsurf.md.

Did this work for you?

Projects change their install steps often. If GitHub did not install, or something here no longer matches the project, tell us and we will check it against the README and fix the page.

New to this? See the setup guides for Claude Code, Cursor, Claude Desktop, VS Code, Codex and ChatGPT. If it will not start, test it in MCP Inspector and look up the error in Fixing MCP server errors.

GitHub not working? Common fixes

401 Bad credentials
The token is wrong or expired, or the variable is not reaching the container. With Docker, pass it with -e GITHUB_PERSONAL_ACCESS_TOKEN as well as in env.
The assistant picks odd tools or the prompt is very long
Limit the toolsets to what you use, for example repos,issues,pull_requests.
Your app cannot sign in to the hosted server
Not every app supports GitHub's OAuth flow yet. Send a token as an Authorization: Bearer header instead, or run the Docker version.
403 on an organisation's repositories
The organisation may require approval for fine-grained tokens or SSO authorisation. Approve the token in the organisation's settings.

How do I configure GitHub?

Names are exactly as the project spells them. Required ones are marked.

SettingWhat it does
https://api.githubcopilot.com/mcp/ConfigThe hosted server. Sign in with GitHub in apps that support OAuth, or send a token as a header."url": "https://api.githubcopilot.com/mcp/"
GITHUB_PERSONAL_ACCESS_TOKENEnvironment variable · requiredYour token for the local (Docker) version. Give it only the repository permissions you are happy for an assistant to use.github_pat_xxxxxxxx
GITHUB_TOOLSETS / --toolsetsEnvironment variableTurns on only the groups of tools you list. Fewer tools means better tool choice and a smaller prompt.repos,issues,pull_requests
GITHUB_TOOLS / --toolsEnvironment variableTurns on individual tools by name, on top of any toolsets.get_file_contents,create_pull_request
GITHUB_READ_ONLY / --read-onlyEnvironment variableOffers only tools that read. Write tools are skipped even if you ask for them.1
--lockdown-modeCommand line flagHides content on public repositories written by people without push access, to cut the risk of prompt injection from strangers' issues and comments.--lockdown-mode
GITHUB_HOST / --gh-hostEnvironment variablePoints the server at GitHub Enterprise Server or a ghe.com domain.https://github.example.com

GitHub FAQ

How do I add the GitHub MCP server to Claude Code?

Create a fine-grained personal access token, then run claude mcp add-json github with the hosted URL https://api.githubcopilot.com/mcp and an Authorization: Bearer header carrying the token. Older Claude Code versions use claude mcp add --transport http with --header instead. Run claude mcp list to check it.

How do I add the GitHub MCP server to Claude Desktop?

Use the Docker image ghcr.io/github/github-mcp-server in claude_desktop_config.json. GitHub notes that its hosted server cannot yet be added as a Claude custom connector, because that needs an OAuth app registered for Claude. The Docker version can sign you in through the browser or take a token.

Does the GitHub MCP server work with Cursor and VS Code?

Yes, both connect to the hosted server. VS Code 1.101 and later signs in with your GitHub account, so no token is needed. Cursor needs a personal access token in an Authorization header for this server.

Is the GitHub MCP server free?

Yes. It is MIT licensed, the hosted version costs nothing, and any GitHub account can use it; you do not need a Copilot subscription. A few optional toolsets on the hosted server relate to Copilot features.

Is it safe to let an AI use my GitHub account?

It can open issues, comment, merge pull requests and push files, so start narrow: a fine-grained token limited to the repositories you name, the --read-only flag or read-only header, and lockdown mode if the assistant reads issues written by strangers, which can carry prompt injection.

Hosted or local GitHub MCP server?

The hosted server is the easy option: nothing to install, always current, and OAuth in VS Code. Run the Docker image or release binary when your app cannot use a remote server, when you use GitHub Enterprise Server, or when you want the token to stay on your machine.

Why do I get 401 Bad credentials from the GitHub MCP server?

The token is missing, expired or pasted with extra spaces, or the header does not read exactly Bearer followed by the token. For 403 errors on an organisation's repositories, the organisation may need to approve fine-grained tokens first.

Can I limit which GitHub tools the assistant sees?

Yes. Pick toolsets with --toolsets or GITHUB_TOOLSETS (for example repos, issues, pull_requests), or name single tools with --tools. Fewer tools means a shorter prompt and fewer odd tool choices, which helps smaller models most.

Does GitHub work with Codex?

Yes. Add an [mcp_servers.github] table with url = "https://api.githubcopilot.com/mcp/" and your key in http_headers to ~/.codex/config.toml, which the Codex CLI and IDE extension share. Codex can also read the token from an environment variable: replace http_headers with bearer_token_env_var = "YOUR_VAR_NAME".

Two peas, one chat

Chat with AI about GitHub

Opens a chat primed with GitHub’s README and setup docs from this page, or add it in Cursor to use its tools.

The Cursor button opens Cursor and asks before it adds the server. Fill in any keys it needs in Cursor’s MCP settings.

Peas in a pod

What are the alternatives to GitHub?

How GitHub lines up against its neighbours on the shelf. See every developer tools server.

  • GitHubThis pea

    GitHub's own server for repos, issues, pull requests and Actions.

    Tools
    46
    Runs on
    Hosted or your computer
    Licence
    MIT
    Stars
    34K
  • MCP Inspector

    The official debugging UI for MCP servers. Not a server you add to a client.

    Tools
    Test client
    Runs on
    Your computer
    Licence
    MIT / Apache-2.0
    Stars
    11.2K
  • XcodeBuildMCP

    Build, run and test iOS and macOS apps, and drive simulators, from an agent.

    Tools
    24
    Runs on
    Your computer
    Licence
    MIT
    Stars
    6.5K
  • Peekaboo

    Screenshots of any Mac app or screen, with optional questions about what is on it.

    Tools
    4 groups
    Runs on
    Your computer
    Licence
    MIT
    Stars
    5.4K
  • Kubernetes MCP Server

    Pods, logs, events and resources from your current kubeconfig context.

    Tools
    14
    Runs on
    Your computer
    Licence
    Apache-2.0
    Stars
    2.2K
  • IDA Pro MCP

    Lets an assistant read and annotate the binary you have open in IDA Pro.

    Tools
    48
    Runs on
    Your computer
    Licence
    MIT
    Stars
    13.2K

Pea-sics and how-tos

Guides that use GitHub

Full docs on GitHubgithub/github-mcp-server

Something wrong on this page? Tell us.

For bots & AI agents

Machine-readable versions of GitHub and MCP Shelf. Fetch these instead of parsing this page.

This listing (.md)llms.txtllms-full.txtai.txtFull catalog (.md)API specMCP serverMCP manifestDeveloper docs