-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
GitHub CLI MCP has a few prerequisites and can be installed via npm.
- Node.js (v18 or later)
- GitHub CLI - Must be installed and authenticated
Before installing GitHub CLI MCP, you need to install and authenticate the GitHub CLI:
Follow the official instructions for your operating system: https://github.com/cli/cli#installation
Once installed, authenticate with your GitHub account:
gh auth loginFollow the prompts to authenticate with GitHub.
npm install -g gh-cli-mcpIf 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 linkVerify that the installation was successful:
gh-cli-mcp --versionYou should see output showing the version number of GitHub CLI MCP.
To use GitHub CLI MCP with Claude Code (the Claude CLI):
-
Install Claude Code if you haven't already:
pip install claude-cli
-
Start the GitHub CLI MCP server in one terminal:
gh-cli-mcp
-
In another terminal, start Claude Code with the
--mcpflag:claude --mcp "gh-cli-mcp:github-cli:stdio:http://localhost:8888" -
Claude will now have access to GitHub CLI commands in your session.
To use GitHub CLI MCP with the Claude Desktop app:
-
Start the GitHub CLI MCP server:
gh-cli-mcp
-
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)
-
Start a new conversation in Claude Desktop and you'll have access to GitHub CLI commands.
Now that you have GitHub CLI MCP installed and connected to Claude, check the Usage Guide to learn how to use it.
GitHub CLI MCP - Making GitHub CLI accessible to AI assistants via Model Context Protocol