GitHub MCP Server

  • MCP server
  • Official

GitHub's own MCP server lets Claude read repos, open and triage issues, review pull requests and check Actions runs on your behalf.

On this page8 sections

Best for

  • Triaging issues and pull requests without opening github.com
  • Asking questions about code in a repo you can access
  • Checking why a GitHub Actions run failed

Quick install

Remote server with a personal access token (Claude Code), or local Docker server (Claude Desktop)

Before you start

  1. Create a fine-grained GitHub personal access token at github.com/settings/personal-access-tokens/new (opens in a new tab) with only the repository permissions you want Claude to have.

  1. Create a fine-grained GitHub personal access token at github.com/settings/personal-access-tokens/new (opens in a new tab) with only the repository permissions you want Claude to have.

  2. Claude Code (version 2.1.1 or newer), in your terminal:

    claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'
  3. Claude Code (version 2.1.0 or older):

    claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT"
  4. Restart Claude Code, then run

    claude mcp list

    to confirm the github server is listed.

  5. Claude Desktop: install and start Docker, open Settings > Developer > Edit Config, paste the Docker block from GitHub's install guide (image ghcr.io/github/github-mcp-server with GITHUB_PERSONAL_ACCESS_TOKEN in env), save, and restart Claude Desktop.

At a glance

Type
MCP server
Made by
GitHub (official)
Tested by us
Not yet
Works with
  • Claude Desktop
  • Claude Code
Sign-in needed
YesNeeds a GitHub personal access token. The local Docker image can also sign you in with a browser OAuth login instead of a token.
Cost
The server is free and open source (MIT). Your access is limited by your GitHub plan and token permissions; GitHub's docs list no separate MCP charge.
License
MIT
Registry name
io.github.github/github-mcp-server
Facts checked

What it does (plain English)

The GitHub MCP server gives Claude a set of GitHub abilities: reading files and commits, searching code, opening and commenting on issues, reviewing pull requests, and looking at GitHub Actions runs. An MCP server is a plug-in that gives Claude a new ability, and this one is built and maintained by GitHub itself.

GitHub runs a hosted copy at https://api.githubcopilot.com/mcp/, so in Claude Code you do not install anything; you point Claude at that address and hand it a token. You can also run the server on your own computer through Docker, which is the route GitHub’s guide gives for Claude Desktop.

The server groups its tools into “toolsets”. With no configuration you get the default set: context, repos, issues, pull_requests and users. Others, such as actions, code_security, dependabot, discussions, gists, notifications and projects, can be switched on when you need them.

Is it for you?

Pick this if your projects live on GitHub and you are tired of clicking through tabs to answer simple questions like “which issues are still open on the website repo?” It works well for solo builders who keep their code on GitHub and want Claude to file issues, summarise pull requests or explain a failing build.

Skip it if you only use claude.ai in the browser. GitHub’s install guide says its remote server needs OAuth through a registered GitHub App, which “is not currently supported”, so it points Claude Desktop users to the local Docker setup instead. If Docker sounds like too much, start with Claude Code, where the hosted server works with one command.

What you can do with it

  • Triage a backlog: “List open issues in my-org/website labelled bug, newest first, and draft a one-line summary for each.”
  • Review a pull request: “Read PR #42 in my-org/website, list the files it changes and flag anything that touches the checkout page.”
  • Explain a failed build: with the actions toolset on, “Why did the last workflow run on main fail?”
  • Search code you can access: “Find where we set the newsletter API key in my-org/website.” The search tool supports qualifiers such as repo:, path: and language:.
  • Create work items: “Open an issue titled ‘Footer links broken on mobile’ with these steps to reproduce.”

