Skip to content

Installation

jamie edited this page May 2, 2025 · 3 revisions

Installation Guide

GitHub CLI MCP has a few prerequisites and can be installed via npm.

Prerequisites

  1. Node.js (v18 or later)
  2. GitHub CLI - Must be installed and authenticated

GitHub CLI Installation

Before installing GitHub CLI MCP, you need to install and authenticate the GitHub CLI:

Installing GitHub CLI

Follow the official instructions for your operating system: https://github.com/cli/cli#installation

Authenticating GitHub CLI

Once installed, authenticate with your GitHub account:

gh auth login

Follow the prompts to authenticate with GitHub.

Installing GitHub CLI MCP

Via npm

npm install -g gh-cli-mcp

From Source

If you want to install from source:

# Clone the repository
git clone https://github.com/CodingButterBot/gh_cli_mcp.git
cd gh_cli_mcp

# Install dependencies
npm install

# Build the project
npm run build

# Optional: Create a global symlink
npm link

Verifying Installation

Verify that the installation was successful:

gh-cli-mcp --version

You should see output showing the version number of GitHub CLI MCP.

Using with Claude

With Claude Code (CLI)

To use GitHub CLI MCP with Claude Code (the Claude CLI):

  1. Install Claude Code if you haven't already:

    pip install claude-cli
  2. Start the GitHub CLI MCP server in one terminal:

    gh-cli-mcp
  3. In another terminal, start Claude Code with the --mcp flag:

    claude --mcp "gh-cli-mcp:github-cli:stdio:http://localhost:8888"
  4. Claude will now have access to GitHub CLI commands in your session.

With Claude Desktop App

To use GitHub CLI MCP with the Claude Desktop app:

  1. Start the GitHub CLI MCP server:

    gh-cli-mcp
  2. In the Claude Desktop app:

    • Go to Settings
    • Navigate to the "Tools & Integrations" section
    • Add a new MCP integration with these details:
      • Name: GitHub CLI
      • Type: stdio
      • Host: localhost
      • Port: 8888 (default port, change if you configured a different one)
  3. Start a new conversation in Claude Desktop and you'll have access to GitHub CLI commands.

Next Steps

Now that you have GitHub CLI MCP installed and connected to Claude, check the Usage Guide to learn how to use it.

Clone this wiki locally