mcp-github-cli

v0.2.0
mcp-github-cli Checked 1 day ago Published 1 year ago

GitHub CLI extension for MCP that provides focused GraphQL and REST API tools.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

gh_get_me

Get details of the authenticated user. Returns: Information about the authenticated user including login, name, and organizations

gh_graphql_repo_info

Get detailed repository information using GraphQL. Example: gh_graphql_repo_info("block/goose") Args: owner_repo: Repository in format "owner/repo" Returns: Repository details including stars, forks, issues, PRs, and languages

ParameterTypeDescription
owner_repo *string

gh_graphql_user_profile

Get detailed user profile information using GraphQL. Example: gh_graphql_user_profile("octocat") Args: username: GitHub username Returns: User profile details including repositories, contributions, and social info

ParameterTypeDescription
username *string

gh_graphql_pull_requests

Get pull requests for a repository using GraphQL. Example: gh_graphql_pull_requests("block/goose", 5) Args: owner_repo: Repository in format "owner/repo" limit: Maximum number of PRs to return (default: 10) state: PR state (OPEN, CLOSED, MERGED) Returns: Pull request details including title, author, reviewers, and status

ParameterTypeDescription
owner_repo *string
limitinteger
statestring

gh_graphql_issues

Get issues for a repository using GraphQL. Example: gh_graphql_issues("block/goose", 5, "OPEN", ["bug", "help wanted"]) Args: owner_repo: Repository in format "owner/repo" limit: Maximum number of issues to return (default: 10) state: Issue state (OPEN, CLOSED) labels: List of labels to filter by Returns: Issue details including title, author, comments, and labels

ParameterTypeDescription
owner_repo *string
labels
limitinteger
statestring

gh_graphql_repo_contributors

Get contributors for a repository using GraphQL. Example: gh_graphql_repo_contributors("block/goose", 5) Args: owner_repo: Repository in format "owner/repo" limit: Maximum number of contributors to return (default: 10) Returns: Contributor details including commit count and recent commits

ParameterTypeDescription
owner_repo *string
limitinteger

gh_rest_search_repos

Search for repositories using REST API. Example: gh_rest_search_repos("language:python stars:>1000", 5) Args: query: Search query limit: Maximum number of results to return (default: 10) Returns: Repository search results

ParameterTypeDescription
query *string
limitinteger

gh_rest_repo_contents

Get repository contents using REST API. Example: gh_rest_repo_contents("block/goose", "README.md") Args: owner_repo: Repository in format "owner/repo" path: File or directory path (empty for root) ref: Git reference (branch, tag, or commit SHA) Returns: File or directory contents

ParameterTypeDescription
owner_repo *string
pathstring
ref

gh_rest_create_issue

Create an issue using REST API. Example: gh_rest_create_issue("your-username/your-repo", "Bug: Login fails", "The login button doesn't work", ["bug", "high-priority"]) Args: owner_repo: Repository in format "owner/repo" title: Issue title body: Issue description labels: List of labels to apply Returns: Created issue details

ParameterTypeDescription
body *string
owner_repo *string
title *string
labels

gh_rest_create_pr

Create a pull request using REST API. Example: gh_rest_create_pr("your-username/your-repo", "Add login feature", "This PR adds login functionality", "feature-login", "main") Args: owner_repo: Repository in format "owner/repo" title: PR title body: PR description head: Branch containing changes base: Branch to merge into (default: main) draft: Whether to create as draft PR Returns: Created PR details

ParameterTypeDescription
body *string
head *string
owner_repo *string
title *string
basestring
draftboolean

gh_rest_branches

List branches in a repository using REST API. Example: gh_rest_branches("block/goose") Args: owner_repo: Repository in format "owner/repo" Returns: List of branches

ParameterTypeDescription
owner_repo *string

gh_rest_commits

List commits in a repository using REST API. Example: gh_rest_commits("block/goose", "main", 5) Args: owner_repo: Repository in format "owner/repo" branch: Branch name (default: default branch) limit: Maximum number of commits to return Returns: List of commits

ParameterTypeDescription
owner_repo *string
branchstring
limitinteger

gh_custom_graphql

Execute a custom GraphQL query. Example: gh_custom_graphql("query { viewer { login name } }") Args: query: GraphQL query variables: Optional variables for the query Returns: Query results

ParameterTypeDescription
query *string
variables

gh_rest_api

Execute a custom REST API request. Example: gh_rest_api("repos/block/goose", "GET", query_params={"sort": "updated"}) Args: endpoint: API endpoint (without leading slash) method: HTTP method (GET, POST, PUT, PATCH, DELETE) data: Optional request body for POST, PUT, PATCH query_params: Optional query parameters Returns: API response

ParameterTypeDescription
endpoint *string
data
methodstring
query_params