Get the FREE Ultimate OpenClaw Setup Guide →

gh-github

GitHub CLI extension for GitHub MCP Server with automatic authentication

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mayorfaj-gh-github-mcp-server gh github-mcp-server stdio

How to use

This MCP server integrates with the GitHub CLI to provide a GitHub-focused MCP server experience. It runs in stdio mode, which makes it suitable for editor integrations such as VS Code, where the MCP client can communicate with the server over standard input and output. The server leverages your existing GitHub CLI authentication, so there is no separate token management or login flow required. To use it with VS Code, configure the MCP server in your user settings to point to the gh-based extension, enabling commands to be sent to the server via the GitHub CLI extension.

Once configured, you can start, manage, and interact with MCP servers through the standard MCP workflow, benefiting from automatic installation and zero configuration. The key capability is that the server uses your current gh authentication context, so you won’t need to re-authenticate for MCP operations that rely on GitHub credentials. If you already use the GitHub CLI, this extension is designed to fit into your existing workflow with minimal setup.

How to install

Prerequisites:

  • GitHub CLI (gh) installed and authenticated
  • Access to install GitHub CLI extensions
  • A compatible editor (e.g., VS Code) if you plan to use stdio integration

Install the MCP server extension:

gh extension install MayorFaj/gh-github-mcp-server

Verify installation (optional):

gh version
# Ensure gh-github-mcp-server is available via extensions

Configure or start the MCP server in stdio mode via your editor (example for VS Code):

// VS Code settings snippet
"mcp": {
  "servers": {
    "github": {
      "command": "gh",
      "args": [
        "github-mcp-server",
        "stdio"
      ]
    }
  }
}

Alternatively, you can manually invoke the server from the command line if needed:

gh github-mcp-server stdio

Note: The server relies on your existing gh authentication, so ensure you are logged in with gh before starting the server.

Additional notes

Tips and common considerations:

  • The server uses your current GitHub CLI authentication, so ensure gh login is up to date and has access to the necessary scopes.
  • No Docker or extra dependencies are required; the extension handles the binary usage through the gh CLI extension mechanism.
  • If you run into issues with stdio integration in your editor, check that the editor is configured to connect to the MCP server using the exact command and arguments specified (gh github-mcp-server stdio).
  • There are no additional environment variables documented for this server; the behavior primarily depends on your gh configuration and authentication state.

Related MCP Servers

Sponsor this space

Reach thousands of developers