gh-mcp CLI

gh-mcp runs the GitHub MCP server as a gh extension on your GitHub CLI login, with no personal token in client settings.

  • 54 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • The agent acts with your `gh` login rights over repositories and issues.
  • `--read-only` and `--toolsets` narrow rights, but by default more is available.
All reasons and checks

shuymn/gh-mcp

Install

Manual install

gh extension install shuymn/gh-mcp

The Installation section of the README. An authenticated GitHub CLI (`gh auth login`) is required.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The agent acts with your `gh` login rights over repositories and issues.
  • `--read-only` and `--toolsets` narrow rights, but by default more is available.

This is third-party code. Review the repository files before installing.

What it does

gh-mcp is a GitHub CLI extension that runs the official `github-mcp-server` as a bundled binary. Credentials come from `gh auth login`, so there is no access token to create and store for the MCP client. Client settings need only an entry with `command: gh`, `args: [mcp]`. The `--toolsets=repos,issues,pull_requests` flag limits the tool set and `--read-only` keeps only reads. Claude Code has a ready `claude mcp add-json github` command. Binaries are released for macOS, Linux and Windows on amd64, arm64 and 386.

Who it is for. Developers already signed in to `gh` who want to attach GitHub MCP to an agent without making a separate token.

Good fit when

  • GitHub MCP must be attached to Claude Code and you do not want to issue a token by hand.
  • An agent should get read access to repositories and issues only through `--read-only`.
  • The tool set must narrow to repositories, issues and pull requests.
  • The same setup is needed on several machines running different systems.

Not a fit when

  • Sign-in through `gh` is not set up or not available.
  • A remote HTTP MCP server is needed instead of a local process.
  • A separate account with trimmed rights is needed instead of your own login.

Example request

Attach GitHub MCP in read-only mode and list this repository's open issues.

Limitations

An installed and authenticated GitHub CLI is required. The agent acts with the rights of your `gh` login, so limit the tool set with the `--toolsets` and `--read-only` flags. Builds exist for the eight platforms on which the official server publishes archives. `gh extension upgrade mcp` updates it. The server itself remains the official one, and the extension only launches it.

How to disable. Remove the extension with `gh extension remove mcp` and the `github` entry from the MCP client settings.

FAQ

How do I install it?

Run `gh extension install shuymn/gh-mcp`. An authenticated `gh` is required. `gh extension upgrade mcp` updates it.

How do I add it to Claude Code?

Run `claude mcp add-json github '{"command":"gh","args":["mcp"]}'`. Flags such as `--read-only` go into the `args` array.

How do I limit the agent's rights?

Use `--read-only` and a `--toolsets` list such as `repos,issues`. The rights of the `gh` login remain the upper bound.

Is an access token needed?

No, the extension takes credentials from `gh`. Sign in with `gh auth login`.

Which platforms are supported?

macOS, Linux and Windows on amd64, arm64 and 386 wherever upstream publishes them.

Discussion

No questions or reviews yet.

CLI tools

clihub turns any MCP server into a ready CLI: each tool becomes a subcommand and the result is one static binary with no runtime dependencies

CLIBroad access668Repository stars

A git MCP server with 28 tools: an agent clones, commits, branches, merges, rebases and manages worktrees in local repositories.

MCP serverBroad access245Repository stars
Official

Official GitKraken MCP server from the gk CLI: git, pull requests and issues across GitHub, GitLab, Bitbucket and Jira

MCP serverBroad access465Repository stars
Official

A command-line debugger for MCP servers from Giant Swarm: a REPL for tools, OAuth 2.1 and an MCP server mode for Cursor

CLIExtended access38Repository stars

A remote MCP server that gives the agent docs and code of any public GitHub repository with nothing to install

MCP serverExtended access8.5KRepository stars

GitFlic MCP built on gitflic-cli

gitflic-cli MCP-сервер

Russian stack

An MCP server with 76 typed tools over a GitFlic CLI: merge requests, issues, releases, package registry, with group filters and a read-only mode

MCP serverExtended access

README in short

The extension removes manual token handling: attaching an MCP client takes one entry, and rights follow the `gh` login.

README badge

Report a problem