MCP serverPartly tested (needs an account)

Work with your GitHub projects

GitHub MCP Server

GitHub's official MCP server lets your agent read and manage repositories, issues, pull requests and Actions. This setup needs a token and Docker.

Works with
Claude Code, Codex CLI, Gemini CLI
Good for
Web developers, Everyone

What it does

This is GitHub's own MCP server. MCP (Model Context Protocol) is a standard way to give an AI assistant extra tools. After you connect it, your assistant can use GitHub for you. It can read code files, search a repository, and list or create issues. It can read pull requests, check GitHub Actions runs and look at security alerts. A pull request is a proposed change to a project. GitHub Actions runs automatic builds and tests.

You ask in plain words. For example: "Why did the last build fail?" The assistant calls the right GitHub tool and explains the result.

You can run the server in two ways. The page install command starts it on your own computer with Docker. Docker is a program that runs packaged software in a closed box. The second way is a remote server that GitHub hosts at https://api.githubcopilot.com/mcp/. It needs no Docker. GitHub's guides show both ways for each assistant.

The server needs a way to know who you are. You can use a GitHub personal access token. This is a password-like key with limited rights. The local Docker server can also sign you in with your browser (OAuth), according to the guides. You choose the rights. Start with read access only. The README also describes a read-only mode, which hides all tools that change things.

Who it is for

  • People who keep a project on GitHub and want status checks or small chores done in plain words.
  • Developers who want the assistant to read issues and pull requests without copy and paste.

Example prompts

  • "List my GitHub repositories."
  • "Show the open issues in my website repository and sort them by age."
  • "Why did the last GitHub Actions run fail? Explain in plain words."
  • "Summarise what changed in pull request 12."
  • "Create an issue in my repository: the contact form does not send emails."

How to install

claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server

How to use it

Create a token with only the rights you need, set it as GITHUB_PAT, then run the install command. Ask for tasks such as "list open issues labelled bug" or "summarise this pull request".

Other assistants

Codex CLI uses the remote server. Set your token in the variable GITHUB_PAT_TOKEN first.

codex mcp add github --url https://api.githubcopilot.com/mcp/ --bearer-token-env-var GITHUB_PAT_TOKEN

Gemini CLI has an extension for the remote server. It needs a token named GITHUB_MCP_PAT in your environment.

gemini extensions install https://github.com/github/github-mcp-server

Check it works

In Claude Code, run these two commands in your normal terminal.

claude mcp list
claude mcp get github

In Codex, type /mcp and check that github shows tools. In Gemini CLI, type /mcp list. Then ask "List my GitHub repositories."

Common problems

  • The server is missing after you add it: restart your assistant. The Claude guide says to restart Claude Code, then run claude mcp list.
  • Docker cannot pull the image: the image is public. The README says an old login can cause this. Run docker logout ghcr.io and try again.
  • Codex shows "401 Unauthorized": the token expired or you revoked it. Create a new token and update the variable that holds it.
  • The Gemini extension shows no tools: set the token as GITHUB_MCP_PAT. The guide suggests the file ~/.gemini/.env.
  • A tool is missing or fails with a permission error: the token lacks that right. Add only the right that the task needs.

What to watch out for

  • The token gives the agent the same rights you gave the token. Use a fine-grained token limited to one repository and to read access where you can.
  • Write tools can create issues, comment, merge and change files. Approve them one by one.
  • Issue text from other people can contain hidden instructions for the agent.
  • The setup needs Docker.

Licence and author

Licence
MIT
Author
GitHub
Source code
github.com/github/github-mcp-server

How we tested it

We installed it on an empty test computer on 12 Oct 2026. Partly tested: installed in a clean test system, but its main features need an account or key we did not use.

Test level

The server was not started and no tools were listed. Everything about behaviour comes from the README, not from our test.

Technical details of the test
Date
12 Oct 2026
Method
Cloned the repository in a clean container with no account and read its files: the Gemini extension manifest is valid JSON. We did not start the server, because the install line needs Docker (not available in the sandbox) and a GitHub token.

Checked again on 12 Oct 2026

Alternatives

  • GitHub CLI (gh): GitHub's terminal tool. Assistants can run it as a normal command. It needs no MCP server.
  • pr-review-toolkit-agents: reviewer agents for a code change on your computer. They do not talk to GitHub issues or Actions.

FAQ

Is it free? The server uses the MIT licence. Your GitHub account rules and limits still apply.

Do I need Docker? Not for the remote server, and not for the downloadable program. The page install command uses Docker.

Can it change my code? Yes, if the token allows writing. Use a token with read access first. Check each write action.

Is it safe to read issues from strangers? Text in issues can hold hidden instructions. The README describes a lockdown mode that limits content from people without push access. It is not a full safety wall.

Sources