GitHub CLI MCP Server logo

GitHub CLI MCP Server

by Chenlong-Tao

This MCP server provides a simple and friendly interface for GitHub CLI, allowing you to access GitHub features through the MCP protocol. It enables management of repositories, issues, PRs, and Gists.

View on GitHub

Last updated: N/A

What is GitHub CLI MCP Server?

This is an MCP server that acts as a bridge between the GitHub CLI and the MCP protocol. It allows users to interact with GitHub functionalities like repository, issue, PR, and Gist management through MCP commands.

How to use GitHub CLI MCP Server?

  1. Install GitHub CLI (gh) following the official documentation. 2. Authenticate with GitHub using gh auth login. 3. Use the provided MCP tools (e.g., repo_view, issue_create, pr_diff) with appropriate parameters (repository name, issue/PR number, etc.). Refer to the examples for usage.

Key features of GitHub CLI MCP Server

  • Repository Management (view, create)

  • Issue Management (view, create)

  • PR Management (view, create, view diff)

  • Gist Management (view, create)

  • Complete PR diff output

Use cases of GitHub CLI MCP Server

  • Automating GitHub repository creation

  • Managing issues and pull requests through scripts

  • Retrieving detailed code differences in pull requests

  • Creating and managing Gists programmatically

  • Integrating GitHub functionality into other applications via MCP

FAQ from GitHub CLI MCP Server

How do I install GitHub CLI?

Refer to the GitHub CLI official documentation for installation instructions for your operating system.

How do I authenticate with GitHub?

Use the command gh auth login to authenticate with your GitHub account.

What parameter types are supported?

PR and Issue numbers must be integers. PR base branch names must be strings. Integer parameters are automatically converted to strings internally.

How do I view the full diff of a PR?

Use the pr_diff(pr, repo) function. The server provides the complete diff output without truncation.

What do I do if I encounter issues?

  1. Verify that GitHub CLI is installed correctly (gh --version). 2. Ensure you are authenticated (gh auth login). 3. Check your permissions for the repository or resource. 4. If JSON output is problematic, try standard output format.