- Home
- MCP servers
- GitHub CLI
GitHub CLI
- python
1
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"munch-group-gh-mcp": {
"command": "python",
"args": [
"/path/to/gh-mcp/server.py"
]
}
}
}This MCP server wraps the GitHub CLI to expose GitHub functionality through a standardized interface. It lets you manage repositories, pull requests, issues, workflows, releases, and more via MCP-enabled clients, using your authenticated GitHub CLI credentials.
How to use
You connect an MCP client to the GitHub MCP server to perform GitHub operations through a consistent MCP interface. Start the server as a standalone process or configure it in your MCP client so you can issue typical tasks like listing repositories, viewing pull requests, creating issues, or checking workflow runs.
How to install
Prerequisites: you need Python 3.10 or higher and a configured GitHub CLI (gh) authenticated to your account.
Clone the project and install in editable mode so you can develop against it.
git clone https://github.com/munch-group/gh-mcp.git
cd gh-mcp
pip install -e .
Verify that GitHub CLI is authenticated before starting the MCP server.
gh auth status
Run the server directly for testing in standalone mode. The server exposes an MCP interface over standard input/output.
python server.py
Additional sections
Configuration and usage notes: you will use a client to interact with the server. For Claude Desktop, you can add the MCP server so Claude can route commands to the Python server.
Example configuration (for Claude Desktop or compatible MCP clients) shows the server being started as a local stdio process with Python.
{
"mcpServers": {
"gh": {
"command": "python",
"args": ["/path/to/gh-mcp/server.py"]
}
}
}
Security note: the server executes gh commands using the authenticated GitHub CLI user. Ensure you trust any client connected to this server, as actions you perform can affect your GitHub resources such as repositories, issues, pull requests, workflows, and releases.
Troubleshooting and tips
If you encounter authentication issues, re-authenticate the GitHub CLI with gh auth login and re-check gh auth status.
If the server cannot start, verify Python 3.10+ is installed and the editable install completed successfully. Check that the path to server.py in your MCP client configuration is correct.
Available tools
gh_repo_list
List repositories for a user or organization using the GitHub CLI.
gh_repo_view
View information about a repository via the GitHub CLI.
gh_repo_create
Create a new repository using the GitHub CLI.
gh_pr_list
List pull requests in a repository.
gh_pr_view
View a pull request.
gh_pr_create
Create a pull request.
gh_pr_merge
Merge a pull request.
gh_pr_checkout
Check out a pull request locally.
gh_issue_list
List issues in a repository.
gh_issue_view
View an issue.
gh_issue_create
Create an issue.
gh_issue_close
Close an issue.
gh_workflow_list
List workflows in a repository.
gh_workflow_view
View workflow details.
gh_run_list
List recent workflow runs.
gh_run_view
View details about a workflow run.
gh_release_list
List releases in a repository.
gh_release_view
View information about a release.
gh_release_create
Create a new release.
gh_search_repos
Search for repositories.
gh_search_issues
Search for issues and pull requests.
gh_gist_list
List your gists.
gh_gist_create
Create a new gist.
gh_api
Make authenticated GitHub API requests.
gh_auth_status
View authentication status.
gh_status
Print information about issues, PRs, and notifications.