How to set it up

  1. Make a token. Go to https://github.com/settings/personal-access-tokens/new and create a fine-grained personal access token. Give it access only to the repositories Claude should touch, and only the permissions you are comfortable with. GitHub’s troubleshooting notes say authentication failures are often a missing repo scope or an expired token.

  2. Store it safely. GitHub suggests putting it in a .env file as GITHUB_PAT=your_token_here and adding .env and .mcp.json to .gitignore so it never gets committed.

  3. Claude Code (2.1.1 or newer). In a normal terminal, not inside Claude Code, run:

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

    On Claude Code 2.1.0 or older, or if add-json returns Invalid input on Windows, use the older form:

    claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT"

    Add --scope user if you want it in every project rather than just the current folder.

  4. Check it. Restart Claude Code and run claude mcp list, or type /mcp inside a session.

  5. Claude Desktop. Install Docker and make sure it is running. Open Settings > Developer > Edit Config and add:

    {
      "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" }
        }
      }
    }

    Save and restart Claude Desktop. GitHub’s guide also shows a variant that logs you in through the browser instead of a token, using a fixed callback port (8085).

Watch out for

  • Token power equals Claude’s power. Whatever your token can do, Claude can do. A narrow fine-grained token per project is the safest habit; GitHub recommends separate tokens for different projects.
  • Read-only mode exists. The server supports a --read-only flag (in Docker, the environment variable GITHUB_READ_ONLY=1) that only offers read tools. Use it while you are learning.
  • Untrusted text in public repos. Issues and comments on public repositories can contain instructions aimed at AI tools. GitHub offers a “lockdown mode” that hides content from authors without push access, and describes it as a best-effort filter, not a security boundary.
  • Docker on Desktop. GitHub’s guide notes some users have reported compatibility issues between Claude Desktop and Docker-based servers.
  • Old package names. The npm package @modelcontextprotocol/server-github was deprecated in April 2025. Ignore tutorials that still use it.

Alternatives

  • Linear MCP if your team tracks work in Linear rather than GitHub Issues.
  • Atlassian Rovo MCP for Jira and Bitbucket shops.
  • Sentry MCP if your main question is “why is production throwing this error?” rather than “what’s in the repo?”

Sources

Facts checked against these sources on . Page updated . How we check facts

  1. npmjs.com/package/@modelcontextprotocol/server-github (opens in a new tab)
  2. github.com/github/github-mcp-server (opens in a new tab)
  3. raw.githubusercontent.com/github/github-mcp-server/main/README.md (opens in a new tab)
  4. raw.githubusercontent.com/github/github-mcp-server/main/docs/installation-guides/install-claude.md (opens in a new tab)
  5. raw.githubusercontent.com/github/github-mcp-server/main/LICENSE (opens in a new tab)
  6. registry.modelcontextprotocol.io/v0.1/servers/io.github.github%2Fgithub-mcp-server/versions/latest (opens in a new tab)
  7. code.claude.com/docs/en/mcp (opens in a new tab)

Related tools

All dev tools tools

  • Notion MCP

    by Notion

    • MCP server
    • Official

    Notion's hosted MCP server lets Claude search your workspace, read pages as Markdown, and create or update pages and databases you can access.

    Works with
    • Claude.ai
    • Claude Desktop
    • Claude Code
  • Claude Code official plugin marketplace

    by Anthropic

    • Plugin
    • Official

    Anthropic's default Claude Code plugin catalog: 315 plugins from Anthropic and partners, added automatically and installed with one /plugin command.

    Works with
    • Claude Code
    • Claude Desktop
  • Claude Code Templates (aitmpl.com)

    by Daniel Ávila (community)

    • Subagent repo
    • Third-party

    A community npx installer and website for copying Claude Code agents, commands, hooks, settings, MCP configs and skills into your project one by one.

    Works with
    • Claude Code
  • Cloudflare MCP Servers

    by Cloudflare

    • MCP server
    • Official

    Cloudflare's MCP servers let Claude manage DNS, Workers, R2, D1 and more through one API server, plus focused servers for docs and browser fetching.

    Works with
    • Claude.ai
    • Claude Desktop
    • Claude Code