modelcontextprotocol-server-github

v0.6.2
@beautyfree/modelcontextprotocol-server-github Checked 2 days ago Published 1 year ago

MCP server for using the GitHub API

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

create_or_update_file

Create or update a single file in a GitHub repository

ParameterTypeDescription
branch *stringBranch to create/update the file in
content *stringContent of the file
message *stringCommit message
owner *stringRepository owner (username or organization)
path *stringPath where to create/update the file
repo *stringRepository name
shastringSHA of the file being replaced (required when updating existing files)

search_repositories

Search for GitHub repositories

ParameterTypeDescription
query *stringSearch query (see GitHub search syntax)
pagenumberPage number for pagination (default: 1)
perPagenumberNumber of results per page (default: 30, max: 100)

create_repository

Create a new GitHub repository in your account

ParameterTypeDescription
name *stringRepository name
autoInitbooleanInitialize with README.md
descriptionstringRepository description
privatebooleanWhether the repository should be private

create_org_repository

Create a new GitHub organization repository

ParameterTypeDescription
name *stringRepository name
organization *stringName of the organization where the repository should be created
autoInitbooleanInitialize with README.md
descriptionstringRepository description
privatebooleanWhether the repository should be private

get_file_contents

Get the contents of a file or directory from a GitHub repository

ParameterTypeDescription
owner *stringRepository owner (username or organization)
path *stringPath to the file or directory
repo *stringRepository name
branchstringBranch to get contents from

push_files

Push multiple files to a GitHub repository in a single commit

ParameterTypeDescription
branch *stringBranch to push to (e.g., 'main' or 'master')
files *arrayArray of files to push
message *stringCommit message
owner *stringRepository owner (username or organization)
repo *stringRepository name

create_issue

Create a new issue in a GitHub repository

ParameterTypeDescription
owner *string
repo *string
title *string
assigneesarray
bodystring
labelsarray
milestonenumber

create_pull_request

Create a new pull request in a GitHub repository

ParameterTypeDescription
base *stringThe name of the branch you want the changes pulled into
head *stringThe name of the branch where your changes are implemented
owner *stringRepository owner (username or organization)
repo *stringRepository name
title *stringPull request title
bodystringPull request body/description
draftbooleanWhether to create the pull request as a draft
maintainer_can_modifybooleanWhether maintainers can modify the pull request

fork_repository

Fork a GitHub repository to your account or specified organization

ParameterTypeDescription
owner *stringRepository owner (username or organization)
repo *stringRepository name
organizationstringOptional: organization to fork to (defaults to your personal account)

create_branch

Create a new branch in a GitHub repository

ParameterTypeDescription
branch *stringName for the new branch
owner *stringRepository owner (username or organization)
repo *stringRepository name
from_branchstringOptional: source branch to create from (defaults to the repository's default branch)

list_commits

Get list of commits of a branch in a GitHub repository

ParameterTypeDescription
owner *string
repo *string
pagenumber
perPagenumber
shastring

list_issues

List issues in a GitHub repository with filtering options

ParameterTypeDescription
owner *string
repo *string
directionstring
labelsarray
pagenumber
per_pagenumber
sincestring
sortstring
statestring

update_issue

Update an existing issue in a GitHub repository

ParameterTypeDescription
issue_number *number
owner *string
repo *string
assigneesarray
bodystring
labelsarray
milestonenumber
statestring
titlestring

add_issue_comment

Add a comment to an existing issue

ParameterTypeDescription
body *string
issue_number *number
owner *string
repo *string

search_code

Search for code across GitHub repositories

ParameterTypeDescription
q *string
orderstring
pagenumber
per_pagenumber

search_issues

Search for issues and pull requests across GitHub repositories

ParameterTypeDescription
q *string
orderstring
pagenumber
per_pagenumber
sortstring

search_users

Search for users on GitHub

ParameterTypeDescription
q *string
orderstring
pagenumber
per_pagenumber
sortstring

get_issue

Get details of a specific issue in a GitHub repository.

ParameterTypeDescription
issue_number *number
owner *string
repo *string

get_pull_request

Get details of a specific pull request

ParameterTypeDescription
owner *stringRepository owner (username or organization)
pull_number *numberPull request number
repo *stringRepository name

list_pull_requests

List and filter repository pull requests

ParameterTypeDescription
owner *stringRepository owner (username or organization)
repo *stringRepository name
basestringFilter by base branch name
directionstringThe direction of the sort
headstringFilter by head user or head organization and branch name
pagenumberPage number of the results
per_pagenumberResults per page (max 100)
sortstringWhat to sort results by
statestringState of the pull requests to return

create_pull_request_review

Create a review on a pull request

ParameterTypeDescription
body *stringThe body text of the review
event *stringThe review action to perform
owner *stringRepository owner (username or organization)
pull_number *numberPull request number
repo *stringRepository name
commentsarrayComments to post as part of the review
commit_idstringThe SHA of the commit that needs a review

merge_pull_request

Merge a pull request

ParameterTypeDescription
owner *stringRepository owner (username or organization)
pull_number *numberPull request number
repo *stringRepository name
commit_messagestringExtra detail to append to automatic commit message
commit_titlestringTitle for the automatic commit message
merge_methodstringMerge method to use

get_pull_request_files

Get the list of files changed in a pull request

ParameterTypeDescription
owner *stringRepository owner (username or organization)
pull_number *numberPull request number
repo *stringRepository name

get_pull_request_status

Get the combined status of all status checks for a pull request

ParameterTypeDescription
owner *stringRepository owner (username or organization)
pull_number *numberPull request number
repo *stringRepository name

update_pull_request_branch

Update a pull request branch with the latest changes from the base branch

ParameterTypeDescription
owner *stringRepository owner (username or organization)
pull_number *numberPull request number
repo *stringRepository name
expected_head_shastringThe expected SHA of the pull request's HEAD ref

get_pull_request_comments

Get the review comments on a pull request

ParameterTypeDescription
owner *stringRepository owner (username or organization)
pull_number *numberPull request number
repo *stringRepository name

get_pull_request_reviews

Get the reviews on a pull request

ParameterTypeDescription
owner *stringRepository owner (username or organization)
pull_number *numberPull request number
repo *stringRepository name