github-mcp-server-ts
v0.0.3MCP 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
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch to create/update the file in |
content * | string | Content of the file |
message * | string | Commit message |
owner * | string | Repository owner (username or organization) |
path * | string | Path where to create/update the file |
repo * | string | Repository name |
sha | string | SHA of the file being replaced (required when updating existing files) |
search_repositories
Search for GitHub repositories
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query (see GitHub search syntax) |
page | number | Page number for pagination (default: 1) |
perPage | number | Number of results per page (default: 30, max: 100) |
create_repository
Create a new GitHub repository in your account
| Parameter | Type | Description |
|---|---|---|
name * | string | Repository name |
autoInit | boolean | Initialize with README.md |
description | string | Repository description |
private | boolean | Whether the repository should be private |
get_file_contents
Get the contents of a file or directory from a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
path * | string | Path to the file or directory |
repo * | string | Repository name |
branch | string | Branch to get contents from |
push_files
Push multiple files to a GitHub repository in a single commit
| Parameter | Type | Description |
|---|---|---|
branch * | string | Branch to push to (e.g., 'main' or 'master') |
files * | array | Array of files to push |
message * | string | Commit message |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
create_issue
Create a new issue in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
title * | string | |
assignees | array | |
body | string | |
labels | array | |
milestone | number |
create_pull_request
Create a new pull request in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
base * | string | The name of the branch you want the changes pulled into |
head * | string | The name of the branch where your changes are implemented |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
title * | string | Pull request title |
body | string | Pull request body/description |
draft | boolean | Whether to create the pull request as a draft |
maintainer_can_modify | boolean | Whether maintainers can modify the pull request |
fork_repository
Fork a GitHub repository to your account or specified organization
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
organization | string | Optional: organization to fork to (defaults to your personal account) |
create_branch
Create a new branch in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
branch * | string | Name for the new branch |
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
from_branch | string | Optional: 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
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
page | number | |
perPage | number | |
sha | string |
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…
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
assignee | string | |
creator | string | |
direction | string | |
labels | array | |
mentioned | string | |
milestone | string | |
page | number | |
per_page | number | |
since | string | |
sort | string | |
state | string | |
type | string |
update_issue
Update an existing issue in a GitHub repository
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
owner * | string | |
repo * | string | |
assignees | array | |
body | string | |
labels | array | |
milestone | number | |
state | string | |
title | string |
add_issue_comment
Add a comment to an existing issue
| Parameter | Type | Description |
|---|---|---|
body * | string | |
issue_number * | number | |
owner * | string | |
repo * | string |
search_code
Search for code across GitHub repositories
| Parameter | Type | Description |
|---|---|---|
q * | string | |
order | string | |
page | number | |
per_page | number |
search_issues
Search for issues and pull requests across GitHub repositories
| Parameter | Type | Description |
|---|---|---|
q * | string | |
order | string | |
page | number | |
per_page | number | |
sort | string |
search_users
Search for users on GitHub
| Parameter | Type | Description |
|---|---|---|
q * | string | |
order | string | |
page | number | |
per_page | number | |
sort | string |
get_issue
Get details of a specific issue in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
owner * | string | |
repo * | string |
get_pull_request
Get details of a specific pull request
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
list_pull_requests
List and filter repository pull requests
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
repo * | string | Repository name |
base | string | Filter by base branch name |
direction | string | The direction of the sort |
head | string | Filter by head user or head organization and branch name |
page | number | Page number of the results |
per_page | number | Results per page (max 100) |
sort | string | What to sort results by |
state | string | State of the pull requests to return |
create_pull_request_review
Create a review on a pull request
| Parameter | Type | Description |
|---|---|---|
body * | string | The body text of the review |
event * | string | The review action to perform |
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
comments | array | Comments to post as part of the review (specify either position or line, not both) |
commit_id | string | The SHA of the commit that needs a review |
merge_pull_request
Merge a pull request
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
commit_message | string | Extra detail to append to automatic commit message |
commit_title | string | Title for the automatic commit message |
merge_method | string | Merge method to use |
get_pull_request_files
Get the list of files changed in a pull request
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
get_pull_request_status
Get the combined status of all status checks for a pull request
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
update_pull_request_branch
Update a pull request branch with the latest changes from the base branch
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
expected_head_sha | string | The expected SHA of the pull request's HEAD ref |
get_pull_request_comments
Get the review comments on a pull request
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
get_pull_request_reviews
Get the reviews on a pull request
| Parameter | Type | Description |
|---|---|---|
owner * | string | Repository owner (username or organization) |
pull_number * | number | Pull request number |
repo * | string | Repository name |
list_sub_issues
List sub issues of an issue
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
owner * | string | |
repo * | string | |
page | number | |
per_page | number |
reprioritize_sub_issue
Reprioritize a sub issue of an issue, make sure to specify either after_id or before_id, not both
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
owner * | string | |
repo * | string | |
sub_issue_id * | number | |
after_id | number | |
before_id | number |
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
| Parameter | Type | Description |
|---|---|---|
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
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
owner * | string | |
repo * | string | |
sub_issue_id * | number | |
replace_parent | boolean |
list_labels_for_issue
List all labels for an issue
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
owner * | string | |
repo * | string | |
page | number | |
per_page | number |
add_labels_to_issue
Adds labels to an issue
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
labels * | array | |
owner * | string | |
repo * | string |
set_labels_for_issue
Sets the labels for an issue, replacing any existing labels
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
owner * | string | |
repo * | string | |
labels | array |
remove_label_from_issue
Remove a label from an issue
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
name * | string | |
owner * | string | |
repo * | string |
remove_all_labels_from_issue
Remove all labels from an issue
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | |
owner * | string | |
repo * | string |
list_labels_for_repo
List all labels for a repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
page | number | |
per_page | number |
create_label
Create a label for a repository
| Parameter | Type | Description |
|---|---|---|
name * | string | |
owner * | string | |
repo * | string | |
color | string | |
description | string |
get_label
Get a single label for a repository
| Parameter | Type | Description |
|---|---|---|
name * | string | |
owner * | string | |
repo * | string |
update_label
Update an existing label for a repository
| Parameter | Type | Description |
|---|---|---|
name * | string | |
owner * | string | |
repo * | string | |
color | string | |
description | string | |
new_name | string |
delete_label
Delete a label from a repository
| Parameter | Type | Description |
|---|---|---|
name * | string | |
owner * | string | |
repo * | string |
list_labels_for_milestone
List labels for issues in a milestone
| Parameter | Type | Description |
|---|---|---|
milestone_number * | number | |
owner * | string | |
repo * | string | |
page | number | |
per_page | number |
list_milestones
List milestones for a repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
direction | string | |
page | number | |
per_page | number | |
sort | string | |
state | string |
create_milestone
Create a milestone for a repository
| Parameter | Type | Description |
|---|---|---|
owner * | string | |
repo * | string | |
title * | string | |
description | string | |
due_on | string | |
state | string |
get_milestone
Get a single milestone for a repository
| Parameter | Type | Description |
|---|---|---|
milestone_number * | number | |
owner * | string | |
repo * | string |
update_milestone
Update an existing milestone for a repository
| Parameter | Type | Description |
|---|---|---|
milestone_number * | number | |
owner * | string | |
repo * | string | |
description | string | |
due_on | string | |
state | string | |
title | string |
delete_milestone
Delete a milestone from a repository
| Parameter | Type | Description |
|---|---|---|
milestone_number * | number | |
owner * | string | |
repo * | string |