github-mcp-server-ts

v0.0.3
@marcusdb/github-mcp-server-ts Checked 1 day 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

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: milestone string (If an integer is passed, it should refer to a milestone by its number field. If the string * is passed, issues with any milestone are accepted. If the string none is passed, issues without milestones are returned.) ,state string(Indicates the state of the issues to return.Default: open - Can be one of: open, closed, all) ,assignee string (Can be the name of a user. Pass in none for issues with no assigned user, and * for issues assigned to any user.) ,type string (Can be the name of an issue type. If the string * is…

ParameterTypeDescription
owner *string
repo *string
assigneestring
creatorstring
directionstring
labelsarray
mentionedstring
milestonestring
pagenumber
per_pagenumber
sincestring
sortstring
statestring
typestring

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 (specify either position or line, not both)
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

list_sub_issues

List sub issues of an issue

ParameterTypeDescription
issue_number *number
owner *string
repo *string
pagenumber
per_pagenumber

reprioritize_sub_issue

Reprioritize a sub issue of an issue, make sure to specify either after_id or before_id, not both

ParameterTypeDescription
issue_number *number
owner *string
repo *string
sub_issue_id *number
after_idnumber
before_idnumber

remove_sub_issue

Remove a sub issue of an issue, sub_issue_id is the id of the issue to be removed not the issue number

ParameterTypeDescription
issue_number *number
owner *string
repo *string
sub_issue_id *number

add_sub_issue

Add a sub issue to an issue, sub_issue_id is the id of the issue to be added as sub-issue not the issue number

ParameterTypeDescription
issue_number *number
owner *string
repo *string
sub_issue_id *number
replace_parentboolean

list_labels_for_issue

List all labels for an issue

ParameterTypeDescription
issue_number *number
owner *string
repo *string
pagenumber
per_pagenumber

add_labels_to_issue

Adds labels to an issue

ParameterTypeDescription
issue_number *number
labels *array
owner *string
repo *string

set_labels_for_issue

Sets the labels for an issue, replacing any existing labels

ParameterTypeDescription
issue_number *number
owner *string
repo *string
labelsarray

remove_label_from_issue

Remove a label from an issue

ParameterTypeDescription
issue_number *number
name *string
owner *string
repo *string

remove_all_labels_from_issue

Remove all labels from an issue

ParameterTypeDescription
issue_number *number
owner *string
repo *string

list_labels_for_repo

List all labels for a repository

ParameterTypeDescription
owner *string
repo *string
pagenumber
per_pagenumber

create_label

Create a label for a repository

ParameterTypeDescription
name *string
owner *string
repo *string
colorstring
descriptionstring

get_label

Get a single label for a repository

ParameterTypeDescription
name *string
owner *string
repo *string

update_label

Update an existing label for a repository

ParameterTypeDescription
name *string
owner *string
repo *string
colorstring
descriptionstring
new_namestring

delete_label

Delete a label from a repository

ParameterTypeDescription
name *string
owner *string
repo *string

list_labels_for_milestone

List labels for issues in a milestone

ParameterTypeDescription
milestone_number *number
owner *string
repo *string
pagenumber
per_pagenumber

list_milestones

List milestones for a repository

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

create_milestone

Create a milestone for a repository

ParameterTypeDescription
owner *string
repo *string
title *string
descriptionstring
due_onstring
statestring

get_milestone

Get a single milestone for a repository

ParameterTypeDescription
milestone_number *number
owner *string
repo *string

update_milestone

Update an existing milestone for a repository

ParameterTypeDescription
milestone_number *number
owner *string
repo *string
descriptionstring
due_onstring
statestring
titlestring

delete_milestone

Delete a milestone from a repository

ParameterTypeDescription
milestone_number *number
owner *string
repo *string