MCP.so
Sign In
Servers

GitHub CLI MCP服务器

@Chenlong-Tao

MCP server on GithubCLI allow you to access private repos

Overview

What is GitHub CLI MCP服务器?

GitHub CLI MCP服务器 provides a simple and friendly interface to access GitHub functionalities through the MCP protocol. It is designed for developers who want to interact with GitHub repositories, issues, pull requests, and gists programmatically via the Model Context Protocol.

How to use GitHub CLI MCP服务器?

Install GitHub CLI (gh) using your system's package manager, authenticate with gh auth login, then import and call the available tool functions such as pr_view(123, "owner/repo") or repo_view("microsoft/vscode"). Integer parameters (e.g., PR and issue numbers) must be passed as integers, and all integer arguments are automatically converted to strings internally.

Key features of GitHub CLI MCP服务器

  • Manage repositories: view and create GitHub repos.
  • Manage issues: view and create GitHub issues.
  • Manage pull requests: view, create, and diff PRs.
  • Manage gists: view and create gists.
  • Full PR diff output without truncation.
  • Parameter type safety with automatic integer-to-string conversion.

Use cases of GitHub CLI MCP服务器

  • View a pull request's complete code diff without truncation.
  • Create a new issue in a repository with a title and body.
  • List and inspect your own or organization repositories.
  • Create a new gist with specified files and description.
  • Automate PR creation by specifying the base branch name.

FAQ from GitHub CLI MCP服务器

What are the runtime requirements?

GitHub CLI (gh) must be installed on the system and authenticated via gh auth login. The server itself is written in Python and uses the MCP protocol.

How do I authenticate to access GitHub resources?

Run gh auth login in your terminal before using the MCP server. Ensure you have permission to access the target repositories.

Can I see the full diff of a pull request?

Yes, the pr_diff function outputs the complete diff without truncation, so you can view all code changes.

What data types should I use for PR and issue numbers?

PR and issue numbers must be integers (e.g., pr_view(123, "owner/repo")). They are automatically converted to strings internally for correct command execution.

Which transports or authentication methods are supported?

Transport details are not specified; the server communicates via the MCP protocol. Authentication relies on GitHub CLI's pre-configured credentials.

More from Developer Tools